Jermolene / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.79k stars 1.16k forks source link

[IDEA] Replace Plain Contents with Tree Contents in Plugin Tiddlers #8234

Open kookma opened 3 weeks ago

kookma commented 3 weeks ago

Is your feature request related to a problem? Please describe. The tree macro renders an expandable tree view based on a prefix and separator within tiddler titles. The current contents tab in Plugin tiddler shows tiddler as plain list, but it can be more visually semantic using tree macro.

Describe the solution you'd like Please replace plain list contents tab with tree list contents. This new solution is more human-readable and easier to follow and understand.

Describe alternatives you've considered As an example, look at: https://tiddly-gittly.github.io/hyper-table/#%24%3A%2Fplugins%2Flinonetwo%2Fhyper-table by @linonetwo

This solution is backward compatible.

linonetwo commented 3 weeks ago

I always need to put an additional tree.tid on my plugins

title: $:/plugins/linonetwo/tw-calendar/tree

<<tree prefix:"$:/plugins/linonetwo/tw-calendar/">>

Luckily, I've put it in https://github.com/tiddly-gittly/Modern.TiddlyDev , and I always generate new plugin from it.

Jermolene commented 3 weeks ago

Hi @kookma @linonetwo personally, I think that for most plugins that do not have a large number of shadow tiddlers, the existing flat listing is better because it doesn't require any clicking in order to see how many tiddlers are included, and it is simpler to visually scan them for a specific tiddler.

I appreciate that in some cases the tree might be easier to navigate though. One could imagine the "Contents" tab containing another set of tabs to switch between "List" and "Tree" (with the default being "List"). Or perhaps it should be a global preference setting of some kind.

Or perhaps the most flexible change we could make to the core would be to allow plugins to register custom tabs for the plugin info box. Then a plugin could offer the "Tree" tab and it would be shown on all plugins. Making that change would also allow plugins to add other extensions that help to manage plugins.

kookma commented 3 weeks ago

Or perhaps the most flexible change we could make to the core would be to allow plugins to register custom tabs for the plugin info box. Then a plugin could offer the "Tree" tab and it would be shown on all plugins. Making that change would also allow plugins to add other extensions that help to manage plugins.

I think this is fair. TW allows developer to decide flat or tree contents tab or switch to tree for a publisher. For a plugin like shiraz which has more than 100 shadows, tree listing makes it easier to follow (where are macros, templates, styles, ...) I appreciate that for small number of shadows, flat listing is better than tree listing.