Mat,

As I continue working on this as usual with tiddlywiki, I see another 
valuable path to go down, with long term benefits. Perhaps we should 
publish some macro design guidelines and share the code patterns.

Each macro design guideline published could have a name so we can quote 
these in the macro documentation eg; Using design standards "Helpful 
Macros" "macros registered in fields"

   - Use of variable=nul to ensure `<<crrentTiddler>>` remains that of the 
   calling tiddler if you have no need to use the result in your macro, then 
   use variable="meaningful-name"
   - For every macro defined create a field in the tiddler where it is 
   defined macro-macroname and place in that field the syntax `<<macroname 
   parms>> more details`
      - Thus every macro in the wiki can be found, where its defined and 
      its syntax
   - For every macro defined create an additional one called 
   ``<<macroname-help>>` that will display A detailed syntax of the macroname. 
   In a section with `style="outline-style: dotted; padding: 3px; 
   background-color: lightblue; "`
   - For every macro test if any named parameter has the value "?" and 
   display `<<macroname-help>>` if so.
   EG; `<$list filter="[[$buttonname$]] [[$true$]] [[$false$]] 
   [[$default$]] -[[?]] +[limit[1]]" emptyMessage=<<toggle-here-help>> 
   variable=nul>`
   - etc...

Do you have some ideas of your own on this?

Tony

On Thursday, June 27, 2019 at 8:36:40 AM UTC+10, Mat wrote:
>
> @Tony, the more I let your creation sink in, the more I like it.
>
> Of course, it expects the user to do some (very basic) html coding in the 
> wikitext - which is fine by me and anyone who masters html, but...
>
> ...or, actually, can wikitext elements have css IDs?
>
> One thing to note - at least I think this is how it works - is that if 
> using it for a reveal widget; content isn“t evaluated in revealwidget 
> closed state whereas I belive merely hiding it with display:none does 
> evaluate it. (...right?)
>
>  
>
>>  Note: *Using variable=nul in a list widget*
>>
>
> That's an interesting use of the variable. Still, I'm not sure why it 
> would be needed in the macro. (Makes me wonder if I also have such 
> "personal touches" that slip along with my public stuff? Hard for one self 
> to tell. )
>  
>   
>
>> On reflection I can see that something similar could be done for a range 
>> of items beyond a toggle/reveal combination, I am thinking of check boxes, 
>> Detail reveals, multiple values select dropdowns etc... What interests me 
>> is finding a simple way to have interactive documents in which you make 
>> choices and different information reveals itself.
>>
>
> In deed interesting.
>  
> Some more notes to consider before you publish:
>
>    - Inform that buttonname must obey field name rules. (slugify need 
>    <https://github.com/Jermolene/TiddlyWiki5/issues/3379> keeps popping 
>    up)
>    - Must enclose $buttonname$ in triple quotes in some places or <__$$__>
>    - Nit pick <https://wikidiff.com/label/lable>
>
>
> <:-) 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/a9d98bdb-bb0a-4130-a36f-a74aa6813971%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to