-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve refresh and reload when error occured #49341
Improve refresh and reload when error occured #49341
Conversation
…/49340-improve-refresh
…/49340-improve-refresh
…/49340-improve-refresh
…/49340-improve-refresh
…37/Expensify into fix/49340-improve-refresh
…/49340-improve-refresh
@DylanDylann 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] |
The first time users click "refresh" we only execute resetBoundary function. If resetBoundary doesn't work and there are no updates, users can click on "refresh" one more time to reload the page. Screen.Recording.2024-10-04.at.18.39.18.movIt looks good to me |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2024-10-04.at.18.49.06.moviOS: NativeiOS: mWeb SafariScreen.Recording.2024-10-04.at.18.48.49.movMacOS: Chrome / SafariScreen.Recording.2024-10-04.at.18.39.18.movMacOS: DesktopScreen.Recording.2024-10-04.at.18.47.54.mov |
We did not find an internal engineer to review this PR, trying to assign a random engineer to #49340 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@DylanDylann @justinpersaud Could you please help QA team, how to validate these steps? |
🚀 Deployed to staging by https://github.com/justinpersaud in version: 9.0.45-1 🚀
|
@DylanDylann @justinpersaud Could you help us with the following steps?
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.45-4 🚀
|
@m-natarajan QA Step:
cc @rezkiy37 |
Coming from #52312, we have decided to reload from the first click on "refresh button" in case of the error is |
Details
The PR improves the "Refresh" button for the web and desktop. It will call
window.location.reload()
as well in a case when the "Something's wrong" view shows twice a minute. It means the first refresh has not helped. It guarantees the fetching of the latest updates and assets.Fixed Issues
$ #49340
PROPOSAL: N/A
Tests
NOTE: The bug with chunks appears during deployments. So we can simulate the situation.
lazyRetry.ts
andconst lastRefreshTimestamp = JSON.parse(sessionStorage.getItem(CONST.SESSION_STORAGE_KEYS.LAST_REFRESH_TIMESTAMP) ?? 'null') as string;
.const _componentImport = () => (lastRefreshTimestamp ? componentImport() : Promise.reject(componentImport));
then replacecomponentImport().then(...
with_componentImport().then(...
.hooks/usePageRefresh/index.ts
.sessionStorage.removeItem...
).Offline tests
Same as "Tests".
QA Steps
Same as "Tests".
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
Android.Chrome.13.40.08.mp4
iOS: Native
IOS.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Chrome.mp4
Refresh.mp4
MacOS: Desktop
Desktop.mp4