Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use save modal with editor #2900
With this, every single save action causes the entire window to blink/flash, even if it completes "instantly". I don't like that. This is a strange behavior for a text editor.
(If I haven't added remotes, it should "just save" with no dialog. If I have, then and only then it makes sense to show the progress of those downloads.)
While I can see your point and I have some ideas on how to implement those checks (may require reworking of
I suppose we could mark it clean before the save and mark it dirty if there's an error. But that might also seem like bad UX.
A "normal" editor I think always assumes that a filesystem write is always fast. It doesn't have to plan to remotely download things over the internet as part of a save action. I can't think of another text editor that ever has any kind of progress/dialog as part of a save action, that I've used. (Also, neither VM nor TM do this.)
I think the simplest (best?) solution would be to delay showing the modal for some amount (100ms?) of time. Enough that we expect that a plain save (no new remotes to download) will always have passed. If that has passed and we're still saving, then show the dialog with its progress bar. If not, just never show the dialog. Either way, mark clean only when save has finished.
It's not too complicated on top of that to track clean/dirty of parallel save and edit actions. Just a few cases to design in.