saqimtiaz / streams

TiddlyWiki plugin for rapid data entry with a keyboard driven workflow. Divide content into smaller tiddlers as you write.
BSD 3-Clause "New" or "Revised" License
58 stars 8 forks source link

Feature request: return on empty node should delete the node #3

Closed hanspinckaers closed 4 years ago

hanspinckaers commented 4 years ago

Hi Saq,

I'm really enjoying Streams in my own tiddlywiki! However, sometimes I want to do a quick edit on my mobile phone. Since I cannot press keyboard shortcuts on my smartphone, I can't 'exit' edit mode.

Would it be an idea to cancel edit mode by pressing return on an empty node? Thus pressing return twice in a row.

Kind regards, Hans

saqimtiaz commented 4 years ago

@HansPinckaers that seems sensible. Escape on an empty node deletes the node and exits edit mode. Enter could behave similarly on an empty node.

I'll give this some more thought to make sure it wont clash with anything, before implementing in the next version of Streams. Thank you for the suggestion.

jdjdjdjdjdjd commented 4 years ago

Return key twice to exit is good enough on its own, I think.

My suggestion is not an alternative to the above but in addition to!

Often, when I finish editing text in tiddlywiki, I click outside the textarea to dismiss the keyboard. Will it also be a good idea for this action (tapping outside the textarea, or any event that causes the textarea to lose focus on mobile) to automatically close editting?

Although this will be a nice experience for me (I'd love it, in fact), I wonder if there are other users who might like to leave the textarea open while, for example, navigating to another tiddler for some reference.

saqimtiaz commented 4 years ago

@jdjdjdjdjdjd I considered that but as you said, it wont fit everyone's workflow.

A common use case for me is to go from a node I am editing, to opening another node for editing or just another tiddler, to copy some text from there.

jdjdjdjdjdjd commented 4 years ago

That most definitely also happens with me.

I guess closing on lost focus will only make sense if, just as well, a single click will open the node to edit. But this kind of interactability might not be a good compromise for tw! It will make the user assume the stream and nodes are all one large tiddler whose text is being editted. And of course, links and buttons within the text will be invalidated.

So yeah, double-return to close might be a good solution on its own ^^,

On Fri, Aug 14, 2020, 03:43 saqimtiaz, notifications@github.com wrote:

@jdjdjdjdjdjd https://github.com/jdjdjdjdjdjd I considered that but as you said, it wont fit everyone's workflow.

A common use case for me is to go from a node I am editing, to opening another node for editing or just another tiddler, to copy some text from there.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saqimtiaz/streams/issues/3#issuecomment-673674192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAU6MS2TDG52ZDYR474L4LSAQ65BANCNFSM4PXK2GNA .

saqimtiaz commented 4 years ago

This is now implemented as of version 0.1.13 as a configuration option.

Set $:/config/sq/streams/exit-on-saving-empty-node to yes to enable this behaviour.