Fix MenuItem hover state when external links are followed#22702
Conversation
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
4c17ac2 to
ef8bdf8
Compare
|
@aimane-chnaif I'll be finishing the PR Author Checklist tomorrow, as it's getting late here, but I think the PR is ready for the first round of review |
|
@aimane-chnaif Checklist complete, waiting for your review 🙂 |
|
@cubuspl42 please use this approach, not introducing new state: |
|
@aimane-chnaif You're right, it's cleaner this way! Done. |
|
@aimane-chnaif Ping 🙂 |
|
BUG: Screen.Recording.2023-07-13.at.4.29.33.PM.movSwitch tab using keyboard short cut (Ctrl+Tab, Ctrl+Shift+Tab) |
|
@aimane-chnaif Well, this is a corner case that's difficult to handle correctly. What level of perfection are we aiming at? If the cursor is actually not moving after switching back to the original tab, I don't think it's possible to handle this using the DOM API. We could try to get the mouse position from the first What do you think? |
|
As you see my video, item is not highlighted even on mouse move |
|
@aimane-chnaif I know, I'm aware. I'm asking about what we're aiming at. From my perspective it's about cost/effort ratio and what's possible. Did you encounter the mentioned case in organic usage, or were you trying to produce it? I'm wondering if this isn't a corner case that will be encountered very, very rarely. |
|
yes, I agree it's extreme edge case. @jasperhuangg what do you think? |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroid |
aimane-chnaif
left a comment
There was a problem hiding this comment.
@jasperhuangg all yours about this concern
|
@jasperhuangg Friendly ping 🙂 |
|
@aimane-chnaif I think it's fine if we don't address that, that seems like an extreme corner case, and this issue itself honestly is already kind of an extreme corner case. @cubuspl42 conflicts |
|
@jasperhuangg Solved |
|
@jasperhuangg looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 1.3.42-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.42-26 🚀
|
Details
Hoverableto unhover when the document visibility becomes 'hidden'HoverableinMenuItemfor managing the hover stateFixed Issues
$ #18675
PROPOSAL: #18675 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
macos-chrome-follow-external-link-1.mp4
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android