Generic button with Dropdown?

93 views
Skip to first unread message

TW Tones

unread,
Jun 25, 2020, 8:41:47 PM6/25/20
to TiddlyWiki
Folks,

You may be familiar with the More Dropdown on the viewtemplate and Page Control buttons,

It is designed for the more button and a little complex to work through to replicate.

Has anyone build a generic version that can be redeployed for other types of drop down buttons?

I would like to see if I can make an autonomous button that can be used this way

Thanks in Advance
Tony

Saq Imtiaz

unread,
Jun 26, 2020, 2:46:45 AM6/26/20
to TiddlyWiki
Not sure I follow Tony. It is the standard button-popup paradigm. That is, a button that triggers a reveal widget as a popup. Is there something about the "more" button that you find unique?

Otherwise you will find examples here:

Cheers,
Saq

TW Tones

unread,
Jun 26, 2020, 5:38:25 AM6/26/20
to TiddlyWiki
Saq

An example would be making additional buttons that work like the more buttons. Perhaps driven via an alternate tag. An example may be a drop down appearing on task tiddlers that list buttons relevant to tasks.

Another would be setting any tiddler to a particular type so that it can be built from a template and have particular view / edit templates activated. E.g. make this tiddler include streams, or notowrity etc...

The core dropdowns are a little more complex than they need to be so I am looking for a more generic solution if it exists and an alternate tag for the members of the drop down, if not keeping the view toolbar tag for the top button.

Of course I may need to reengineer the existing more buttons, although I would have expected someone had already done it.

Regards
Tony

Saq Imtiaz

unread,
Jun 26, 2020, 5:58:03 AM6/26/20
to TiddlyWiki
I'll repeat my question: what is it that you find unique about the more button as compared to the examples given on TiddlyWiki.com for a popup triggered by a button? 

Have you looked at the link in my previous post and read the examples for the reveal widget?

The content of the popup is the content of the reveal widget used for it. What you put in there is up to you. Where exactly is the unnecessary complexity?

I use dropdown buttons like this all the time. There isn't something noteworthy or groundbreaking about that, unless there is some unique feature of the "more" button that I am not understanding. If so please point it out.

The examples at https://tiddlywiki.com/#RevealWidget are an excellent starting point.

The following all use the same paradigm and the contents are determined by filters operating on fields:






TW Tones

unread,
Jun 26, 2020, 6:44:49 AM6/26/20
to TiddlyWiki
Saq

I took your reply seriously and read your links provided more than once.

I think taking the more button as an example may have been a bad idea. Despite deep expiernce elsewhere I have spent little time on popups, and don't know them in html either.

Clearly I need more time on task and to teach myself.

More is only special in it has a drop down and lives in the toolbar, and has toolbar options in control panel.

If there is no generic example I will teach myself. Thanks anyway.

Tones

Saq Imtiaz

unread,
Jun 26, 2020, 6:59:58 AM6/26/20
to TiddlyWiki
I'm still not clear if you want the view toolbar/control panel related aspects of the "more" dropdown on or not.

A generic example of a dropdown button would be this from the RevealWidget docs:

<$button popup="$:/SamplePopupState">Pop me up!</$button>

<$reveal type="popup" state="$:/SamplePopupState">
<div class="tc-drop-down">

! This is the popup
And this is some text

</div>
</$reveal>

The toolbar "more" button has the same pattern, but the logic for what to display for each button (icons/text) is more complex so that it respects the settings from the ControlPanel. If you intend for your button to behave exactly the same as the core view toolbar buttons, then the "more" button is a good example. All of the extra logic and complexity is needed, except maybe the check against config-title

Hope this helps,
Saq

TW Tones

unread,
Jun 26, 2020, 7:33:27 AM6/26/20
to TiddlyWiki
Thanks Saq. Getting me rolling on this.

My mind is buzzing with the possibilities.

Regards
Tony

Reply all
Reply to author
Forward
0 new messages