-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IDEA] Allow sync-adaptor load json plugins #7685
Comments
The commit message for 93e0143 suggests that you're correct: "We might in the future offer support for certain types of JS module to be hot loaded." At the moment, the "doesPluginRequireReload" check is still simply "is it a Javascript module? Then yes, otherwise no". But yes, the framework has been put into place to allow certain types of modules to be loaded without a reload. It makes sense to me that any plugin loaded at boot time, before the rest of the wiki is loaded, can (and should) be put on the "no reload" list. |
Thank you @rmunn , so we can make sure that all modules could have taken effect immediately, this require-reload just for security reasons. We will need to add another check here "// The lazy-load plugin never requires reloading" (I'm not sure what |
Thanks @linonetwo @rmunn
The expectation behind the current design is that the syncadaptor would work in tandem with the mechanism that constructs the initial HTML file. I think you're working in situations where the initial HTML file is not dynamically generated. In such situations in my own code I have use a raw markup tiddler to handle the pre-startup loading. You can see an example of the approach via a view source here: https://xememex.com/jermolene/ |
I see, similar to the demo-alternate-store PR #7521 , and this is a temporary workaround before it is done. But it means I can already do it now. Maybe just use a zx script to append script tags to HTML generated by nodejs, so it won't be messy to upgrade tw... |
Close this because it can be done in user-land, as a new distribution version. I need this because Tiddloid Android is too slow to use with my 100M personal wiki. |
Is your feature request related to a problem? Please describe.
Allow sync-adaptor load plugins before booting, and make all plugins work without refreshing the page.
Describe the solution you'd like
I thought "js plugins require reload" is just a security mechanism, so we disable it for plugins loaded by the sync-adaptor.
Then in an empty html, the only plugin needs installing is a sync-adaptor plugin, then fill in the endpoint, it will fetch skinny tiddlers, including those plugin tiddlers.
Disable plugin related security mechanism while loading those plugin tiddlers. Then turn on security, and start lazy loading other tiddlers when requested.
Describe alternatives you've considered
Maybe work with indexed-db, save plugins in it, and auto refresh the page...
wait, why localstorage plugin can save other plugins in it and make them work without refreshing?
Also I remember there is a Filesystem API plugin that can save html wiki without server or app, did you consider the usage like this issue?
Additional context
Trying to make HTML wiki know how to read nodejs wiki's .tid/.md files and json plugins.
The text was updated successfully, but these errors were encountered: