Navigating the StoryRiver using KeyboardShortcuts #5262
Replies: 22 comments 76 replies
-
So ... I'm now at the point where I'd like to tackle this 😸 I'll try to create a summary of our previous discussions here |
Beta Was this translation helpful? Give feedback.
-
@BurningTreeC ... Sorry for the delay. The last time I did try to tackle the problem, it was top-down from the "tm-navigate" message down to the storyview. It didn't work out too well. So now let's reduce it to the keyboard handling and see, where we need to make changes. .. At the moment the interface between the different js-code elements are not well defined and that makes it difficult to change the code. .. That's the reason, why all the existing plugins, that deal with the story "visibility" handling are very hacky. I think for the keyboard handling, the only important tiddlers are |
Beta Was this translation helpful? Give feedback.
-
Since TW 5.1.23 we use |
Beta Was this translation helpful? Give feedback.
-
There are 16 messages, that are handled by the navigator widget. I did create a "test-framework" that will allow us to test the TW code interactively, to make sure, that we don't break things. https://wikilabs.github.io/editions/trigger/ |
Beta Was this translation helpful? Give feedback.
-
As you can see: the which is defined in story.js This dataflow is not as consistent as here, for all of the messages. .. We will need to fix this |
Beta Was this translation helpful? Give feedback.
-
As soon as the program hits this function: https://github.com/Jermolene/TiddlyWiki5/blob/5832002feb2b662d65a8d0a38c1c81a390e03317/core/modules/story.js#L82-L91 The "animation-chane" is triggered with a "store change event" |
Beta Was this translation helpful? Give feedback.
-
may be just a reminder The startup module contains several places, where it deals with the StoryList tiddlers. .. BUT only the default ones are active atm. So we need to think about startup-handling with several stories active at the same tim. |
Beta Was this translation helpful? Give feedback.
-
As written in: #4782 (comment) The HistoryList change triggers the which calls which is implemented with 5 different The default one is title: $:/core/modules/storyviews/classic.js The storyviews are essential, because the do the add/remove/navigate animations, which are also needed by the keyboard handlers |
Beta Was this translation helpful? Give feedback.
-
In the whole navigation process, there are several widgets involved:
IMO we must keep an eye on the great context. Otherwise the implementation will be hacky and will make it even more difficult to fix the navigation mess. |
Beta Was this translation helpful? Give feedback.
-
The linkcatcher is a lightweight (memory / code) widget, that was designed to "trick" the navigator widget. From my point of view it should be used to send the right information to the navigator widget, so it can do its job |
Beta Was this translation helpful? Give feedback.
-
@BurningTreeC .. You may think, that all of this is "overkill". ... I know, but I think it's the big picture, that we have to keep in mind. ... Because if the new StoryKeyboard handling is a hack, IMO it will make it impossible to fix the existing navigation API issues. |
Beta Was this translation helpful? Give feedback.
-
I don't know the keyboard handlers very well. I was happy, that you did all the heavy lifting for the "input / dropdown" navigation. I'll have to dig deeper into the code and the new wikitext, which looks super "complex" to me atm. |
Beta Was this translation helpful? Give feedback.
-
$:/HistoryList
We probably need more info here |
Beta Was this translation helpful? Give feedback.
-
$:/StoryList
|
Beta Was this translation helpful? Give feedback.
-
Active Story
|
Beta Was this translation helpful? Give feedback.
-
@pmario - I DON'T think this is an overkill but I'm missing an overview about the changes you have in mind It would be helpful if you could provide some starting points like "the current story should be stored in a config or state tiddler", "the currently active/selected tiddler should be stored in the $:/HistoryList tiddler". "The problem that arises from that is that ..." I currently find it a bit confusing knowing that you have a clearer picture in your mind than you are depicting here |
Beta Was this translation helpful? Give feedback.
-
Navigate multiple StoriesThe navigator-widget has the following parameters:
story and history are defined whith the widget call in wikitext. The other params should be configurable within the control panel or a different UI @BurningTreeC ... "The other params" may also be important for the global kb-handling |
Beta Was this translation helpful? Give feedback.
-
please @pmario create a SUMMARY of your ideas |
Beta Was this translation helpful? Give feedback.
-
Thanks @pmario it would indeed be useful to have a clear summary of the proposal, and perhaps also to enumerate the requirements the proposal is trying to meet. I'm concerned about the attention to multiple story rivers. That's definitely a feature that we should add to the core, but I'm not sure that we need to be so concerned with it here. This is about maintaining a visible focus which can be moved via the keyboard or mouse, and keyboard actions that apply to the focused element. We definitely need to be able to track the focus moving to elements outside the main story river (eg elements in the menu bar or side bar), but I don't think that those elements would necessarily be tiddlers (or "tiddler frames" to be clearer), nor would they necessarily be in a river. So, there wouldn't be a keyboard shortcut for "edit tiddler", there'd be a keyboard shortcut for "edit current thing" which would adapt according to the element that has the focus. We will need keyboard shortcuts that affect the current story river: the For me, the underpinning for all of this is the browser implementation of focus. As we've discussed before, I think we should enhance the refresh cycle so that it preserves the focussed element, and tracks the focussed element via state tiddlers. When we introduce multiple story rivers we will certainly need state tiddlers to keep track of things like which story river should be used to open new tiddlers, but I'd be hoping we wouldn't need to worry about that yet. |
Beta Was this translation helpful? Give feedback.
-
I think it's much easier than you think. The only thing the global story handling needs to konw is, which is the "target story context" that should be modified. Then it needs to modify the $:/History-xxx tiddler and all the magic should happen automatically. The only difficulties I see, is to combine mouse and keyboard actions. Eg. The user may want to scroll down with the mouse wheel. Then eg: use PageUp key to scroll ti the top if the the "active" tiddler if it is a long tiddler. If the tiddler is short, PageUp should scroll to the top of the previous tiddler. ... and so on. If the mouse wheel is scrolled down or up in the meantime, the focus of the tiddler needs to change. I think ALL if this can be done already with no problems, for the hardcoded single story we have. BUT it gets extreamly hacky as soon as we start to introduce several stories. I'll try to create a prototype, to show what I mean. |
Beta Was this translation helpful? Give feedback.
-
I have a stupid question regarding the preservation of the focused element: I guess we want to do this using |
Beta Was this translation helpful? Give feedback.
-
A little summary of my current state:
What I'm thinking of now is how the mechanism should know which tiddler or element to focus again after the refresh if at the renderTreeFootprint there's no widget anymore |
Beta Was this translation helpful? Give feedback.
-
In #4782 we've discussed broadly the possibility of navigating the story-river using keyboard shortcuts. I'd like to move the discussion here, so that we can gather ideas for 5.1.24 or one of the next releases to tackle this
Beta Was this translation helpful? Give feedback.
All reactions