-
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
Add debug option to LHN context menu #50519
Add debug option to LHN context menu #50519
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] |
I just pushed the changes you requested 😄 I did notice a possible bug during my refactor which I reported in
|
@pac-guerreiro Some left comments. Please help to check |
Nice catches once again 😄 Just pushed the changes you requested! |
Just added the missing equality check to memo! |
// We only want to re-render when the report action that is attached to is changed | ||
if (prevReportAction !== nextReportAction) { | ||
return 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.
@pac-guerreiro I am having trouble with this place. It seems lodashIsEqual(prevPropsWithoutReportActions, nextPropsWithoutReportActions);
can't detect the different between prevReportAction and nextReportAction
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.
@pac-guerreiro note that we implemented a customized function instead of lodashIsEqual function only in memo
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 only want to make sure our change doesn't break any old behavior
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.
reportActions
was injected into the component by withOnyx
as a prop, but I removed withOnyx
and reportActions
is now returned by useOnyx
, so it doesn't make sense to do this check anymore inside memo
.
The component will be re-rendered if useOnyx
is triggered by some change to reportActions
, so I think the old behaviour should be the same
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-11.at.16.41.34.movAndroid: mWeb ChromeScreen.Recording.2024-10-11.at.16.39.30.moviOS: NativeScreen.Recording.2024-10-11.at.16.41.05.moviOS: mWeb SafariScreen.Recording.2024-10-11.at.16.36.25.movMacOS: Chrome / SafariScreen.Recording.2024-10-11.at.16.32.34.movMacOS: DesktopScreen.Recording.2024-10-11.at.16.35.27.mov |
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.
Looks great thanks. I like what you did cleaning up the shouldShow arguments!
✋ 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/neil-marcellini in version: 9.0.49-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.49-2 🚀
|
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, { | ||
canEvict: false, | ||
}); | ||
const transactionID = ReportActionsUtils.getLinkedTransactionID(reportActionID, 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.
The changes caused a regression, details here.
Details
Fixed Issues
$#46992
PROPOSAL:
Add option to debug a report from LHN context menu without triggering OpenReport API call. This way a user can debug the current state of the report without replacing it with the state from the API.
Tests
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.-.Native.mp4
Android: mWeb Chrome
Android.-.Chrome.mp4
iOS: Native
iOS.-.Native.mp4
iOS: mWeb Safari
iOS.-.Safari.mp4
MacOS: Chrome / Safari
MacOS.-.Chrome.mp4
MacOS: Desktop
MacOS.-.Native.mp4