Replies: 1 comment
-
Ok, so I tried it. Adding the tiddlers to the database was pretty simple. And the is_plugin field on the bag will work fine. I also added that to the UI and it can be used for system tiddlers instead of just having it be based on whether the title starts with However none of the recipe code is going to be the same. Loading an entire bag into a single JSON object is very different than the recipe system. I'm thinking I'll probably end up have an entirely separate section of code for handling plugin bags. I'll probably also keep the plugin text field containing the stringified tiddlers to make it easier to serve plugins to the client. That means the text field will have to be updated each time a tiddler is written, but that's not a big deal since plugins aren't normally being edited. When a recipe requests a plugin tiddler, it's basically requesting a single tiddler from the bag. That part isn't difficult to modify for plugin tiddlers. We can pretty easily use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the current recipe system it would make sense to load each bag as a plugin tiddler except for the top one. That way plugin tiddlers would be able to contain the entire bag's contents as shadow tiddlers while also being overridden by plugins or normal tiddlers.
Any downsides?
I just thought of a big one. Let's say you have a customization bag which you store all of your site-wide customizations in.
[all[normal]]
refers to those tiddlers in the recipe when you're editing them, but[all[shadow]]
refers to those tiddlers when you're using them.But wouldn't people normally want to use
[all[normal+shadow]]
anyway in order to catch both kinds?I suppose sometimes, but it would depend on what the filter is for. A filter in a personal journal, for instance, wouldn't expect the user's journal entries to be shadow tiddlers.
So it'd probably have to be an option on the recipe bag entry. That way the user could explicitly mark whether they want that behavior or not.
The other downside is of course that sometimes tiddlers can be huge and having the same tiddler overridden in multiple bags would just be so much bloat. But again I think making it an option would be sufficient.
The tiddler in the bag with the bag name as its title would become the plugin info tiddler.
On the other hand, we could also make the writable bag be a plugin. And then instead of making this be a recipe specific option it would be a bag specific option in the bag settings. The wiki client would have to be configured to expect this but it would make editing plugin bags so much easier.
Then again I'm not sure why you would only want shadow tiddlers in a filter because you'd be ignoring anything the user tries to override.
Any filter experts who can weigh in on this?
Beta Was this translation helpful? Give feedback.
All reactions