-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Hmm it is not here error appears briefly when enabling workflows #40219
Hmm it is not here error appears briefly when enabling workflows #40219
Conversation
@hungvu193 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] |
@hungvu193 |
BUG: Enable policy makes NotFound screen shows. Reproduce steps are in the video, or just create a ws offline, turn on Workflows, go online and reload the page. Screen.Recording.2024-04-15.at.09.44.30.mov |
I would like to ask about the second case that you described
It looks as expected
In the sense that when we create a workspace offline
And then turn on the Internet and immediately reload the page
Our request to enable this feature will not be completed because it was in the queue Should we handle such cases?) I fixed the bug ) And a little explanation The same thing happens on main |
I actually waited for all the requests to be called, so this is valid bug I believe. I didn't reload the page immediately. Screen.Recording.2024-04-16.at.10.17.32.mov |
src/libs/actions/Policy.ts
Outdated
@@ -3919,7 +3919,9 @@ function navigateWhenEnableFeature(policyID: string, featureRoute: Route) { | |||
new Promise<void>((resolve) => { | |||
resolve(); | |||
}).then(() => { | |||
Navigation.navigate(featureRoute); | |||
setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any other solution for this? We avoid using setTimeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the problem I described here
And this problem is mentioned here
App/src/libs/actions/Policy.ts
Lines 3915 to 3918 in 268b870
/** | |
* The app needs to set a navigation action to the microtask queue, it guarantees to execute Onyx.update first, then the navigation action. | |
* More details - https://github.com/Expensify/App/issues/37785#issuecomment-1989056726. | |
*/ |
It's still reproduce (even on main branch )
When we navigate
We have cases when isFeatureEnabled equals false for a couple of milliseconds
So why don't we make the navigation happen after the switch animation ends?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's take a look at my video, I posted. I waited for all the request were called, so why are you saying that
Our request to enable this feature will not be completed because it was in the queue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry
My fault, I didn't notice that you waited for all the request were called
In this case, I fixed the cases you described )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think your explanation here is correct. Let's discuss our situation here, all APIs were called and we still saw the NotFound screen. That shouldn't happen and I think we can avoid using timeout to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to fix a specific case with these changes
When, after enabling a feature, we navigate immediately
That Onyx.update sometimes does not change the value immediately
As result we have NotFound for a couple of milliseconds
I think problem related with Promise which we use
App/src/libs/actions/Policy.ts
Lines 3915 to 3921 in 268b870
/** | |
* The app needs to set a navigation action to the microtask queue, it guarantees to execute Onyx.update first, then the navigation action. | |
* More details - https://github.com/Expensify/App/issues/37785#issuecomment-1989056726. | |
*/ | |
new Promise<void>((resolve) => { | |
resolve(); | |
}).then(() => { |
But so as not to cause regression
I was thinking of using setTimeout inside Promise
To be sure that everything is called in the correct order
2024-04-17.13.39.19.mov
(Video is from main branch )
but okay )
I'll try to find an alternative solution )
Thank you for review )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this issue thoroughly over the weekend
If you do not mind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah yeah, np. Please keep me posted
I decided to update my GPG keys |
Details
Fixed Issues
$ #39443
PROPOSAL: #39443 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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-04-14.at.23.35.34.mov
Android: mWeb Chrome
Screen.Recording.2024-04-14.at.23.35.34.mov
iOS: Native
Screen.Recording.2024-04-14.at.23.39.27.mov
iOS: mWeb Safari
Screen.Recording.2024-04-14.at.23.39.27.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-14.at.23.33.41.mov
MacOS: Desktop
Screen.Recording.2024-04-14.at.23.37.30.mov