-
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
fixes "Skeleton is displayed when navigating to a transaction thread created offline" #38955
fixes "Skeleton is displayed when navigating to a transaction thread created offline" #38955
Conversation
Root cause for the issue: For the first render when the report id is 0, https://github.com/Expensify/App/blob/main/src/pages/home/ReportScreen.tsx#L352 i added condition to show not found only when |
@alitoshmatov 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] |
@roryabraham Can you please review! 🙇♂️ |
@roryabraham Pr is open for your 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.
sorry for the delay @ishpaul777, LGTM 👍🏼
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
tests were passing, I think I just didn't wait long enough after finishing the reviewer checklist for it to turn ✅ |
✋ 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/roryabraham in version: 1.4.58-0 🚀
|
@@ -102,7 +102,7 @@ type ReportScreenProps = OnyxHOCProps & CurrentReportIDContextValue & ReportScre | |||
function getReportID(route: ReportScreenNavigationProps['route']): string { | |||
// The report ID is used in an onyx key. If it's an empty string, onyx will return | |||
// a collection instead of an individual report. | |||
return String(route.params?.reportID || 0); | |||
return String(route.params?.reportID || ''); |
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 believe this change has caused this composer issue
Screen.Recording.2024-03-29.at.18.07.10.mov
- Open a chat
- Go to settings
- Go back to chat
- It only happens once for each chat, so switch to another chat if you want to try it again
Returning an empty string will fetch the whole collection of onyx data as pointed out in the comment, e.g.,
reportIsComposerFullSize_
, report_
this was previously fixed in #31602
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.
Thank for pointing it out @bernhardoj, what do you think the right fix for it, is it this?
const reportIDFromRoute = route?.params?.reportID ?? '';
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, getReportID
should return 0 as a fallback and have a separate variable that returns an empty string as a fallback, just like the old code.
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.
Hi guys, this PR introduced this deploy blocker #39361, I will revert while we ensure that returning 0 here is the correct solution
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.58-8 🚀
|
Details
Fixed Issues
$ #39029
PROPOSAL:
Tests
https://staging.new.expensify.com/r/<randomid>
verify not found page appearshttps://staging.new.expensify.com/r/0
verify not found page appearsOffline tests
QA Steps
same as testing 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
Record_2024-03-27-23-39-43.mp4
Android: mWeb Chrome
trim.EE4B375F-6BB7-4B6D-9607-B5B0925176B1.MOV
iOS: Native
Screen.Recording.2024-03-27.at.11.28.40.PM-1.mov
iOS: mWeb Safari
Screen.Recording.2024-03-27.at.11.20.12.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-26.at.3.47.33.AM.mov
MacOS: Desktop
Screen.Recording.2024-03-27.at.11.48.51.PM.mov