How to open the New Tiddler Edit Window Next to the Top Tiddler?

After investigating the source code of the following core tiddlers,

  • $:/core/ui/ControlPanel/Settings/LinkToBehaviour
  • $:/core/modules/story.js

I realized that besides Top & Bottom, I can also open an existing Tiddler next to the Topmost Tiddler inside the StoryRiver. This feels like the Topmost Tiddler is always fixed on top at its position. :smiley:

But when I try to create a New Tiddler by clicking on the :heavy_plus_sign: button (which in effect will trigger <$action-sendmessage $message="tm-new-tiddler" ... action), the New Tiddler Edit Window is still opened on Top of StoryRiver, rather than next to the Topmost Tiddler. :flushed:

I tried to supply navigateFromTitle parameter to the $action-sendmessage but it would not work as expected:

<$action-sendmessage $message="tm-new-tiddler" $navigateFromTitle={{{ [list[$:/StoryList]nth[2]] ~[list[$:/StoryList]nth[1]] }}} 

Could someone offer some suggestions / tips to resolve this? I don’t want to edit another core tiddler, and have an intuition that there are some built-in features / Widgets / Macrocall parameters to enable this effect. :thinking:

It’s unclear why you want to do this. However, if the goal is to ensure that a particular tiddler will always appear at the top of the StoryRiver, then rather than attempting to modify the TWCore “Settings/LinkToBehavior” and “story.js” shadow tiddlers, you might want to try TiddlyTools/Template/Pin, which allows you to selectively “pin” tiddlers “AboveStory”, so that if you then open a tiddler from outside the StoryRiver (e.g., clicking the New Tiddler button) it will appear after the pinned tiddler(s).

To install, just copy the above tiddler into your TiddlyWiki. Once installed, a “pin” button is automatically added to each tiddler’s ViewToolbar. Clicking this button toggles the tiddler display between normal “in StoryRiver” and “above StoryRiver”.

While pinned, you can still edit the pinned tiddler in place, and if you close the pinned tiddler, it is automatically unpinned.

Update: Previously, following a link from a pinned tiddler would automatically pin the linked tiddler, rather than opening it in the normal StoryRiver. This behavior has been changed so that links from pinned tiddlers will now open in the normal StoryRiver (i.e., unpinned). In addition, editing a pinned tiddler also opens the editor for the pinned tiddler in the normal StoryRiver, and you must unpin a pinned tiddler before you can close it.

Give it a try and let me know if it fullfills your intended objective.

enjoy,
-e

1 Like

Thanks for your quick and detailed reply~ :smiley:

The actual effect I’m trying to achieve is: always putting $:/core/ui/SideBar/Open Tiddler at the left-most, so whatever actions I do to the StoryRiver, or however many tiddlers are opened, I can still reorder them by dragging-and-dropping the title list in $:/core/ui/SideBar/Open.

The plugin suggested looked very close to what I want to achieve, keep one Tiddler at the left-most always while moving others freely. but if the Pinned Tiddler itself is not inside the primary StoryRiver, then I will no longer be able to reorder the rest tiddlers in that StoryRiver… :thinking:

So I will need to find other way round. :blush:

PS: I have bookmarked your TiddlyTools website inside my “Pocket” App, as I guess someday I will be looking for other tools & plugins there. :nerd_face:

You don’t actually need TiddlyTools/Template/Pin to achieve your objective! Instead, try this:

Edit the $:/core/ui/SideBar/Open shadow tiddler and tag it with $:/tags/AboveStory. This will “permanently” show the list of open tiddlers “above” the StoryRiver, but still allow you to use drag-and-drop to reorder the tiddlers that are displayed within the StoryRiver.

2 Likes

Thanks for the interesting tip! I didn’t know it in the past :astonished:

But this only resolved the “Keep One Tiddler on Top” problem, when I click :heavy_plus_sign: button to add new tiddler, it still open Edit Window at Top of StoryRiver, which in my case to the left of $:/core/ui/SideBar/Open, as shown below (I can hide the left-most gray section by CSS display: none) :thinking:

Oh Sorry! I didn’t understand clearly, this means I could drag and drop the title list in that gray section (without having to keep $:/core/ui/SideBar/Open inside the StoryRiver). And I can also decorate the gray section with CSS code as I wish.

So my problem is solved! The solution looks very cool! :sunglasses:

There is a second possibility. Create a tiddler named: Sidebar and tag it $:/tags/AboveStory with the following content

<div class="tc-tiddler-frame">

{{$:/core/ui/SideBarLists}}

</div>

It will give you the full sidebar at the very left of the Krystal theme. Instead of SideBarLists you can also transclude any other tiddler if you want to

This will allow you to get rid of several elements in the top menu … So there is place for other items if you need them

If you don’t want to have the search input at the top you could use:
{{$:/core/ui/SideBarSegments/tabs}} instead of SideBarLists

Sidebar.json (193 Bytes)

1 Like

Thanks very much! this is exactly I wanted to achieve at first (e.g. I need to include bookmark list here as well). Before posting this question I cannot imagine about these ideas / strategies based on my own experience. :sweat_smile:

Currently my StoryRiver looks like this, with Server Status button, Opened Tiddlers + More Tab + Favorites. And to avoid distracting my readers, I created a conditional Stylesheet based on $:/status/IsAnonymous, so that only after logging in could a user see this sidebar. :smiley:

I’ve just recommended other Digital Gardeners to come here and asking questions. :nerd_face:

2 Likes

That’s a very interesting approach using this type of theme. I think it’s a very good match for the sidebar to be used that way.

1 Like