--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.
Hi YakovThanks for the feedback. I'm keen to add syntax for some higher level constructs like sliders, and have been thinking along similar lines. I would like to throw in some related open questions that might be useful to explore.First, a bit of background. In TW5, sliders and several other interactive features are composed from two simpler widgets working together: the 'button' widget can change the value of a tiddler in response to a click, and the 'reveal' widget shows or hides a block of text depending on whether a tiddler has a given value.
Here's an example of a raw slider in TW5:<$button popup="StateTiddler">Open</$button><$reveal type="nomatch" state="StateTiddler" text="">This is the text that will be hid or shown</$reveal>If you paste that into a tiddler, open the tiddler called "StateTiddler" and then click the "open" button, you'll see the value of the tiddler change.Obviously, the syntax above is a bit clumsy for everyday use. The primary alternative is to define and use a macro that encapsulates the slider functionality. For example:\define slider(caption,state,text)<$button popup="$state$">$caption$</$button><$reveal type="nomatch" state="$state$" text="">$text$</$reveal>\end<<slider "Open" "StateTiddler" "This is the text that will be hid or shown">>So, what you're suggesting is essentially to devise a wikitext syntax that can be parsed and rendered as that <$button>/<$reveal> combination. Along the same lines, I'm interested in wikitext syntax for tabs, which are actually implemented as a set of interleaved sliders. I've been considering something like this:__|Title|__Some content to go in this tab__|Title2|__More content____(statetiddler)The end of the tab control
('statetiddler' denotes the tiddler that contains the state of the tab control -- the information that was stored in a cookie in TWClassic)Now, I'm wondering if the syntax for sliders and tabs could be or should be in any sort of harmony?
Because sliders can be represented as macros so neatly, I'm wondering about providing a special type of parser rule that basically maps a regexp to a macro invocation.One could imagine such a rule being encoded like this:regexp: \+\+\+\(([a-zA-Z0-9-_]+)\)\[([a-zA-Z0-9-_]+)\]\n([a-zA-Z0-9-_]+)\n===macro: sliderparams: state caption textIn practice, the regexp would need to be more complicated than that, but you get the idea. Hopefully a lot easier than authoring a full blown JS module.
\define Comment(text)
<$button class="note" popup="$:/state/Comments"><img src="data:image/gif;base64,R0lGODdhEAAQAIACAAAAAOroMSwAAAAAEAAQAAACFYyPqcutAKN0tCYJrN4HRw5eWEiGBQA7"/></$button>
<$reveal type="nomatch" text="" default="" state="$:/state/Comments" animate="yes">
<div class="Comments">$text$</div>
</$reveal>
\end<<Comment
"I don't see the [[advantage]] here for obvious reason:
* Doesn't fit
* Awful color"
>>
<<Comment>>
I don't see the [[advantage]] here for obvious reason:
* Doesn't fit
* Awful color
<</Comment>>
\define Comment()
<$button class="note" popup="$:/state/Comments"><img src="data:image/gif;base64,R0lGODdhEAAQAIACAAAAAOroMSwAAAAAEAAQAAACFYyPqcutAKN0tCYJrN4HRw5eWEiGBQA7"/></$button>
<$reveal type="nomatch" text="" default="" state="$:/state/Comments" animate="yes">
<div class="Comments">$_CONTENT_$</div>
</$reveal>
\endI guess one would hardly need "tabs" with one tab; and, at least in Eric's implementation, nested sliders can't be used one inside another
Of course the "*" don't render as a bulleted list, while o.t.o.h. [[advantage]] does link to a tiddler.
But I think this would require current macros to be written like this:
<<Macro "with" "parameter" />>
Recently, I've noticed that in some cases this works as expected, indeed. However, a while ago I've been trying trees of nested sliders and got different syntax bugs in each situation -- that's probably why I remembered that as "not supported". Unfortunately, I don't have a consistent series of tests, but quick tweaking brought me this markup which is not represented correctly:
* +++[something]
text
* more text +++[more]
details
===
===
I'm unclear on the conclusion of this discussion -- is there a macro in TW5 that will enable my tiddlers with +++[x] ... === syntax to render correctly without any changes?
I have two wikis that have made extensive use of http://tiddlytools.com/#NestedSlidersPluginI'm unclear on the conclusion of this discussion -- is there a macro in TW5 that will enable my tiddlers with +++[x] ... === syntax to render correctly without any changes?