@Souk21 welcome to the group and thank you for sharing!

I will take a detailed look later and will provide feedback, I too prefer 
keyboard based solutions later.
On the technical side if you have specific questions, feel free to post a 
list. 
State in TW plugins is managed via tiddlers, usually $:/state/* tiddlers

Note that there is a pull request that will hopefully be merged for the 
next version of TW, that adds keyboard support to the search field and the 
tag picker. Might be some useful code and patterns to look at and learn 
from there.

https://github.com/Jermolene/TiddlyWiki5/pull/4458

Demo: http://tag-picker-kb.tiddlyspot.com/

Regards,
Saq

On Wednesday, June 10, 2020 at 7:31:24 PM UTC+2, Souk21 wrote:
>
> Hello everyone!
>
>
> I discovered TiddlyWiki a couple weeks ago, and I set myself to use it for 
> note taking.
> I really enjoy the trip so far, it really is a interesting piece of 
> software.
> The only thing missing for me is a proper way to search with the keyboard 
> only.
>
> There’s a shortcut to focus the search field, but unfortunately, you can’t 
> navigate the results with the arrows, and you can’t close the dropdown with 
> escape.
>
>
> I looked around for a plugin, but I wasn’t able to find any that worked 
> for me.
> So, in a tiddlywiki mindset, I decided to try and make my own.
> I took a lot of inspiration from VSCode command palette.
> By default you open it with Ctrl+P, but you can change the shortcut from 
> the tw settings
> You can search tiddlers by text or with a filter expression, search tags, 
> list all tiddlers with a tag,...
> If you type ‘>’ you enter the ‘command’ mode and you can select (or 
> search) from a list of commands.
> You can access help if you type '?'
>
>
> I tried to make it the more customizable I could, there’s still work but 
> it’s already quite customizable. Most of the commands are only tiddlers!
> It’s a prototype, and my first tw plugin as well, so obviously the code is 
> a mess! It could have unexpected behavior (most probably does) and you 
> shouldn’t use it in your own wikis yet!
>
>
> I tried my best, but for now, the plugin is not really working as tw 
> expects plugins to.
> The plugin always returns ‘refresh=false’ and manages his own DOM itself, 
> storing state inside of it in the way.
> I was not sure where to ‘instantiate’ the view, so for now I’m using 
> $:/View/AboveStory which I believe is not ideal.
> So yeah, really not the tw way.
>
>
> There are still some other problems, I’m not sure how to escape a filter 
> operation parameter for example so the search sometimes returns errors
>
> Obviously it’s not really optimized yet either.
>
> I do plan to fix it and include more features (I still have a tiddler full 
> of ideas)
>
>
> I’m posting here to see what people think of this prototype and if there’s 
> any interest in such a plugin.
>
> If so, I’m probably gonna need some guidance into how things are supposed 
> to work so I can make it work more nicely with tw.
>
> Considering the state of the project, I didn’t take the time to write any 
> doc yet.
>
> You can demo it here : https://souk21.github.io/TW-commandpalette/
>
> Let me know :)
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8275fce4-44bb-48b5-a129-ad908d31e675o%40googlegroups.com.

Reply via email to