Redoing Undo?
Marco Bonardo
mbonardo at mozilla.com
Thu Oct 27 09:16:28 UTC 2016
On Sat, Oct 22, 2016 at 10:48 PM, Perry Wagle <wagle at mac.com> wrote:
> My personal focus is on undoing edits to the places database, but I might
> need to generalize a bit.
>
We already support undoing bookmark edits through the Places transaction
manager, and we actually also have 2 implementations of it, since we never
completed the removal of the synchronous one. The old one (in use) is in
PlacesUtils (at the bottom) the new one (not in use yet) is in
PlacesTransactionManager.jsm
In June, the cancel button was removed from the individual bookmark
> editor. I looked somewhat carefully at the code today and it doesn’t look
> to me like the code supporting the cancel button was removed, just the
> button itself. I have an extension that permits you to resize that dialog
> window (its not resizable by default), and I can modify it to re-add the
> button, if I am correct.
>
Yes, the Places transaction manager is still there and works properly from
the Library window, any bookmark change can be done, undone and redone.
It's possible to create batched transactions that include multiple single
changes too.
The button removal was an explicit UX choice to simplify the dialog, and if
this is what you want to undo, you should first speak with the team that
originally worked on that removal, otherwise you'd just be doing a bunch of
work that risks to be rejected.
> First problem with this (advanced users only!) is that y’all might decide
> its dead code and remove it. To head that off, I’d like to fix rollbacks
> in general. So here I am, asking for what other people want from it.
>
I don't think the Places transaction manager itself is going anywhere, the
long term scope is to replace the current synchronous one with the
70%-complete asynchronous one, but that's it.
> Second problem is that no-one believes in tags. That's because, by
> default, using tags is horrible. The editor window is too small and
> unresizable, the tag list changes width as you scroll it, etc. With my two
> extensions, tags are now (with ESR45) quite useful, and you can have
> minutes long sessions editing tags, making cancel a necessity. Complex
> tagging requires undo and cancel, the subject of this note.
>
And that's already possible through the transaction manager. As you said
though the UI is horrible, I agree. Nobody every worked on making tags a
first citizen and the bookmarking UI didn't change for years. We don't have
a plan atm, nor a great or dead decision for tags. We have pressure for a
web-ext supporting tags though, and that may change things a bit.
If you want to work with our UX on ideas to improve tagging and implement
them, I think that'd be fine.
> I have a complex vision of what I want rollbacks to do. Including in a
> parallel environment. To solidify that vision, I need to see what I can do
> with the actual code, and to find out what other people need and want. One
> thing is that I want to know what an rollback is going to do before I do it.
>
It is technically possible to associate a string to each transaction, but
that introduces localization problems that we never resolved, cause the
undo/redo label should be localized and it's in a menupopup so it shouldn't
grow too much and all those small edge problems.
> Problems I hope to fix in the near term are (1) undo in the individual
> bookmark editor barely works at all, (2) advanced users of tags would want
> cancel, (3) you can’t tell what undo is doing in the edit-all-bookmarks
> window.
>
1) and 2) are things you should discuss with the UX team and more
specifically with the team who worked on the bookmarks dialog
simplification. Just going against what they did won't work, if you try to
cooperate with them you may get better results
3) is https://bugzilla.mozilla.org/show_bug.cgi?id=451310. I'd have nothing
against fixing this, provided localization can be done properly. The other
problem is that, as I said, we are in a no-so-nice code situation at the
moment cause we have 2 parallel codebases and both will have to be updated.
I hope we can restart work on the async transaction manager and finally
remove the old one in the near future.
In the farther term, I’m working on ways to automate correction of errors
> and typos. Cancel was my primary tool for eliminating them (empirically,
> it takes me a month instead of a week to not make errors in the first
> place, and thats very nerve-wracking). I will be able to do better than
> that.
>
Ideas are welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20161027/9b961b10/attachment.html>
More information about the firefox-dev
mailing list