Replies: 5 comments 1 reply
-
What would you like to do with those hooks? ... At the moment, the philosophy is, that hooks only get added, if either the core needs and uses it or if there are some strong arguments from plugin-authors. "Because we can" ... wouldn't make much sense, because it makes the core code more complex, without a real immediate benefit. ... As you can see at the existing hooks, they have different return values and even the "function signature" is different for some of them. ... So they are probably more "opinionated" as they should be. ... That's the way how the system has "grown" over time. ... |
Beta Was this translation helpful? Give feedback.
-
That's a fair question - here are two examples of plugins I've been thinking this would be useful for:
I can, of course, make use of the
I think you have a really good point here - if hooks were extended to include close others/close all, the interface would have to be chosen carefully. |
Beta Was this translation helpful? Give feedback.
-
The biggest problem with hooks is that they are tied to TiddlyWiki's JavaScript implementation. Our long term roadmap is to migrate the implementation of TiddlyWiki's high level features to wikitext, so that they can be more easily understood and hacked by end users. For example, I've been exploring a wikitext implementation of the navigator widget in TWPub. These wikitext implementations also need to be extensible, but the mechanisms will need to be different. With that in mind, I wonder if we might think about another approach to the OP here. As you mention, the desired functionality could in principle be obtained by monitoring changes in the story list tiddler. So, we could try to make a general purpose low level mechanism that would help us do that. One way of approaching it might be a mechanism that monitors the results of a filter over time, and invokes action strings as items are added or removed from the results. These observable filters might be defined by tiddlers with a tag like |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks for the additional context @Jermolene! I'd be content with a wikitext-based solution, as long as I can consistently respond to closing tiddlers, and that "observable filter" idea sounds like it would fit the bill 🙂 |
Beta Was this translation helpful? Give feedback.
-
Rather than hooks although I see no harm in them I think we should lead with the tiddlywiki way first.
My earlier proposal needs some developer support (although not much) to introduce actions to any button via tags. As demonstrated here https://all-button-actions.tiddlyhost.com/ If you were to use the above solution it would be a matter of writing a tiddler containing the "additional" actions and tagging it with both $:/core/ui/Buttons/close-all |
Beta Was this translation helpful? Give feedback.
-
Hello!
I noticed that while closing a single tiddler fires a
th-closing-tiddler
hook, the "close others" and "close all" actions don't seem to fire any hooks. Would it make sense to add hooks for these actions as well? If so, I wonder whether having distinctth-close-others
andth-close-all
hooks would make sense, or just having those actions fire repeatedth-closing-tiddler
hooks (which of course would have implications around the event parameter passed to hook functions and those functions' return values)Beta Was this translation helpful? Give feedback.
All reactions