-
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 chat header appears after delay when opening expense/transaction report #42334
Fix chat header appears after delay when opening expense/transaction report #42334
Conversation
@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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-20.at.16.55.45.movAndroid: mWeb ChromeScreen.Recording.2024-05-20.at.16.48.18.moviOS: NativeScreen.Recording.2024-05-20.at.16.50.07.moviOS: mWeb SafariScreen.Recording.2024-05-20.at.16.46.40.movMacOS: Chrome / SafariScreen.Recording.2024-05-20.at.16.44.14.movMacOS: DesktopScreen.Recording.2024-05-20.at.16.45.32.mov |
@bernhardoj Everything looks good. One minor thing, in the test step we should add the "Login" step as the first step |
Updated |
@bernhardoj Please resolve conflict |
There is no conflict |
🚀 Deployed to staging by https://github.com/puneetlath in version: 1.4.76-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.76-7 🚀
|
const [transaction] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${(parentReportAction as ReportAction & OriginalMessageIOU)?.originalMessage?.IOUTransactionID ?? 0}`); | ||
const [transactionViolations] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS); | ||
const [session] = useOnyx(ONYXKEYS.SESSION); | ||
const [shownHoldUseExplanation] = useOnyx(ONYXKEYS.NVP_HOLD_USE_EXPLAINED, {initWithStoredValues: false}); |
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.
@bernhardoj Why do you change the initial value of shownHoldUseExplanation?
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.
Oh my bad, I think I got confused between initial value and initWithStoredValues. The initial value for that is false as you can see here,
but the initWithStoredValues is true.
Here is the PR to correct it: #42819.
Details
The delay is caused by the withOnyx returning null when the data are not ready yet. This PR migrates it to useOnyx hook.
Fixed Issues
$ #41523
PROPOSAL: #41523 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: have submitted more than 1 expense to anyone
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-05-17.at.13.29.39.mov
Android: mWeb Chrome
Screen.Recording.2024-05-17.at.13.31.04.mov
iOS: Native
Screen.Recording.2024-05-17.at.13.28.21.mov
iOS: mWeb Safari
Screen.Recording.2024-05-17.at.13.30.29.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-17.at.13.25.07.mov
MacOS: Desktop
Screen.Recording.2024-05-17.at.13.27.48.mov