Don't We Need Split Button in TiddlyWIki?

Terminology

A split button has two components; one is the label and the other is an arrow . The purpose of the arrow is opening a dropdown with the set of actions. Whereas clicking on the label takes to the default action [1].

TiddlyWIki

There are some split buttons in Tiddlywiki like the More Actions on Tiddler toolbar and The Filters drop down on Advanced Search!

BUT We need more! It would be great if we could have a widget or macro like tabs to create split button!

References

[1]. How to Create Split Button [3 Examples]
[2]. Bootstrap 5.2.2.dropdowns

I have an unpublished template for creating what I understood was “a button with a drop down” which sounds like a “split button”, such buttons look like the more button, or a hamburger etc… but with custom content.

  • Does that sound like what you are asking for or something else?

I’m off to bed for now :nerd_face:

PS. It sounds like the start of more flooding with the rain outside, on Australia’s South East coast is starting again, apparently due to the “La Nina”. Seems like a few years of floods following a few years of fires.

Didn’t Tobias Beer do a split plugin, or am i off track?

Found it

http://tobibeer.github.io/tw5-plugins/#split

I did create a highly configurable dropdown for my custom-markup plugin. I thought it would be worth to be “separated” into a plugin but I didn’t see a need in the community.

At the moment it is a very specific dropdown. It basically is a highly configurable “stamp button” to insert text-snippets. It can be used with the mouse, but it’s strength is using it with the keyboard.

  • Every option is maximum 2 keyboard shortcuts away. eg:
    • CTRL-6 opens the dropdown
      • 1 inserts snippet 1
      • 2 inserts snippet 2 … and so on
  • Every dropdown option has a key from “1-0” or “a-h” associated
    • There are 18 options for one dropdown-set
  • There can be as many different named sets as needed.

CTRL-6 … Enter … activates the last used command … It is possible to create a second button, that you called “label” in your post, that holds the last command. At the moment I defined a different function to this “label-button” but it is there already and has its own keyboard shortcut.

One dropdown looks like this

The associated configuration looks like this

A snippet config tiddler looks like this


So at the moment it would only allow us to manage text-snippets. … But from you post I think you also wanted to call “actions”. … That may be possible, but isn’t implemented at the moment. The mechanism and config-tiddlers may be similar to the text formatting buttons liek bold or italic …

1 Like

Hi Mohammad,

As I am sure you already know, a split button is simply two buttons styled to look like two parts of the same component where one triggers a dropdown (reveal widget). I wrote a macro years ago for creating them easily but I have to admit that in my own usage, split buttons have fallen out of favour, in part due to how fiddly they are to use on touch devices.

Screenshot 2022-10-05 at 07.46.04

1 Like

For those interested in @pmario solution, the custom-markup plugin is here: