Hello All, I have found 2 plugins for ‘local development’ (local HTML vs node.js) development of tiddlywiki plugins within a TW itself, Gatha and Tinka.
Gatha is nice b/c it sorts out the dev environment from the plugin building itself, and can do literally everything include language stuff, but I also kind of find it clunky to use.
Tinka ( TinkaPlugin/Tinka: Tinka is an easy plugin packer for TiddlyWiki5.) I find to be much more elegant for UI and usability, though it’s philosophy is your dev environment contains your plugins as well. (this is fine for my use) The big thing it seems to be lacking is the ability to set or edit the plugin priority number, which Gatha has.
Tinka appears to be long since inactive so I’m curious how difficult would it be to modify the tinka plugin to expose the ‘plugin priority’ number field?
This single-tiddler pure wikitext add-on (no javascript code!) adds “save as plugin” and “save as import” buttons to the $:/AdvancedSearch > Filter tab. You can use it to create a plugin containing the tiddlers from the search results and set all of the plugin-related fields:
author
core-version
dependents
description
list
name
parent-plugin
plugin-priority
source
stability
version
The output tiddler is a plugin that contains shadow tiddlers and can be directly installed into another TiddlyWiki using drag-and-drop.
Note that you can also use TiddlyTools/Search/SaveAs to merge the contents of multiple existing plugins into a single unified plugin, as well as create “themes” (which are actually a special type of plugin) and “importers” (non-shadow “bundles” of tiddlers that can also be imported into other TiddlyWikis using drag-and-drop).
My recollection is that the priority field only gets applied after the plugins have been sorted by name alphabetically, which makes it only useful for the most trivial of cases. It’s also an incentive to give yourself a name like “aaaPluginDeveloper”.
But it’s been awhile, so maybe I’m remembering incorrectly.
My understanding is that conflicting (same named) shadow tiddlers are resolved first by plugin priority, and default to alphabetical plugin name as a fallback but I haven’t actually dug around in the code to verify that.
If someone more knowledgeable could accurately speak to the behavior I’d greatly appreciate it.
Of course Gatha is authored by @Mohammad and it is always worth mentioning the author so they see what you are talking about. I think @oeyoews may be the tinka author/
in the $:/plugins/ahahn/tinka/tinka-repackagePlugin.js tiddler , insert pluginTid["plugin-priority"] = diff.fields["create-plugin-priority"]; somewhere in the repackagePluginWidget.prototype.invokeAction function
then repackage Tinka itself (optional) and reload. Didn’t text extensively, but seems to be sufficient.
I haven’t got a chance to test it extensively either, but it seems to have worked mostly. But for some reason with your patches the plugin only seems to ‘save’ the priority values when entered from the ‘modify existing plugin’ option and packaged, but not the ‘create new plugin’ option. Which still packages the plugin correctly but when you save, reload and go back to ‘modify’ the newly packaged plugin the priority value you had entered on the creation screen isn’t there.