Most of the general/non-specific user feedback I've gotten in the last couple of months is about how long the Manager takes when loading a new page or "view".
And while there are certain, critical aspects of load times that I cannot control, such as network conditions, the speed of your client device, etc., there are a few of things that I can control:
- the time it takes to render the HTML that constitutes a given "view" (e.g. Dashboard, Survivor Sheet, etc.).
- the size of static files, e.g. CSS and JS, that you need to pull down to use that HTML.
- the time it takes the API to respond to requests made by that HTML.
This is a table that shows the average production render times (in seconds) for the main views in the previous release of the Manager:
* data not available.
And here are the average render times for those same views in 2.67.1287 (again, in seconds):
They say, in the biz, that one second is what you should be shooting for, in terms of having a view loaded and ready to go for the user. Even on very fast connections, views that used to take more than half a second (on average) to render have no chance of being loaded in one second.
In 2.67.1287, however, everything gets a lot faster, in terms of how long it takes for view HTML to be created by the web application, and that is an important part of the overall optimization effort.
(To put that another way, before release 2.67.1287, there were something like 80 different selectors that weren't referenced anywhere in any of the project's HTML templates!)
All of which is to say that the HTML, CSS and JS files that you have to pull down when you load a new view should come down just a little bit faster now.
Finally, this release also adds some simple unit testing to the legacy webapp.
One of my 2018 goals for the Manager is to basically lock the legacy webapp down: to "finish" it and stop updating it, so I can focus exclusively on HTML templates and API enhancements. Unit tests are a big part of that: locking down the features of the legacy webapp and wrapping them in unit tests gives me the ability to basically stop active development on it, which is a major goal.
At any rate, I've got some big feature enhancements coming up in the next release, so stay tuned!
Thanks for using the Manager!
Corrections and Fixes
- Miscellaneous HTML markup no longer appears in survivor names.
- Addressed a tablet-resolution presentation issue where the SotF reroll toggle box presentation looked broken.
- The Survivor Sheet 'Name' container refreshes immediately upon save with the 'normalized' (e.g. HTML-stripped survivor name).
- Changing a survivor's name on the Survivor Sheet no longer reinitializes the sheet.
- Added unit testing the the legacy webapp:
- Wrote a test that checks the class selectors in style.css versus the legacy webapp HTML template files to see if those selectors are in use anywhere (and fails if it finds abandoned/vestigial class selectors).
- Wrote another test that checks the application files in the root project dir to see if they're importing deprecated/banished modules.
- Deprecated 21 vestigial CSS class selectors from style.css
- assets.py no longer imports:
- world.py (which is deprecated in the legacy webapp).
- Deprecated the legacy webapp's admin panel:
- removed the button from the dashboard
- removed the panel class definition from the admin.py file
- removed HTML subs related to the panel
- Completely deprecated models.py and removed it from the legacy webapp, since literally everything it did is now done in the API. Very nice!
- Deprecated the get_game_asset_deck() method from the legacy webapp Settlement class object.
- Removed support from the legacy webapp for converting legacy game_assets.py asset dictionaries (since they've all been ported to the API).
- Deprecated all "safari_warning" methods and style/HTML code.
- Removed support for the "norefresh" POST parameter from the legacy webapp.
- Added dev-only page render time logging.
- Added utils.on_production() method to quickly test whether we're currently running in production (i.e. or dev).
- Refactored index so that it only renders the view once when processing the login; also made the login.render() operation included in debug/dev response time logging.
- Deprecated the legacy webapp's login.py AuthObject.authenticate_and_render() method. For sanity/maintainability purposes, we always want html.py to do the renders (i.e. so there's only one way to render HTML).
- Removed legacy webapp support for exporting user data (to be replaced by the API).
- Moved the "default" UI templates into html.render() so that the render call in index doesn't have to contain what basically amounts to config information.
- Created a wrapper for the session.Session.__init__() method called init_failure() (i.e. to replace the try/except code in index).
- api.py no longer throws a warning when POST operations to the API's /login route do not contain a session object (because how could they?).
- The admin.py module accepts the '--response_times' param now, and dumps HTML render times.
- Updated the Survivor object's set_name() method: HTML tags and entities are now stripped from incoming survivor names.
- Created a method in utils.py called html_stripper() that can blast the HTML tags and entities out of any string.