-
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
fix: abracadabra page #48899
fix: abracadabra page #48899
Conversation
faaf2ba
to
39052d4
Compare
@dangrous can we prepare a build based on this PR and ask QA to test if these changes actually fix the reported problem and don't introduce new problems? Slightly afraid, that we are touching |
sure! Let me get that build started |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Do you mind double checking that that looks good @kirillzyusko and then I can send over to QA? |
Just requested qa's help! https://expensify.slack.com/archives/C9YU7BX5M/p1726092553187509 |
Sounds like this passed QA, with one remaining known issue. Will get the details shortly! |
@dangrous does it mean that I can proceed with this PR further, clean it up and prepare for a review? 👀 |
Yeah I think go ahead! I haven't heard back yet from QA on which issue still exists (I'm assuming it's not #44600 which is the only one that would be concerning) but I will ping them again. |
@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] |
@aimane-chnaif @dangrous this PR is ready for a review 🎉 |
Please merge main. 1.7k commits are behind |
@@ -142,6 +142,7 @@ | |||
"react-native": "0.75.2", | |||
"react-native-android-location-enabler": "^2.0.1", | |||
"react-native-blob-util": "0.19.4", | |||
"react-native-bundle-splitter": "^3.0.1", |
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 think this should follow the New Library Process
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.
Submitted an issue here: #49519
91319c5
to
13ff0d0
Compare
Done 🙌 |
On hold for #49519 |
Hey @kirillzyusko finally got the response from QA - looks like the PR still reproduces these issues: Any chance you could take a look at those? |
@dangrous so we want to fix all of these issues in a single PR? Or do you want me to look and discover a root problem for these bugs? |
Okay so one of those was closed and QA suggested this PR would reopen it. That one we should definitely make sure we don't reintroduce with this. The other one was open, I was going to say we don't have to handle it here BUT they just closed it in favor of this PR haha. It sounds like it might not be reproducible anymore. So TLDR - let's see if either of those occur with this PR, and we only need to fix if they still do. |
Well, I can rebase this PR to latest main because right now it's ~1000 commits behind. I couldn't reproduce the problem, but I hardly believe this PR can introduce such behavior 😅 P. S. I just re-tested this issue on updated branch and I can not reproduce it 🤷♂️ @dangrous maybe you can re-test it as well to confirm that it's not reproducible? |
13ff0d0
to
1f2db18
Compare
Confirmed, I don't see that happening either. I think we're okay? |
As for #48378 - you said you could reproduce that one here? Let's see if we can fix it too, since even if we don't show the inbox (this issue) we probably should make sure we show the correct (non-expired) page, too. Does that make sense? |
@kirillzyusko any update here? |
@garrettmknight thanks for reminder! The thread was lost somehow 🙈
Yeah, I can reproduce and you it totally makes sense what you are saying. But do I correctly udnderstand that you want to fix it in this PR? |
It looks actually like it's being fixed separately so yeah, you can ignore it here! |
Cool! So we can review this PR then, right? 👀 |
Yep! though we're waiting on approval of that library right? |
Oh, yeah, right! |
Closing PR because the behavior was re-defined: #44600 (comment) |
Details
The fix consist from two parts:
Let's consider each part in more details.
1️⃣ preload the component in advance to be able to mount it synchronously on a demand
If we mount the component and the component is lazy and haven't been loaded yet, then when we switch navigator we remove old navigator, but a new one navigator doesn't have routes yet, so
react-navigation
clears a state, and when new routes are attached then a default route will be selected, because previous state was lost.So we need to mount the screen/navigator synchronously.
2️⃣ clean up the state in asynchronous way if it's a real component unmount
The synchronous clean up was added here - #42592
The key thing is that now
unmount
is getting fired two times. If we have an asyncronous removal, then navigation just stops working (because we perform a navigation and then instantly run unmount - unmount fires asynchronously and removes just created new state).To fix this problem I patched
react-navigation
and addeduseFullyMountedRef
hook. It's returningref.current=false
if component is not fully mounted (i. e. unmount is about to be fired) and will updateref.current=true
when component finished it's mounting.This solution is not perfect, but currently
react-navigation@6
is not fully compatible withStrictMode
, so we have to patch it. Most likely withreact-navigation@7
this patch will not be needed, becausereact-navigation@7
supportingStrictMode
.Fixed Issues
$ #44600
PROPOSAL: N/A
Tests
Warning
Please, test a release version locally.
Offline tests
N/A
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Untitled.mov
MacOS: Desktop