-
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
SearchPage list refactor #33080
SearchPage list refactor #33080
Conversation
…earchpage_list_refactor
@rushatgabhane 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] |
return newSections; | ||
}, [localPersonalDetails, recentReports, userToInvite]); | ||
|
||
const selectReport = (option) => { |
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.
How is the performance/renders situation without these 2 being memoed in any way? Are you able to compare the two?
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.
@adhorodyski checked it and compared it to previous (class based) version of this component and it's in the same place, which means - renders (depends on edge case). Also measured performance on web, though not on HTA and it looks good. If you have an access to an HT account I would gladly check against it too!
const {translate} = useLocalize(); | ||
|
||
return ( | ||
<View style={[themeStyles.pb5, themeStyles.flexShrink0]}> |
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.
@lukemorawski is the search component supposed to be shown in left side of the page? |
That's how it's on staging currently. I haven't messed with the layout, just swapped the list component. |
@lukemorawski sorry for the delay here! I will try to get it over the finish line today |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariScreen.Recording.2024-01-10.at.12.08.50.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.
LGTM!
✋ 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/cristipaval in version: 1.4.24-4 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.24-8 🚀
|
@@ -0,0 +1,183 @@ | |||
import PropTypes from 'prop-types'; |
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.
Noting here as well @rushatgabhane @adhorodyski @lukemorawski This page was added but the original SearchPage.js was not removed from the /pages
folder so the app is actually using code from the original file
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.
@mountiny Actually I did remove the original file but probably it slipped in when merging this branch with main
.
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.
Will prepare a quick PR removing the old file.
Details
This PR refactors
<SearchPage />
component to use new .At the same time the whole component's architecture to a functional one from class based.
A hook
useDebouncedState
was added to streamline debouncing search string value.Fixed Issues
$ #20354
PROPOSAL: no proposal - draft PR
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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)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
native.android.mov
Android: mWeb Chrome
web.android.mov
iOS: Native
native.ios.mp4
iOS: mWeb Safari
web.ios.mov
MacOS: Chrome / Safari
web.desktop.mov
MacOS: Desktop
native.desktop.mov