Variant of close-other view toolbar button

When I click on a wiki link in a tiddler, I want all other tiddlers in the story river to be closed except the current tiddler and the tiddler opened on clicking the wiki link. Something similar to the close-others view toolbar button.

Is this possible?

I think this discussion should give you big clues how to do it, because you ask for behaviour triggered by clicking the link:

1 Like

Have you tried setting the story view to pop?. I belive thats what you want? Look through control panel.

Not quite, arrunbabu wrote

Then the answer is a new button that actions close others and then use the navigate to the link tiddler.buttons can be made to look like links.

I find it unlikely that it would be a satisfying solution to replace all links with buttonwidgets. The solution by @pmario n that other thread recodes how actual links behave. (pmario uses this in his plugin to make links work with aliases… the plugin name momentarily escapes me. AliasLinks? Some such.)

1 Like

Is that unilink plug in

Ah, yes that’s the one!

@twMat … Yes, the idea could be the same, but we would need to use the MessageCatcher widget. It sends 2 variables to the action-widget.

event-navigateFromTitle and event-navigateTo So it would be possible to set the $:/StoryList list field to exactly those values, that variables contain.

But this time, in stead of the PageTemplate we would need to catch the links in the tiddler body only. … may be. …

Some thinking needed.

I think uni-link macros can’t be used here. I think (didn’t test) they don’t know the navigateFromTitle, which will be needed.

Overall @arunnbabu81 's idea is interesting for a pruning type of storyview; I often find I have many tiddlers open that I eventually realize I should close (manually) because I didn’t use them for a long time. It would be interesting to have a storyview that shows only the “last X currentTiddlers” i.e where X can be an arbitrarily set constant depending on taste.

I use krystal horizontal layout plug in. When multiple tiddlers are open in the story river, if I click on a wiki link within a tiddler, the linked tiddler will open in the story river as usual. But I will usually have things within the linked tiddler to be compared with the tiddler with the link. So I thought it would be a good idea to close all other tiddler on clicking the click except the tiddler with the link and the linked tiddler. In doing so these tiddlers will arranged side by side in the story river for direct comparison.

I did create a prototype, that uses the new cascade system. So no core tiddler needs to be overwritten. …

The problem is, that the behaviour is weird. By default, it doesn’t navigate to the new tiddler, that is clicked. … For me it depends. I use CTRL-click if I don’t want to navigate to the new tiddler. …

But in this case since only 2 tiddlers are open at the same time, the desire may be different. …

AND the worst thing is: It’s always active atm. … So I only can open 2 tiddlers at a time, which is the pure horror for me personally. …

So for me it would be needed, that there is a “enable/disable” toggle in the sidebar. I’ll post a JSON tiddler soon.

2 Likes

There is a prototype, which only affects links within the tiddler body. This behaviour can probably be changed if the “cascade” is changed. … custom-story-message-catcher.json (2.2 KB)

It contains 3 tiddlers.

  • $:/custom/ViewTemplateBodyFilters/message-catcher … contains the filter, that is used by the tiddler body cascade

  • $:/custom/ui/ViewTemplate/body/message-catcher … contains the actual code,

  • $:/custom/ui/Buttons/message-catcher … contains the sidebar button, that is active by default and toggles the $:/config/use/body/message-catcher tiddler between yes and no

There are some glitches. It only woks for links that use the [[link to tiddler]] syntax. It seems links that are created with transclusions don’t trigger the behaviour.

All texts, that are used would probably need more attention. Not sure, if they all make sense.

More time would be needed to polish it. … BUT I think it’s pretty usable already.

have fun!
mario

1 Like

Thank you for creating this one. It works as intended.

But I have a few feature requests

  1. It doesn’t work for the links when a custom viewtemplate is used (example - here i am using a custom viewtemplate to show the tiddler body along with the echarts TheBrain map view side by side after hiding the core viewtemplate for the tiddler body).
  2. In Krystal horizontal story river, there is an option for maximized state for tiddlers. We have to press the viewtoolbar button to go into and come out of maximized state. So when a wiki-link is clicked when the tiddler is in maximized state, the tiddler continues to be in maximized state until the toolbar button is pressed. cdruan helped me to alter this tiddler opening behaviour when wikilinks are clicked when the tiddler is in maximised state. With the help of this code, the tiddler revert back to non-maximised state when a wikilink is clicked. But when I am using your solution , that behaviour is not seen.

Any solutions for these?

1 Like

Hi @arunnbabu81 , I believe Stroll does this by default; but you can change its parameters if you wish to have more than a single tiddler in the story river. It also supports two story river columns and the settings can be applied differently in each column.

https://giffmex.org/stroll/stroll.html

@fastfreddy I am aware of stroll and the two story river. But it doesn’t suit the workflow, plug ins and set up I am using. I have tried it many times. Finally settled with krystal.

@pmario Instead of the page control button, can there be a modifier key like Control or shift which when pressed while clicking the link will result in the two tiddlers in the story ?

Also when the page control button is pressed to activate the unlimited story, then the tiddler body or the default viewtemplate for the tiddler body is getting hidden.

1 Like

If this was not resolved to your liking, some recent work I did may help but I think it would help if you worked through the detailed requirements for this solution.

  • Do you want the first tiddler to always remain open?
  • What if you click a link in the second tiddler, to a third tiddler?
  • If this is operating what happens of someone clicks a link in the side bar?
  • What happens to tiddlers in the default tiddlers when you reload?
  • What happens if you shift-click on a link?

What are you trying to achieve with this?, rather than the how. Perhaps there is another or better way.

Another approach I can think of

  • An example is open a special tiddler in which clicking links to other tiddlers opens them below (inside this special tiddler) and you have your own set of “substory” controls. This is the concept of and alternative story or substory. See Creating SubStories.

Since I am using multicolumn layout currently, I don’t remember exactly what all were my requirements when I requested for this feature to be used with Krystal horizontal layout plug in. I will comment here after using the Krystal for a few days .
If I remember correctly, when I click on a link within a tiddler, I wanted all other tiddlers to close except the tiddler with the link and the linked tiddler (mainly to avoid crowding of tiddlers and to directly view and compare the two tiddlers which are currently open side by side)