Can I make tag pills clickable in edit mode?

150 views
Skip to first unread message

Soren Bjornstad

unread,
May 29, 2020, 6:36:44 PM5/29/20
to TiddlyWiki
As we know, when viewing a tiddler, you can click on a tag to get a nice drop-down list of all the tiddlers that it tags. I often find myself wanting to access this information when creating a new tiddler, as part of figuring out what it should link to. Right now, I have to click over into "More" / "Tags" in the sidebar, possibly having to expand the sidebar or scroll to the top if my screen is too small, and then scroll through the list of tags again to find the right one -- all when I can already see the relevant tag pill. Surely there has to be a better way! Has anyone done this themselves?

Poking around in the edit and view templates, it was not obvious to me what would need to be replaced to maintain the X-button functionality while making the tag pill linked. (Also, is there a reason this doesn't already work by default? It seems pretty obviously useful, and clicking on the tag doesn't currently do anything at all in edit mode.)

Birthe C

unread,
May 29, 2020, 7:47:03 PM5/29/20
to TiddlyWiki
I know this is not what you are after, but I use to write <<tag tagname>> and open the preview. At least I am still editing the tiddler and not having to look anywhere else.

Birthe

TonyM

unread,
May 30, 2020, 12:21:38 AM5/30/20
to TiddlyWiki
Using the drop down on the view template tag identify the tags tiddler used then tag it with the edit template tag

That will work I think
Regards
Tony

Soren Bjornstad

unread,
May 30, 2020, 9:28:15 AM5/30/20
to TiddlyWiki
Tony,

As you say, it put them there, but it looks pretty silly to have the tags twice on the same tiddler:

list-before.png


Removing the existing $:/core/ui/EditTemplate/ from the EditTemplate list results in removing the tag picker so you can't easily edit the tags. Similarly, just replacing the portion of the tag picker code with the bit from the view-template code is no good because then the X button goes away and you can't remove a tag. The density of macro wizardry going on up in there is too much for me to figure out how to replicate just the relevant part.

TonyM

unread,
May 30, 2020, 9:42:52 PM5/30/20
to TiddlyWiki
Soren,

I was brief in my answer with a direction to go rather than the full solution.

I would tend to make a button that toggles between the view and edit tag views when in edit mode.

However you could clone the existing view tags and customise it.

What do you imagin?

regards
Tony

Soren Bjornstad

unread,
May 31, 2020, 10:04:01 AM5/31/20
to TiddlyWiki
I was imagining making the part of the pill that doesn't have the X button on it trigger the popup.

I was able to get it to link to the tag tiddler just by surrounding it with a simple <$link> widget, but the logic for the popup is much more complicated and I'm struggling to follow all the levels of macro calls in various places.

TonyM

unread,
May 31, 2020, 8:57:05 PM5/31/20
to TiddlyWiki
Soren,

I think there are two issues here, and the first is simply ensuring the popup occurs on pills when in the edit mode. The second in the popup, but that is trivial and the default is possibly all you need.

I am working on a tool for this now, and will shareback soon. I have discovered some other functionality I want to include which you can remove if you don't want it.

Regards
Tony

TonyM

unread,
May 31, 2020, 9:11:49 PM5/31/20
to TiddlyWiki
Soren,

I through this together, so have a look at how it works, not exactly what you want but perhaps functionally the same.

See attached

Not the view toggle is local, the edit toggle global

Regards
Tony
Edit tags toggle.json

Soren Bjornstad

unread,
Jun 4, 2020, 11:30:08 AM6/4/20
to TiddlyWiki
Tony,

Thanks for this! I have been insanely busy at work so haven't had an opportunity to try it out yet, but I haven't forgotten and will let you know when I do.
Reply all
Reply to author
Forward
0 new messages