Update wikitext-macros.tid
Added new macro wikitext-example-compact to support the publishing of Widget variants in a more compact form.
Initially to support changes to the ViewWidget Documentation, this compact form may be used in other Widget documentation.
Variants demonstrate alternative forms of a specific widget or macro with the ability for users to copy to clipboard and use in their own wiki. In some widgets that have multi-functions there is no single form of the widget, and demonstrating some variations highlights this.
Thanks @AnthonyMuscio it would be helpful to show before and after screenshots for a visual change like this so that people can get involved in the discussion without running the code. Also we should document new/changed docs macros in "Documentation Macros".
I recall some discussions a while back that I believe have led to this PR. It was to provide copy-to-the-clipboard examples of more complex variations of some widgets, where it is not easy for newer users to understand exactly how to do this.
I believe this macro is supposed to be used in this format?
<<wikitext-example-compact """<$view tiddler="someTiddler field="some-field" format="date" template="MMM DD, YYYY"/>""">>
It all displays on one line, and the rendered text is the same as in the code block.
To see a live version of this new macro in operation please refer to the Pull request https://github.com/Jermolene/TiddlyWiki5/pull/3895 that proposed a documentation update to the ViewWidget Tiddler
Until a reference to wikitext-example-compact is made no change will be visible.
00SS - Please explain what you mean by "I believe this macro is supposed to be used in this format?", the content varies with the thing you are documenting.
I will identify where to document new/changed docs macros in "Documentation Macros".
Looking for the place to document my proposed new documentation macro I could not find the existing macros in $:/editions/tw5.com/wikitext-macros documented anywhere, including
- wikitext-example
- wikitext-example-without-html
- tw-code are not yet documented
in https://tiddlywiki.com/#Documentation%20Macros
let alone adding wikitext-example-compact
Can I be set straight or a new section developed, noting these macros do not begin with "." as noted at the top of the Documentation Macros - tiddler.
Tony
@AnthonyMuscio
Looking for the place to document my proposed new documentation macro I could not find the existing macros in $:/editions/tw5.com/wikitext-macros documented anywhere, . . .
There is a pending pull request for that : #3767 The preview can be seen here : https://00ss.github.io/documentation/tiddlywiki.html
@AnthonyMuscio
00SS - Please explain what you mean by "I believe this macro is supposed to be used in this format?", the content varies with the thing you are documenting.
Sorry for the confusion. There was no reference to another pull request for how and what this new macro could be used for, so I tried to see how it might be used, thus my comment was put in a question form. Now it is clear after seeing your reference to PR #3985
This may be a good time to add a separate Example tiddler for each widget. Good examples for Widgets would enhance the documentation considerably.
I believe a new tiddler named: $:/editions/tw5.com/widget-macros : is needed.
The 1st macro within that should be :
\define .widget-examples(v,text:"Examples") <$link to="$v$Widget (Examples)">$text$</$link>
The 2nd macro can be of the form that is proposed in this PR.
Thus at the bottom of the viewWidget tiddler, we can call the macro:
<<.widget-examples view>> that would open tiddler: viewWidget (Examples)
This way we could add new examples without overcrowding the Widget definition tiddler - and it would conform to the way Operator, Wikitext, & Variable examples are provided.
If this is acceptable, I will add the above to PR #3767 along with mentioning the macro @AnthonyMuscio is proposing here.