TiddlyWiki / TiddlyWiki5

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

[IDEA] It's proposed to reduce the JSON indent to 2 spaces in the parse-tree preview section #7459

Open pmario opened 1 year ago

pmario commented 1 year ago

If the following code snippet is previewed as parse-tree or widget-tree, the indentation per level is 4 spaces.

It's proposed to reduce the indent in the preview to 2 spaces, which will make the JSON output much more readable.

\procedure eqn(x, y)
\parameters (a:2, b:5)
* x = <<x>>
* y = <<y>>
* a = <<a>>
* b = <<b>>
\end

<<eqn 4 5>>

image

pmario commented 1 year ago

It's also proposed to allow some filtering to reduce the number of elements that are shown. Eg:

pmario commented 1 year ago

related to: https://github.com/Jermolene/TiddlyWiki5/issues/7458#issuecomment-1549078328 at: [BUG] The First Attribute of a Parameters Pragma is Overwritten when Is used Inside a Procedure #7458

Jermolene commented 1 year ago

Hi @pmario reducing the tab indent to 2 spaces seems reasonable. I'm not so sure about filtering the information shown, though, it might lead to confusion.

pmario commented 1 year ago

.. I'm not so sure about filtering the information shown, though, it might lead to confusion.

Filtering may be an option. Not sure how it can be implemented atm. .. Just an idea.