Ⓐ Ⓑ Ⓒ Tiddler switch, preview and help with toolbar button refresh

Hi Folks,

[Edited] Soon to be published when the draft issue is fixed

  • I have made the solution more customisable with additional sets of buttons that can be toggled on/off etc…

[Edited] With updated package V 0.0.4

  • Existing key macros collapsed into one, now named abc-button
  • Added extendibility, ability to tag tiddlers containing the abc-button
    • Example given TiddlyWiki Dev Buttons
    • Provide a “new ABC-Button Tiddler” button, in settings
    • Provide ability to toggle button sets, in settings
  • Added ability to include a label prefix to the tooltip eg “Alice tiddlername, info”.

Still Outstanding

  • Dealing with tiddlers in draft mode
    • Once this is resolved I plan first release unless I get other feedback

Again, drop on TiddlyIki.com to test

[Edited] With updated package V 0.0.2

  • Fixed tooltip refresh
  • Added color to current tiddler
  • Added ABC tiddler to assist finding it if you disable all display settings
  • Basic instructions to add more buttons
    Outstanding
  • Dealing with tiddlers in draft mode

I am about to share this tool I call Ⓐ Ⓑ Ⓒ or Alice, Bob and Carol.
You may know how Alice, Bob and the lesser known Carol are used in computer science. I have co-opted these to provide buttons to jump between selected tiddlers.

Why?

  • This is very helpful to quickly navigate between tiddlers you are working, on such as;
    • a code tiddler, a viewTemplate tiddler and test tiddler.
    • research material, the tiddler you are authoring and a cheat sheet.
    • Maybe an embedded video, editing your notes and a reference.
  • It provides the ability to set a tiddler title to each Ⓐ Ⓑ Ⓒ button and click to navigate to that tiddler.
  • I have being using it for a few hours of coding and it is proving very helpful, it is intentionally restricted to three tiddlers, which seems an “appropriate cognitive load”.

The last issue

  • I have a small problem - in that once one changes “the assigned tiddler”, with ctrl-click on the current tiddler, it continues to display the last tiddler link in the tooltip, until the view toolbar is refreshed.

Here is the package, alice-bob-and-carol.json (10.7 KB) updated V 0.0.4

  • If you can help solve the refresh button, for all cases, ViewToolbar, Page Controls and sidebar tab I would appreciate it.
  • Otherwise I would love a review positive, negative or constructive.
    • I expect a shortcut key on each would be good
    • I am not sure how well it supports items in draft yet.
  • Do you have similar needs this or a fork of this could assist with?

The three key “display” tiddlers;

  • $:/PSaT/alice-bob-and-carol/abc-navigate
  • $:/PSaT/alice-bob-and-carol/sidebar
  • $:/PSaT/alice-bob-and-carol/viewToolbar

Thanks in advance
Tones

3 Likes

I haven’t tried the package out, the description makes me think this could be a very useful addition, certainly the pattern of workflow you describe is very familiar to me.

It is interesting that you mention a video example - a few days ago I was switching between an open tiddler that I was editing and a tiddler with a video. The video tiddler has text based time codes and brief notes on specifics that the speaker was demonstrating that point in the video, the additional work was a complete transcription of what the speaker was saying which ended up in a fairly long text only tiddler which was then linked back to the video tiddler. I was switching between tiddlers frequently during the manual transcribe.

It might be useful half way through the workflow to be able to “keep” alice and bob but to swap out carol replacing her with debbie.

Yes, my own use so far was Alice and Bob as the two tiddlers I was reading/writing and I changed carol as needed if I was working through a list of other tiddlers.

It really does all depend on the actual work and workflow involved, however as soon as you have more than three buttons it needs more effort, because there is no longer left, middle and right buttons.

My feeling is that beyond three, other navigations tools are required and better like the Open, Recent or a history tab.

To test the above package drop it on tiddlywiki.com, it is “preloaded with tiddlers from its package”, but on any tiddler ctrl-click on any of the three icons to set the current tiddlere to that button, Alt-click on any button for the settings. The tooltip tells you the tiddler and keys.

I think it a real nice approach. I looked. It works. You are a kinda philosopher of TW tricks :-).

It is kinda interesting thinking about your aim…

Another approach to such DEV work might be to use @BurningTreeC’s MultiColumn Layout.
For instance: use one column for inter-related tiddlers like your Ⓐ Ⓑ Ⓒ during the dev phase. I.e. A column only holds the WIP (Work-In-Progress).

Just a comment
TT

1 Like

That’s an interesting approach. … Well done.

It is not refreshed, because there are probably no widgets involved, so the automatic refresh mechanism doesn’t start if the ABC tiddlers are changed.

I think it should be enough, that you wrap the code, that creates the buttons inside a <$let widget, that reads out a value from your ABC tiddlers into variables, that are not really needed. … BUT it should trigger the refresh mechanism. I mean read from those tiddlers, that are changed with the CTRL click

A second thing is: You should add a field code-body = yes to your macro tiddlers, so they can be read in view mode.


When I’m developing something I found out, that I use the same search terms all the time, switching between different sets of tiddlers.

eg: prefixed test-, prefixed $:/plugin/something … and so on. That’s why I did create Advanced Search Plus plugin, which allows me to save search results. … It was introduced 2019 at the GG.

It’s a completely different approach but I think it hits into the same type of workflow.

2 Likes

I haven’t looked at your code but if you are using the tooltip attribute for the $button widget, I recall a bug where the $button widget is not refreshed when the tooltip changes. I recommend opening an issue on Github if that is indeed the problem you have run into.

3 Likes

Thanks @pmario I will try your suggestion and revisit your plugin. Also following on from @saqimtiaz comment perhaps if I “outsource” the tooltip to a tiddler I transclude, and update from the button action, perhaps this will cause a refresh to bypass the “bug” in the tooltip refresh (Or it may just replicate it).

It’s late here, So I will do it tomorrow.

Thanks all.

Solution found after a few minutes attention thanks @pmario and @saqimtiaz

The tooltip was constructed from a filtered transclusion and placed in the button

<$button tooltip={{{ [[Navigate to ']] [{$tiddler$}] [[', ctrl-click to set here, alt-click for settings]] +[join[]] }}} ...

I changed this as follows;

<$let name-abc-tooltip={{{ [[Navigate to ']] [{$tiddler$}] [[', alt-click for settings]] +[join[]] }}}>
<$button tooltip=<<name-abc-tooltip>>  ....

Of note;

  • I had wrapped the the view toolbar buttons in <$let tv-action-refresh-policy=always> however after applying the above fix I removed it and they continue to work.

Ⓐ Ⓑ Ⓒ Tiddler switch, preview

  • I have added color the Ⓐ Ⓑ Ⓒ buttons to indicate when have the relevant tiddler open
    • This will also indicate when two or more buttons Ⓐ Ⓑ Ⓒ are “set” to the current tiddler.
  • I will keep the preview going a little longer and apply an update to the OT (Original thread) - shortly
  • Please install again such as on Tiddlywiki.com and provide more feedback if possible.

@pmario Thanks so much for helping me solve my tooltip refresh problem.

Yes, I have a few other tools to help me in the development process, jumping between related tiddlers, for example custom recent tiddlers tabs edit-recent-sidebars.json (3.2 KB)

However your “Advanced Search Plus” is a very useful tool.

  • I use do link-to-tabs on most wikis (as suggested in your video)
  • I also use some history related tools as they list tiddlers recently visited in this session

One key idea behind Ⓐ Ⓑ Ⓒ tiddler switch is simplicity. For example if you spend time away from a dev wiki when you return you most likely find Ⓐ Ⓑ Ⓒ set to the tiddlers you were actively developing last time, without going out of your way to record your current development focus, they are just kept.

  • As noted on the OT one can add additional buttons to Ⓐ Ⓑ Ⓒ and a user could configure ⓜ for macros, ⓢ for stylesheet, Ⓟ for package/project, ⓥ for viewTemplate, Ⓔ for edit template and Ⓣ for toolbar tiddler etc… (I may make a custom tooltip available to support this)
  • At some point I want to develop a history of histories - saving tiddlers accessed in one session to a session record, but time/date or custom title like your saved searches.

Belated feedback on your Advanced Search Plus [plugin]

  • I would prefer the standard advanced search tabs were still present as I am so familiar with them their absence is jarring, even although “Advanced Search Plus” provides superior replacements.
    • Other than my Dev wikis I may not have Your advanced search plugin.
  • Perhaps you could add your additional tabs via $:/tags/AdvancedSearch without overriding the core tiddlers,
    • and provide a settings option to hide/restore the core tabs if desired toggle $:/tags/AdvancedSearch.

Development notes

As we know, when one toggles a tag on a core tiddler, it modifies the core tiddler. When you toggle it off the “modified tiddler remains”.

Perhaps when one restores the tag to a core tiddler we should instead delete the overriding tiddler?.

  • A test to check if the core tiddler text field differs from the shadow may be wise, incase the user, an upgrade or another 3rd party also modified the core tiddler.
  • A CRC or similar check on the “whole tiddler except the tags” would help here (similar to something we discussed previously). CRC’s can be stored independently in a data tiddler, generated each release and only imported when needed, or generated by a plugin itself before modifying the core tiddler.

New version posted on the the top thread.v 0.0.4

  • The latest version allows additional Buttons, and you could make your own set(s) to do as you wish.
  • Good idea, I you can see how to do this please share.
  • The work around is effectively updating the tooltip so I can’t reproduce an Issue to raise, but If I come across it I will thanks. See above

I wish to finalise and publish this solution, but I am currently struggling to get the navigation to any ABC tiddler in draft to open rather than the original tiddler title.

My design approach;

  • keep the original title stored in the named config tiddler
  • Only when navigating to the “original tiddler title” check to see if a draft tiddler exists and navigate to that instead, if it does.

The solution to this may be a useful code pattern for designers/developers to use in lists or buttons which may incorrectly open the “original tiddler” in the story along with an existing draft tiddler of the same tiddler.