Closed
Bug 1121631
Opened 9 years ago
Closed 9 years ago
Refactor shortcuts with a known shortcut lib to make them more maintainable
Categories
(Tree Management :: Treeherder, defect, P5)
Tree Management
Treeherder
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jfrench, Assigned: jfrench)
References
()
Details
Attachments
(1 file, 3 obsolete files)
This was raised in the mtg last week by Mauro. We'd like to have clearer code for shortcuts, rather than extensively relying on ev.keyCode and the complex unused modifier key suppressions required. As a by-product this will also be used to fix bug 1118342. Some of the candidates were: Angular (syntax seemed less clear to me) https://github.com/chieffancypants/angular-hotkeys Shortcuts.js (unclear to me if supported some treeherder functionality) http://www.openjs.com/scripts/events/keyboard_shortcuts/ jKey (same as above) https://github.com/OscarGodson/jKey Mousetrap.js (clear and seems like it does what we need, apache2.0 license) http://craig.is/killing/mice https://github.com/ccampbell/mousetrap I went with mousetrap.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → tojonmz
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Please see above for PR and review.
Attachment #8549120 -
Flags: review?(cdawson)
Comment 2•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/treeherder-ui https://github.com/mozilla/treeherder-ui/commit/414c016ae5eb722d1949dafada0db2262498d8a9 Bug 1121631 - Implement moustrap shortcuts https://github.com/mozilla/treeherder-ui/commit/40f734ba4b17c69957068a27e4453183fe1577d5 Merge pull request #338 from tojonmz/mousetrap-shortcuts Bug 1121631 - Implement moustrap shortcuts
Updated•9 years ago
|
Attachment #8549120 -
Flags: review?(cdawson) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Marking fixed per above merge. Will re-test on stage/prod.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 4•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder-ui https://github.com/mozilla/treeherder-ui/commit/5b7a5267d36c985fb67e94ee18cb79a557175530 Revert "Bug 1121631 - Implement moustrap shortcuts"
Comment 5•9 years ago
|
||
I've reverted this since Ryan was having issues too (alongside philor). I'll let them add STR, since we were unable to repro with the prior STR, so there may be a step missing.
Status: RESOLVED → REOPENED
Flags: needinfo?(ryanvm)
Flags: needinfo?(philringnalda)
Resolution: FIXED → ---
Comment 6•9 years ago
|
||
1. Load https://treeherder.mozilla.org/ui/#/jobs?repo=mozilla-inbound 2. Click absolutely any job of any color. 3. Hit space to pin and open the pinboard (this is apparently the one critical step, you need to not open it by either typing c or by clicking the pin icon) 4. Click in the comment field. 5. Hit space, notice that you don't get a space in the comment field. (6. Bonus fun, then hit u and notice that you both get a u in the comment field and also toggle unstarred.)
Flags: needinfo?(philringnalda)
Comment 7•9 years ago
|
||
Also, the lag when hitting 'u' to go into onlyunstarred mode was very noticeable :(
Flags: needinfo?(ryanvm)
Comment 8•9 years ago
|
||
That's helpful, thank you :-)
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Phil Ringnalda (:philor) from comment #6) > 4. Click in the comment field. > 5. Hit space, notice that you don't get a space in the comment field. I assume the shortcut keys(like space) need a similar Mousetrap.unbind on click, or similar. I don't have any explanation on the lag hitting 'u' at this time. It always seemed slow to me, prior to the change.
Assignee | ||
Comment 10•9 years ago
|
||
I now have the shortcut keys being unbound on click in a local branch. So philor's workflow seems to work fine. I can see the lag in 'u' now. It was also slow on production prior, due to an unrelated change. I'm looking into that 'u' lag now.
Assignee | ||
Comment 11•9 years ago
|
||
Still tracing the 'u' shortcut slowdown. Attaching a wip just for safekeeping, which contains everything else. The patch also includes the mousetrap refactor for dewgeek's bug 1089737, which I anticipate will land before this work.
Assignee | ||
Comment 12•9 years ago
|
||
Latest wip patch for safekeeping, latest rebase, minor tweaks. 'u' now seems a reasonable speed. But still an issue to be sorted, an ambiguous toggle state after idle/load.
Attachment #8554218 -
Attachment is obsolete: true
Assignee | ||
Comment 13•9 years ago
|
||
I think I have everything sorted now. PR coming up after I've re-tested everything a final time.
Assignee | ||
Comment 14•9 years ago
|
||
Please see above PR for status and review.
Attachment #8549120 -
Attachment is obsolete: true
Attachment #8561089 -
Attachment is obsolete: true
Attachment #8565082 -
Flags: review?(cdawson)
Comment 15•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/treeherder-ui https://github.com/mozilla/treeherder-ui/commit/fea2e84c2aff290e1dc8b4cbb892d997917f255f Bug 1121631 - Implement moustrap shortcuts https://github.com/mozilla/treeherder-ui/commit/c30fd092f3f80847d856930d57530051360e9fdb Merge pull request #368 from tojonmz/mousetrap-shortcuts-refactor Bug 1121631 - Implement moustrap shortcuts
Assignee | ||
Comment 16•9 years ago
|
||
So I've re-tested this on dev, and the other workflows (ctrl+enter to save while mid-comment, ctrl+shift+u to clear-all while mid-comment) and the responsiveness and performance seems normal. If any of the Sheriffs could have a bash at all their favorite shortcuts and workflows on dev, that would be awesome before we push to stage.
Flags: needinfo?(wkocher)
Flags: needinfo?(ryanvm)
Flags: needinfo?(philringnalda)
Comment 18•9 years ago
|
||
Seems fine for the couple minutes I played with it. Seems more likely that any issues are more likely to shake out after it lands in production, though.
Flags: needinfo?(ryanvm)
Seems to work as expected, but I agree with Ryan.
Flags: needinfo?(wkocher)
Assignee | ||
Comment 20•9 years ago
|
||
We have pushed to stage, and all the shortcuts also appear to be working correctly there. We should be pushing to prod within a few hours I believe.
Assignee | ||
Comment 21•9 years ago
|
||
We pushed to prod about a half hour ago, and all shortcuts still appear to be working correctly and consistent with stage.
Assignee | ||
Comment 22•9 years ago
|
||
We seem to have positive reviews from sheriffs on production, so I'm tentatively marking this fixed for now :) I will mark as verified once it has lived on production for a few more days.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Attachment #8565082 -
Flags: review?(cdawson) → review+
Assignee | ||
Comment 23•9 years ago
|
||
The refactor has lived on production for about three days with heavy sheriff use, so I'm willing to mark this bug verified fixed :)
Status: RESOLVED → VERIFIED
Comment 24•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/aa4b013715726d63d27ca46105383e59646de5cb Bug 1121631 - Implement moustrap shortcuts https://github.com/mozilla/treeherder/commit/9e1c620a4ca61d7ad2e99122fd5a344321743530 Merge pull request #338 from tojonmz/mousetrap-shortcuts Bug 1121631 - Implement moustrap shortcuts https://github.com/mozilla/treeherder/commit/a8e784b9812615be68cac1278ca1f17fc54fa193 Revert "Bug 1121631 - Implement moustrap shortcuts" https://github.com/mozilla/treeherder/commit/bb7028a606eb06085a3fa3b2dcbe845e752a13de Bug 1121631 - Implement moustrap shortcuts https://github.com/mozilla/treeherder/commit/6aa1a58648a720cf25f4e86b023d3f9dc6d63476 Merge pull request #368 from tojonmz/mousetrap-shortcuts-refactor Bug 1121631 - Implement moustrap shortcuts
You need to log in
before you can comment on or make changes to this bug.
Description
•