TiddlyWiki / TiddlyWiki5

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

[IDEA] Improve cascade dev experience #8489

Open linonetwo opened 3 months ago

linonetwo commented 3 months ago

Is your feature request related to a problem? Please describe.

I don't know why my view body cascade isn't working.

图片

Describe the solution you'd like

Add a tab in the info, to show the corrently working cascades.

Describe alternatives you've considered

A dev tool like css in browser dev tool, to show the full cascade list on current tiddler.

Additional context

I'm trying to add a loading indicator for lazy tiddlers, so I know they are not empty, just not loaded.

linonetwo commented 3 months ago

I find

tags: $:/tags/ViewTemplateBodyFilter
list-before: $:/config/ViewTemplateBodyFilters/default

will cause your cascade not working.

And only this works. Don't know why, hard to debug.

tags: $:/tags/ViewTemplateBodyFilter
list-before: $:/config/ViewTemplateBodyFilters/hide-body

https://github.com/tiddly-gittly/itonnote-plugin/commit/fe10d9bff6e2cf920d9a381b6359b9bf3819ded3

Jermolene commented 3 months ago

Hi @linonetwo as it happens, I don't think a cascade is necessary in order to make a loading indicator. Skinny tiddlers have a blank text field, so it is not necessary to suppress the usual display of the body of the tiddler. Instead, one can use a view template segment tagged $:/tags/ViewTemplate positioned above the body.

linonetwo commented 3 months ago

That's true, I will use $:/tags/ViewTemplate instead in that case.

But cascade is still hard to debug. May need a UI to show each filter's output.

Jermolene commented 3 months ago

But cascade is still hard to debug. May need a UI to show each filter's output.

Yes I do like the idea, and would welcome a PR.