-
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
iOS - Login - The splash screen glitches and flashes on launch #35185
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] |
ae14db3
to
9a22a0e
Compare
Friendly bump on a review here @aimane-chnaif 🙇 |
20f4ba7
to
1e1f146
Compare
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.movios2.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
createNavigationContainerRef: () => ({ | ||
addListener: () => jest.fn(), | ||
removeListener: () => jest.fn(), | ||
}), |
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.
perf tests failing if this was added?
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.
More context on Slack: https://expensify.slack.com/archives/C01GTK53T8Q/p1706732738472299
SignInPage reassure test was failing with this error:
● SignInPage › [SignInPage] should add username and click continue button
TypeError: _Navigation.navigationRef.isReady is not a function
37 |
38 | const triggerUnreadUpdate = () => {
> 39 | const currentReportID = navigationRef.isReady() ? Navigation.getTopmostReportId() ?? '' : '';
| ^
40 |
41 | // We want to keep notification count consistent with what can be accessed from the LHN list
42 | const unreadReports = getUnreadReportsForUnreadIndicator(allReports, currentReportID);
And I was told to remove this part as:
I recently changed it to solve another issue, but it looks like we don't need it at all.
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.
On recent sync w/ main the createNavigationContainerRef
was added back, but tests on this PR were still failing since the navigationRef.getState()
mock was missing, I added the mock and they still failed because of this line:
const topmostCentralPane = state.routes.filter((route) => route.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR).at(-1); |
where state.routes was undefined and .filter was failing. I added optional chaining there and they pass now.
are you able to test on physical iPhone? |
This comment was marked as outdated.
This comment was marked as outdated.
@aimane-chnaif Did not manage to run the dev app on iOS: Native physical device. Can you do that ? Asked on Slack as well: https://expensify.slack.com/archives/C01GTK53T8Q/p1706901761147639 |
@aimane-chnaif Friendly bump for the checklist 🙏 |
are you still working on fixing issues? |
@aimane-chnaif No, PR was ready for review since 2 weeks ago (Jan 25th). These force pushes I keep doing every now and then are to keep sync with latest main. |
src/pages/signin/SignInHeroImage.js
Outdated
@@ -36,6 +38,14 @@ function SignInHeroImage(props) { | |||
}; | |||
} | |||
|
|||
const {isSplashHidden} = useContext(SplashScreenHiddenContext); |
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.
How about making useIsSplashHidden
hook?
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 understand why would we write another hook when we already have it via useContext 🧐
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.
useScrollContext
for reference. Internally, it uses React Context ofc.
Btw, not blocker.
Testing with various iOS devices is most important in this PR.
Sometimes animation is not smooth. In this video, logo icon glitches and no fade out animation Screen.Recording.2024-02-08.at.4.41.31.AM.mov |
It can behave differently / slower under heavy load when running it on the simulator especially when transitioning from the JS compiler (metro) loading to the init of the splash screen. It did not happen on my side with just the editor and simulator open (minimized load). |
My macOS is very light at the moment. To avoid such inconsistency, this should be tested on physical iPhone. That's why I requested you. |
I understand. Well, I wasn't able to build locally on a physical device even though I tried for a few hours. I also asked on Slack but to no avail, seems like that's not possible due to certificates. Unless we request from a team member to perform an ad-hoc build of this PR here, before we merge if possible 👀 Otherwise I'm out of options and since this is a blocker - not sure how to move forward with this PR 🥲 |
@aimane-chnaif I managed to build dev on a real device using an older certificate / provisioning file I had which targets my iPhone UDID. I also added the Here's the physical device video, looks just as expected on an iPhone12 mini: iOS: Native (physical device)RPReplay_Final1707397150.mov |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
@ishpaul777 verified fix here RPReplay_Final1707413431.mp4 |
Looks good test.MP4 |
@aimane-chnaif What is the next step here in order to move forward ? 🚀 |
Thanks everyone. I think they're enough. I will approve today |
@ikevin127 please avoid force-push once review started |
@bondydaa all yours |
@aimane-chnaif I do this since I don't know any other way to sync w/ main without having hundreds of changes / pulling all the commits into this one. What's your flow / commands you use when doing this ? I am asking in scenarios where main is 1000+ commits ahead and I need to sync / solve conflicts and maintain current changes instead of pulling all other commit's changes. |
|
@aimane-chnaif I tried your method, did it work as expected ? The Typecheck fail after the latest sync w/ main, non related to this PR: Error: src/pages/home/report/ReportDetailsShareCodePage.tsx(9,13): error TS2741: Property 'session' is missing in type '{ report: Report; }' but required in type 'Omit<HOCProps & { session: OnyxEntry<Session>; report?: OnyxEntry<Report> | undefined; }, "currentUserPersonalDetails">'. |
yes 👍 The main check is that code diff is really your code changes only and merge commit is only 1 commit |
yes, it's known - #35841 (comment) |
@aimane-chnaif Thanks for teaching me this method 🙏, I was not aware of it and used force-push until now 😓 Do you think the PR is still good to go for final approve / merge even though typecheck is failing ? |
Just waiting for final review from @bondydaa TS error will be fixed soon on main since they're already aware of it so we can merge again once fixed |
@bondydaa All good here -> ready for final review 🚀 |
✋ 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 production by https://github.com/thienlnam in version: 1.4.41-12 🚀
|
Details
Use
isSplashHidden
from SplashScreenHiddenContext to prevent the rendering of both BackgroundImage (on iOS: native) and SignInHeroImage Lottie animation until the splash screen is hidden in order to prevent splash screen hide animation glitch / flash due to heavy rendering.Fixed Issues
$ #34696
PROPOSAL: #34696 (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 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios-native.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov