Thursday, October 12, 2017

Change Log: 2.37.747

More work in progress on this guy.
 Release 2.37.747 contains a number of UI/UX improvements, including:
  • Survivor Sheet "Disorders" controls no longer reload the page! 
  • Survivor Sheet "Lineage" controls and presentation have been completely re-done and upgraded to show more/better data, including basic survivor biographies.
  • Changing a Survivor's parents no longer reloads the page.
  • Integration with the Manager's Twitter account.
  • A good-size handful of bug and presentation fixes
Counterweighted Axe detail.
As far as the Twitter thing is concerned, the tl;dr is that rather than doing updates/alerts via the application, which requires pushing code to GitHub, I decided to just outsource transient status updates to Twitter.

The account has been around for a while now, but as of release 2.37.747, I finally got around to integrating it and replacing the old alert mechanism. Effective immediately, the pink "alert" box on the dashboard has been replaced with a blue "!" box.

Another thing to point out about this release is that a lot of what it does is intended to help page load speeds.

For instance, a major part of the lag on rendering the Survivor Sheet in the legacy webapp was the "Lineage" information: gathering that could take in excess of two seconds in some cases, and it slowed down the page load substantially. In release 2.37.747, the API does the lineage stuff asynchronously (i.e. in parallel with the main page load) and the Survivor Sheet should be able to load that much faster.

Another small improvement that some users might notice in this release is that the Survivor Sheet no longer totally refreshes/re-initializes itself when making trivial changes (e.g. adding/removing epithets, changing Survival, toggling "Favorite" status, etc.).

At any rate, work on The Watcher continues in the background, and I expect to have a pretty major announcement about that in the next few weeks. Stay tuned!

And thanks for using the Manager!

Corrections and Fixes

  1. Removed some extraneous print-debugging from
  2. Addressed an issue affecting /user/dashboard/<oid> where settlements with unconverted expansions (names instead of handles) could bomb the whole request out.
  3. Addressed a wide resolution presentation issue where the Dashboard's "World" panel was separated from its button by a weird gap.
  4. Fixed the problem with the legacy webapp admin panel where the full page loader didn't clear on page load.
  5. The popularity contest for expansion content (on the dash and the API Admin Panel) is now sorted by weight.
  6. Fixed a few Sunstalker-related location/endeavor issues (old references to names that should have been updated to handles).
  7. Pushed the style code for the first-time login modal (most of which was missing, and broke the presentation at tablet and wide resolution).
  8. Fixed a bug that prevented the dashboard from initializing for some users. -Bodaster
  9. Normalized the bottom border/horizontal rule presentation at wide resolution on the right pane of the Survivor Sheet (it was formerly a sort of hodge-podge).
  10. Addressed a presentation issue affecting tablet resolution that caused Survivor Sheet information to have weird, extreme margins.
  11. Fixed the JS that causes survivor Insanity to turn maroon when the survivor is in insane (that must have broke...ages ago.)

Application Enhancements

  1. Deprecated the vestigial admin.render_about_panel() method.
  2. Added html.meta.hide_full_page_loader() HTML stub for DRYness.
  3. Changing a survivor's avatar now shows the full page loader/spinner on change, to prevent users clicking other buttons/firing other forms while the upload is happening.
  4. Updated kdmManager.js so that the all-important postJSONtoAPI() method can be called in such a way that it DOES NOT reinitialize the view.
  5. Removed view reinitialization for the following operations:
    1. Survivor Sheet "Favorite" toggle
    2. Survivor Sheet "Retired" toggle
    3. Survivor Sheet Survival
    4. Survivor Sheet permanent affinities controller
    5. Weapon Proficiency (score)
    6. Hunt XP, Courage and Understanding
    7. Add/remove epithets
  6. The z-index.css file is now versioned (i.e. it force-downloads on a version update)
  7. Integrated the kdmManager Twitter feed into the Dashboard; styled it at all three resolutions
  8. Re-implemented Survivor Sheet 'Lineage' management:
    1. Parents, Siblings, Children and Intimacy Partner information/controls only appear on the Survivor Sheet if necessary: Parents controls only show up if the survivor is not a founder, the other ones only show up if necessary.
    2. Re-did parent setting controls in AngularJS and integrated them with new API development (below)
    3. Survivor Lineage is in its own div now and, if the API fails, the block will fail and no one will know the difference. #gracefulFailure
    4. Deprecated the following legacy methods from the legacy webapp's Survivor class: get_parents(), get_intimacy_partners(), get_siblings(), get_children()
    5. The "Lineage" block now includes a section called "Biography", which includes various survivor life stats.
  9. Initializing a settlement (via kdmManager.js) automatically updates the settlement's 'last_accessed' value
  10. postJSONtoAPI() now has the ability to suppress the "Saving..." pop-up/modal.
  11. Deprecated Disorders management in the legacy webapp:
    1. Removed the 'disorders' normalization from the legacy Survivor class normalize() method
    2. Removed the get_disorders() method from the Survivor class
    3. Removed add_game_asset() method from the legacy Survivor class (which is a BFD)
    4. Also removed rm_game_asset() from the legacy Survivor class.
    5. Removed support for Disorders management from
    6. Removed 'on_return' support from the legacy app's return_departing_survivors() method
    7. Removed legacy webapp Disorder HTML control rendering and support from the Survivor modify() method for adding/removing disorders
    8. Added a new AngularJS controller for Disorder operations
    9. Added HTML 'cards' for disorders (that show expansion source, look like the paper versions etc.)
    10. updated initAssetLists() method in kdmManager.js to initialize a Disorder picker when loading a Survivor Sheet view.
    11. Added controls for adding Disorders via API
  12. Survivor Sheet Fighting Arts controls no longer load with placeholder content before the survivor is initialized
  13. Removed vestigial JS code that formerly applied strikethrough style to Fighting Arts if Fighting Arts were disabled
  14. Checking the 'Cannot use Fighting Arts' box now gives Fighting Arts 30% opacity.
  15. Toggling the once-in-a-lifetime SotF reroll no longer reinitializes the Survivor Sheet.
  16. Moved the SotF re-roll to a more appropriate, more prominent spot on the Survivor Sheet.
  17. Moved the all-purpose incrementAttrib() and updateAttrib() methods to the root scope of survivorSheet.js

API Development

  1. settlements.Settlement.get_expansions() now backs off to asset names, if it cannot find an asset handle.
  2. Touched up a couple of display elements on the Admin Panel so that the response times table looks a little neater
  3. Signed out users are a different color now on the Admin Panel (for ease of identification); they also get a parenthetical note to the effect.
  4. Settlements can now be stamped with a 'last_accessed' timestamp:
    1. Added a method called set_last_accessed()
    2. Created a route for it
    3. Documented the route
    4. Muted the logging, etc., so that this can happen without looking like anything is happening from the user perspective
  5. Admin panel shows recently accessed settlements (in addition to recently modified settlements) and the query in that retrieves them no longer users the event log mdb collection.
  6. Implemented ancestor and intimacy partner management in the API:
    1. added a get_parents() method to the Survivor class that returns the survivor's parents in a couple of different ways.
    2. Added a get_parents() method to the Settlement class as well: this one checks all survivors and returns a dictionary of unique <ahem> couplings.
    3. added a set_parent() method and a route to it; built in some user-friendliness/graceful failures, etc.
    4. Added a new get_lineage() route and method to the Survivor class. 
    5. Documented the new /survivor/set_parent/<oid> route
    6. Touched up the docs to include a reference to the /survivor/get_lineage/<oid> route.
  7. Updated so that it can be verbose (or not).
  8. The utils.InvalidUsage() class/exception type now logs to error.log and has hooks for sending alert emails.
  9. The Settlement object's get_survivors() method now supports the 'exlcuded' kwarg, which lets you exclude a list of survivor OIDs.
  10. Keyed in a bunch of random female names (just to even it out a bit).
  11. Implemented Disorders management in the API
    1. ported 51 disorders (core + 1.3/1.4 expansions) from the legacy webapp
    2. Created a module to controle the asset init
    3. Added a convert_disorders() method to the Survivor class; included it in the normalize() routine with a version check, etc.
    4. Settlements are now initialized to include Disorder assets in their game_assets
    5. Verified that "Skip Next Hunt" can be set by disorders
    6. add_game_assets() has been updated to handle the 'retired' key (which auto-retires the survivor on asset addition)
  12. Admin Panel now sorts application administrators based on their login name.


  1. One more improvement idea came to my mind as I was managing our settlement. I noticed that on settlement summary, you can decrement resource amount by simply clicking on the desired resource.

    It would be super great to have something similar for increasing the amount of an already existing resource e.g. right click or ctrl + click, or something like that. To my best knowledge now it is possible to increase resource via that huge dialogue window, where everything is visible. That one requires couple of clicks, and when getting a new batch of resources, it is a bit time-consuming to repeat it also for those resources we already have some in storage.

    1. Settlement Storage controls are actually due for a massive overhaul either late this month or early next month (but hopefully before people's 1.5 games start showing up).

      The new control scheme for settlement storage will be vastly improved and involve no page reloads.

      If you want to take a look at the rough plan, I've got the general design here:

  2. And one more: I very frequently update survivors, but when I want to jump to the next one, I have to go back to the settlement sheet, and click the another.

    If you see it feasible, it could help to put same "Search Living Survivors" bar to the survivors sheets themselves, so one can directly jump from one survivor to another one without going back to settlemet sheet. Thanks!

    1. That's a pretty good idea! I'll add it to the backlog of Survivor Sheet enhancements!

      In the meantime, using the "Favorite" option on survivors is probably the best way to rapidly navigate between survivors, since it makes links to your favorite survivors appear in your side bar/navigation menu.