-
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: An extra space is created at the top of the chat list when pin and unpin #38656
Conversation
@aimane-chnaif 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] |
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.
Code looks good, though it's weird to have some duplicated logic in different places.
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.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.
@Julesssss all yours
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@@ -79,9 +79,19 @@ function getOrderedReportIDs( | |||
let reportsToDisplay = allReportsDictValues.filter((report) => { | |||
const parentReportActionsKey = `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.parentReportID}`; | |||
const parentReportActions = allReportActions?.[parentReportActionsKey]; | |||
const reportActions = ReportActionsUtils.getAllReportActions(report.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.
@Julesssss This line is creating a crash for me.
The correct line should be
const reportActions = ReportActionsUtils.getAllReportActions(report?.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.
@dukenv0307 Would you create a new PR, and I will review this as @aimane-chnaif is OOO.
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.
Interesting. When's the case of report being nullish? Maybe you have bad Onyx data?
I prefer early return false if (!report)
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.
Umm. The problem is that the type of this function is not correct right now. I corrected it in another PR, but that got unfortunately reverted due to a performance issue.
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.
A small refactor: #38741
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.
Nice, so I think we'd just need to run the test from here to confirm.
@mountiny Can you profile this PR for performance? The code is very similar to what I wrote in #35907. |
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.56-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀
|
Details
Fixed Issues
$ #37497
PROPOSAL: #37497 (comment)
Tests
Offline tests
QA 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
android-resize.mp4
Android: mWeb Chrome
ios-mweb.mov
iOS: Native
Screen.Recording.2024-03-20.at.14.30.01.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-20.at.14.16.00.mov
MacOS: Desktop
Screen.Recording.2024-03-20.at.14.16.31.mov