-
Notifications
You must be signed in to change notification settings - Fork 3.2k
perf: improve shouldDisplayViolationsRBRInLHN #56639
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
perf: improve shouldDisplayViolationsRBRInLHN #56639
Conversation
…DisplayViolationsRBRInLHN
…DisplayViolationsRBRInLHN
@ZhenjaHorbach 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: NativeUploading android.mov… Android: mWeb ChromeScreenrecorder-2025-02-13-09-28-23-837.mp4iOS: Nativeios.moviOS: mWeb Safariios-web.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
...MOCK_REPORTS, | ||
...MOCK_TRANSACTION_VIOLATIONS, | ||
[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${MOCK_REPORT.reportID}` as const]: MOCK_REPORT_ACTIONS, |
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.
Actually interesting why our tests broke after refactoring the code and we need to update tests after that 🤔
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 I had to spend some time to figure it out 🙈 The Onyx callback responsible for creating a map of reports by policy ID is using a value based on session, so when it was trying to access it, it was still undefined
because it was declared in multiSet
after reports
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
Got it !
Thanks for the explanation !
Strange But I know what the issue is 2025-02-12.15.09.35.mov |
@TMisiukiewicz 2025-02-12.17.31.47.mov |
@ZhenjaHorbach hmm no such issue on my side 🤔 |
…DisplayViolationsRBRInLHN
Thanks for checking ! And yeah There may be problems with my emulator 😅 |
LGTM ! |
@mjasikowski |
@ZhenjaHorbach sorry, I thought I pressed the merge button yesterday 😄 |
✋ 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/mjasikowski in version: 9.0.99-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.99-2 🚀
|
Explanation of Change
Refactoring the code to use more performant way of determining whether report should have RBR displayed or not.
Fixed Issues
$ #56730
PROPOSAL: #56730 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
iOS: mWeb Safari
ios-web.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov