Before I post this on gh, I'd like to hear what you think of the following idea:
"I want a button that does...." ...is a common need but requires a more involved process than should be needed. For one thing, it often also requires the RevealWidget which is a bit complex. In particular, if you want the "normal" look for a button, namely *one* button that does both "on" and "off" (the "Accordion" example <https://tiddlywiki.com/prerelease/#RevealWidget>) then you need to create *two* buttons and *two* RevealWidgets. Way too complex. So to serve this common use case, could both of ButtonWidget + RevealWidget use a default state tiddler like so "$:/state/<current>"? Default values are perhaps *true* and *false*. And if this default state is used, the RevealWidget further defaults to *type=match* and *text=true* This would allow for really simple syntax: <$button>Toggle</$button> <$reveal> Content </$reveal> So, this idea is really two individual proposals because of the typical coexistence between the widgets: 1) Make the ButtonWidgets *set* and *setTo* have default values *$:/state/<current>* and *true.* For this to be meaningful, the widget must first check to see if this state tid is already set, in which case it sets it to *false* or, perhaps better, deletes the state tid. The resulting state tiddler can of course be used for anything... 2) ...but, particularly for the RevealWidget; if no RevealWidget state parameter is defined then default to *state=$:/state/<current>* and *type=match* and *text=true* <:-) -- 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/350ca438-2a71-46fb-80f9-08d271a125c2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
