Open jancborchardt opened 12 years ago
Several of the buttons don't rely on text being highlighted so I don't think I am behind removing it altogether. If you can come up with a way to always accurately know when text is selected or not we could look into hiding unusable buttons.
Actually only the »remove formatting« one relies on text being highlighted. But my point is not what technically makes sense, but what people expect. Just clicking somewhere and then choosing »Bold« is not how people format text I’d say.
The biggest point though is that the widget is obtrusive when writing something – the main use case for clicking somewhere. Also for simplicity sake this is an either-or choice: either the widget does not show at all when you just click somewhere (as opposed to hiding some buttons), or all the buttons are shown. Your call.
If the editor doesn't show on click, when does it show? Buttons like 'save', 'ordered-list', and 'unordered-list' need to be shown whenever the editable area has focus.
When something is selected. Like PopClip or iOS.
Regarding ol & ul: Why do these always need to show? The case of clicking somewhere not wanting to format it as list (for instance, to just type) is far bigger than when you actually want to format something as a list – in which case it’s ok to just mark the lines and then format them.
Regarding save I’m a bit confused that Etch has this functionality at all. Where does it save to? (What does the user expect, I mean.) As user data is the most important thing and also lots of other apps increasingly do it like that, saving should simply be automatic, wherever it saves to (localStorage I assume).
ol and ul don't work on selection but on the block of text the cursor is in. The most common use case for creating a list is when nothing is selected at all and you are on a new line. I guess the greater issue is that I don't find the editor annoying and there also doesn't seem to be a time when no buttons need to be shown.
Since etch was built for backbone apps the save button triggers a save event on the model so you can save your state to the server. Save on blur was originally a feature of etch but we found that the writers were constantly clicking off the area to do incremental saves so we added a save button to make it easier.
Lists: Yes, lists are a bit of a corner case here. What about they work on the block of text the selection is in? Regarding common cases, I wasn’t talking about common cases relative to list editing, but seen absolutely regarding writing.
Obtrusive editor: Do you use Etch daily for writing? When every time you click somewhere to write something, the editor shows, it will get pretty old after some time. Most of the time with text is spent writing, not formatting.
Saving: Sure, save on blur will trigger people blurring all the time to make sure stuff is actually saved. That’s not what I mean by automatic. Automatic would be like Etherpad does – I’m not sure how exactly, but I assume every few seconds, every few keystrokes, and also checking to save before the app gets closed.
The basic question: What should Etch do?
I’d say to get out of your way when writing and give you the tools you need when you need them. Sure, the editor is for formatting – but that is only the means to the end of writing. And the means should not obstruct the ends.
But as I said, your project, your call. :)
While I don't use etch for writing daily I've had a whole team of writers using etch for months and never got a complaint about the editor being annoying. With that said I understand your argument but I'm not sure there is a good way to have etch always know when it should be there. If you feel otherwise I'm happy to consider it if you can prove it with code.
Some formatting stuff only makes sense when actual text is selected. That is Bold, Italicize, Underline, Link, remove Formatting – they should only be shown when text is selected, not when the cursor is moved somewhere.
In fact, to make everything less obtrusive I’d advise to only ever show the widget if text is selected as it rarely makes sense when nothing is selected but is pretty annoying when wanting to write something.