Fix: Focus mode - User priority mode is switched back to focus automatically#35362
Conversation
|
@cubuspl42 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] |
|
Please merge |
Isn't "Open any chat" a required step after "Change the priority mode to Most recent" to reproduce the original issue? |
|
What are the affected platforms of the issue we're fixing? |
|
@cubuspl42 Don't we need the precondition? |
I gotta say all platforms |
We do, I didn't mean to remove anything from the steps. I was under an impression that we need the mentioned extra step to reproduce the bug. And the tests should ensure that the bug is not reproducible under the conditions that used to trigger it. It's not an achievement not to trigger a bug under circumstances that didn't trigger it before; you get it. |
Were you able to reproduce it on Android? I know that fixing the bug is more important than analyzing it, but before verifying that we fixed something, I often start with ensuring that I can actually trigger the bug to reduce the chance of performing leaky testing steps. |
|
@cubuspl42 I still can reproduce it on Android. I believe this bug happens on all platforms. As I mentioned on the PR description, we can use this way to reproduce the bug.
|
|
We're over 1000 commits behind |
What does "reload page" mean on Native? Metro reload? |
|
On top of
let currentUserAccountID: number | undefined | null;
Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (val) => {
currentUserAccountID = val?.accountID;
},
});
// I added this line:
Onyx.set(ONYXKEYS.NVP_TRY_FOCUS_MODE, false);Test on Android: Native: focus-mode-issue-repro-problem-1-android-compressed.mp4Please note that I started with reloading Metro. I cannot reproduce the issue. What am I doing wrong? |
|
@cubuspl42 We need to update the steps a bit because BE returns
Screen.Recording.2024-02-15.at.14.32.41.mp4 |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeprevent-focus-mode-switch-android-compressed.mp4Android: mWeb Chromeprevent-focus-mode-switch-android-web-compressed.mp4iOS: Nativeprevent-focus-mode-switch-ios-compressed.mp4iOS: mWeb Safariprevent-focus-mode-switch-ios-web-compressed.mp4MacOS: Chrome / Safariprevent-focus-mode-switch-web-converted.mp4MacOS: Desktop |
|
✋ 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/luacmartins in version: 1.4.43-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.43-20 🚀
|
Details
Fixed Issues
$ #34814
PROPOSAL: #34814 (comment)
Tests
Precondition: Must be reproduced in a user who switched to Focus mode before the 'auto-switch to Focus mode' was added
Note: On dev environment, we can manually set
Onyx.set(ONYXKEYS.NVP_TRY_FOCUS_MODE, false)(E.g. In PriorityMode.ts), so when we reload the page, it'll be set to falseOffline tests
Same as above
QA Steps
Precondition: Must be reproduced in a user who switched to Focus mode before the 'auto-switch to Focus mode' was added
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 */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
Android: Native
Screen.Recording.2024-01-30.at.15.08.55.mov
Android: mWeb Chrome
Screen.Recording.2024-01-30.at.15.04.38.mov
iOS: Native
Screen.Recording.2024-01-30.at.15.06.57.mov
iOS: mWeb Safari
Screen.Recording.2024-01-30.at.14.59.40.mov
MacOS: Chrome / Safari
Screen.Recording.2024-01-30.at.14.44.49.mp4
MacOS: Desktop
Screen.Recording.2024-01-30.at.14.54.49.mp4