remove the offline manifest authoring code#237
remove the offline manifest authoring code#237scytacki wants to merge 1 commit intooffline-mode-devfrom
Conversation
We now can generate the manifests statically. Additionally this code didn't work after the update to using an install page. With a default CacheOnly Strategy. Perhaps we'll want to bring this back if we can't statically handle new activities, but it seems best to remove it since it doesn't currently work.
|
@dougmartin I'm curious what you think about removing this. I know it was your baby. I doubt that static analysis is going to work for everything, but relying on manual navigation through the activity was error prone. My main goal is to try to clean things up so when we come back to this in a few months (or years?) things are less confusing. |
|
@scytacki I really don't care if it is removed but I'm just wondering how we discover the runtime assets like the iframe app Javascript and css without this mode. |
|
The script currently finds them by downloading the html files and looking for script and link tags. It also looks for some NetLogo specific code: activity-player/src/utilities/activity-utils.ts Lines 280 to 300 in 0d77921 |
|
It even goes as far as looking for activity-player/src/utilities/activity-utils.ts Lines 399 to 410 in 0d77921 All of that code doesn't cover all of the cases though. And might be hard to maintain because a fix for one set of activities might cause another set of activities to start pulling down extraneous stuff that it doesn't need. But at least in this first case of the PC content it seemed better to figure out those heuristics rather than running through the activity pages in a browser. If we run into a problem of fixing one thing breaks another, perhaps we can add per-manifest configuration options to turn on and off various static analysis patterns. |
Since we are generating the manifests statically, and this authoring code doesn't currently work with the CacheOnly Strategy used by the app, I think it make sense to remove it.
It might also help to reduce merge conflicts when the merging in the master branch.
Perhaps we'll want to bring this back if we can't statically handle
new activities, the README references a tag to indicate the last commit when it was working.
TODO