Can the tag pills in the sidebar be dragged to rearrange them? I am unable to.

122 views
Skip to first unread message

Suzanne McHale

unread,
May 22, 2021, 9:41:28 PM5/22/21
to TiddlyWiki
I can do this with the titles/entries under each tag pill, but the pills themselves won't move in the browser (Firefox or Chrome, latest version of each) - I'm not sure if this is a possibility or not? (The Tiddlywiki.com information page - https://tiddlywiki.com/#Drag%20and%20Drop -  is not clear on this.)

Soren Bjornstad

unread,
May 23, 2021, 9:20:49 AM5/23/21
to TiddlyWiki
No, this won't work because dragging and dropping tiddlers to reorder them modifies the list field of the tiddler tagging them. The tags don't share a common tagging tiddler, so there's nowhere to store this information.

That said...there definitely are ways you could customize the tag list to influence the sorting of your tags. If you are still interested, can you share more about your use case?

PMario

unread,
May 23, 2021, 11:54:09 AM5/23/21
to TiddlyWiki
Hi,
Internally the tags field is an array. ... It's not possible to guarantee the order in arrays. It depends on implementation details of the different browser vendors.

There are new functions, that would guarantee the order, but we can't use them until we drop support for IE11+
-mario

Jeremy Ruston

unread,
May 23, 2021, 11:58:01 AM5/23/21
to tiddl...@googlegroups.com
Hi,
> Internally the tags field is an array. ... It's not possible to guarantee the order in arrays. It depends on implementation details of the different browser vendors.
>
> There are new functions, that would guarantee the order, but we can't use them until we drop support for IE11+

I don't think that's relevant here; the OP is asking to reorder the list of tags in the sidebar, which are currently always shown in alphabetical order.

Best wishes

Jeremy

Mohammad Rahmani

unread,
May 23, 2021, 12:45:23 PM5/23/21
to tiddl...@googlegroups.com
There is some technical difficulty here! dragging a tag pill to a dropzone (e.g a draggable list) will add all tidlers tagged with that tag!
So, I think you need to develop your own tag list!



Best wishes
Mohammad


On Sun, May 23, 2021 at 6:11 AM Suzanne McHale <kosmo...@gmail.com> wrote:
I can do this with the titles/entries under each tag pill, but the pills themselves won't move in the browser (Firefox or Chrome, latest version of each) - I'm not sure if this is a possibility or not? (The Tiddlywiki.com information page - https://tiddlywiki.com/#Drag%20and%20Drop -  is not clear on this.)

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e01ebf51-f6d6-4708-a7cc-d7961230201an%40googlegroups.com.

Suzanne McHale

unread,
May 23, 2021, 2:38:14 PM5/23/21
to TiddlyWiki
Thanks for clarifying! I wasn't sure about the issue. The reason was for exporting the tiddlers as a static HTML in a particular order, but I can reorder them in the export macro.

Suzanne McHale

unread,
May 23, 2021, 2:46:17 PM5/23/21
to TiddlyWiki
It was for exporting the tiddlers in a particular order to static HTML - I do this with a filter expression, but being able to reorder the tag pills would enable me to eliminate this in the expression.

Suzanne McHale

unread,
May 25, 2021, 1:42:23 AM5/25/21
to TiddlyWiki
Actually, the relevant tiddler says "Tag pills are also draggable, and are equivalent to simultaneously dragging all of the individual tiddlers carrying the tag." So I am a bit confused there!

TW Tones

unread,
May 25, 2021, 3:22:45 AM5/25/21
to TiddlyWiki
Kosmo,

Are you referring to the list of tags in the Sidebar More Tags list?
If so this is defined in $:/core/ui/MoreSideBar/Tags and its filter is found in $:/core/Filters/AllTags!!filter and reads [tags[]!is[system]sort[title]]
So yes it is sorted by title.

The following button will "tag all the tags" with tag sort, provide a list to drag and drop into the required order and the correct filter to use once setup.

<$button>
<$list filter="[tags[]!is[system]sort[title]]">
<$fieldmangler>
<$action-sendmessage $message="tm-add-tag" $param="tagsort"/>
</$fieldmangler>
</$list>
Tag Tags with tagsort
</$button>

;Reorder below or in the tag pill <<tag tagsort>>
:use the filter `[all[]tag[tagsort]]` in a new or modified sidebar tab

<<list-tagged-draggable tag:"tagsort">>

Regards
Tones

si

unread,
May 25, 2021, 7:48:04 AM5/25/21
to TiddlyWiki
>>> Actually, the relevant tiddler says "Tag pills are also draggable, and are equivalent to simultaneously dragging all of the individual tiddlers carrying the tag." So I am a bit confused there!

If you try dragging a tag into the "Open" tab in the sidebar you will see that rather than opening a tiddler representing the tag, you instead open every tiddler that has that tag.

So tags are draggable, but you also need somewhere to drop them, and within the tags list there is no drop zone. And as Mohammad points out, even if you could drop them you would actually just be adding all tiddlers with that tag to the list.
Reply all
Reply to author
Forward
0 new messages