-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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