<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 22, 2016 at 10:48 PM, Perry Wagle <span dir="ltr"><<a href="mailto:wagle@mac.com" target="_blank">wagle@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
My personal focus is on undoing edits to the places database, but I might need to generalize a bit.<br></blockquote><div><br></div><div>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<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

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.<br></blockquote><div><br></div><div>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.<br></div><div><br>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.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

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.<br></blockquote><div><br></div><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

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.<br></blockquote><div><br></div><div>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.<br></div><div>If you want to work with our UX on ideas to improve tagging and implement them, I think that'd be fine.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

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.<br></blockquote><div><br></div><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

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.<br></blockquote><div><br></div><div>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<br><br></div><div>3) is <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=451310">https://bugzilla.mozilla.org/show_bug.cgi?id=451310</a>. 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.<br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

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.<br></blockquote><div><br></div><div>Ideas are welcome. <br></div></div></div></div>