Closed
Bug 983623
Opened 10 years ago
Closed 10 years ago
Async transactions: Add a preference for turning it, implement undo & redo commands
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
VERIFIED
FIXED
Firefox 31
Tracking | Status | |
---|---|---|
firefox31 | --- | fixed |
People
(Reporter: asaf, Assigned: asaf)
References
Details
(Whiteboard: p=3 s=it-31c-30a-29b.2 [qa-])
Attachments
(3 files, 1 obsolete file)
10.63 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
3.66 KB,
patch
|
Details | Diff | Splinter Review | |
1.42 KB,
patch
|
Details | Diff | Splinter Review |
While reading the browser/ part, keep in mind that my goal is to have the final "remove old PTM" patch a code-removal-only patch (well, as much as possible).
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8391159 -
Flags: review?(mak77)
Updated•10 years ago
|
Blocks: PlacesAsyncTransact
Comment 2•10 years ago
|
||
Comment on attachment 8391159 [details] [diff] [review] implementUndoRedo.diff Review of attachment 8391159 [details] [diff] [review]: ----------------------------------------------------------------- r=me with these comments addressed ::: browser/components/places/content/controller.js @@ +123,5 @@ > return (aCommand.substr(0, CMD_PREFIX.length) == CMD_PREFIX); > }, > > isCommandEnabled: function PC_isCommandEnabled(aCommand) { > + if (PlacesUIUtils.asyncTransactions) { i initially though this was a shortcut to the transactions module... what about .useAsyncTransactions instead? ::: browser/components/places/src/PlacesUIUtils.jsm @@ +1023,5 @@ > }); > > +XPCOMUtils.defineLazyGetter(PlacesUIUtils, "asyncTransactions", function() { > + try { > + return Services.prefs.getBoolPref("browser.places.asyncTransactions"); ditto, also useAsyncTransactions in the pref. ::: toolkit/components/places/PlacesTransactions.jsm @@ +185,5 @@ > return; > } > } > this._undoPosition++; > + //updateCommandsOnActiveWindow(); why is this commented out? @@ +214,5 @@ > return; > } > } > this._undoPosition--; > + //updateCommandsOnActiveWindow(); ditto ::: toolkit/components/places/tests/unit/test_async_transactions.js @@ +121,2 @@ > > + let check_entry_throws = (f) => { no need to wrap f with parentheses
Attachment #8391159 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/f36879704e4d
Target Milestone: --- → Firefox 30
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f36879704e4d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•10 years ago
|
||
Sigh, I missed the most important bit here... doCommand.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•10 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Blocks: fxdesktoptriage
Updated•10 years ago
|
Whiteboard: p=0
Updated•10 years ago
|
Whiteboard: p=0 → p=3
Updated•10 years ago
|
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8402565 -
Flags: review?(mak77)
Comment 8•10 years ago
|
||
Comment on attachment 8402565 [details] [diff] [review] the missing bits Review of attachment 8402565 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the following comments addressed. What's the testing plan for this, shouldn't we have a mochitest checking it's working? do you have a plan to convert existing tests later? ::: browser/components/places/content/controller.js @@ +225,5 @@ > case "cmd_undo": > + if (!PlacesUIUtils.useAsyncTransactions) > + PlacesUtils.transactionManager.undoTransaction(); > + > + PlacesTransactions.undo().then(null, Cu.reportError); shouldn't you if/else, or early bailout? as it is, it's going to execute both... @@ +231,5 @@ > case "cmd_redo": > + if (!PlacesUIUtils.useAsyncTransactions) > + PlacesUtils.transactionManager.redoTransaction(); > + > + PlacesTransactions.redo().then(null, Cu.reportError); ditto
Attachment #8402565 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 9•10 years ago
|
||
I'm going to file a bug for fixing the current set of tests to work in this environment (the problem here is that doCommand will work asynchronously, but it cannot return a promise or call a callback) and add tests for anything that's missing. I'm going to do all of that in a single bug though, and only after we're done with the very initial implementation.
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/3fbf2620c5de
Target Milestone: Firefox 30 → Firefox 31
Comment 11•10 years ago
|
||
(In reply to Mano from comment #10) > https://hg.mozilla.org/integration/fx-team/rev/3fbf2620c5de sorry had to back this out for problems like https://tbpl.mozilla.org/php/getParsedLog.php?id=37422304&tree=Fx-Team
Assignee | ||
Comment 12•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/c2a2aa6a47a3
Attachment #8402565 -
Attachment is obsolete: true
Assignee | ||
Comment 13•10 years ago
|
||
oops, i included PlacesUtils twice :(
Assignee | ||
Comment 14•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/98b10e3c554d
Comment 15•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c2a2aa6a47a3 https://hg.mozilla.org/mozilla-central/rev/98b10e3c554d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Comment 16•10 years ago
|
||
Hi Anthony, can you review to determine if this resolved bug requires further verification. Thanks.
Flags: needinfo?(anthony.s.hughes)
Whiteboard: p=3 → p=3 s=it-31c-30a-29b.2
Comment 17•10 years ago
|
||
Mano, what manual testing does this need? Does this have automated tests? If not, does it need them? Thanks.
Flags: needinfo?(anthony.s.hughes) → needinfo?(mano)
Whiteboard: p=3 s=it-31c-30a-29b.2 → p=3 s=it-31c-30a-29b.2 [qa?]
Assignee | ||
Comment 18•10 years ago
|
||
As I said in few other places, there's nothing worth manual testing until the initial implementation is complete (that is, the entire UI feature set is reimplemented with the new async TM). We're not there yet (the work is tracked in bug 979280). Before enabling the feature on trunk we're going to introduce some automated tests for the UI actions which are affected by the new TM. I'm going to file a bug tracking that work soon.
Flags: needinfo?(mano)
Comment 19•10 years ago
|
||
Okay, thanks for your help.
status-firefox31:
--- → fixed
Whiteboard: p=3 s=it-31c-30a-29b.2 [qa?] → p=3 s=it-31c-30a-29b.2 [qa-]
Updated•10 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•