Repository navigation
[TS migration] Migrate 'WorkspaceMembers' page to TypeScript - #35065
Conversation
|
@VickyStash @fabioh8010 can you take another look? 🙏 |
| useEffect(() => () => (SearchInputManager.searchInput = ''), []); | ||
| useEffect(() => { | ||
| SearchInputManager.searchInput = ''; | ||
| }, []); |
There was a problem hiding this comment.
Previous logic wants clear searchInput on the unmount effect, we want to clear on the mount effect. Is it intentional?
| }); | ||
|
|
||
| result = _.sortBy(result, (value) => value.text.toLowerCase()); | ||
| result = result.sort((a, b) => a.text.localeCompare(b.text.toLowerCase())); |
There was a problem hiding this comment.
it looks like we forgot to convert a.text to lower case
| return _.intersection(prevSelectedElements, _.values(PolicyUtils.getMemberAccountIDsForWorkspace(props.policyMembers, props.personalDetails))); | ||
| return [prevSelectedElements, Object.values(PolicyUtils.getMemberAccountIDsForWorkspace(policyMembers, personalDetails))].reduce((prev, members) => | ||
| prev.filter((item) => members.includes(item)), | ||
| ); |
There was a problem hiding this comment.
Previously, with _.intersection we could quickly understand what does this code mean, but now it's harder to understand. I think we can either:
- Move to a util class (ArrayUtils?)
- Or leave a comment to explain what we're going to do here.
What do you think?
There was a problem hiding this comment.
Great idea! I added a comment
|
FYI @JKobrynski is OOO from Feb 12th to Feb 16th. |
|
@hoangzinh PR updated! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-21.at.22.03.14.android.movAndroid: mWeb ChromeScreen.Recording.2024-02-21.at.22.08.56.android.chrome.moviOS: NativeScreen.Recording.2024-02-21.at.21.57.17.ios.moviOS: mWeb SafariScreen.Recording.2024-02-21.at.21.59.12.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-02-21.at.19.59.52.web.movMacOS: DesktopScreen.Recording.2024-02-21.at.21.30.09.desktop.mov |
|
I found a bug that deletes a member when offline is disappearing instead of crossed out. It also happens in main so I reported here https://expensify.slack.com/archives/C049HHMV9SM/p1708519808525439 |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25201 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
Can you fix the conflict please? |
|
@tgolen done! |
|
✋ 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/tgolen in version: 1.4.44-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
| const res = _.find(_.values(currentPersonalDetails), (item) => lodashGet(prevItem, 'login') === lodashGet(item, 'login')); | ||
| return lodashGet(res, 'accountID', id); | ||
| const prevSelectedElements = prevSelected.map((id) => { | ||
| const prevItem = prevPersonalDetails?.id; |
There was a problem hiding this comment.
Coming from checklist #53899
const prevItem = lodashGet(prevPersonalDetails, id);
We should get by id value instead of get by id key
Details
Fixed Issues
$ #25201
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as Tests section above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.webm
Android: mWeb Chrome
chrome.webm
iOS: Native
ios.mp4
iOS: mWeb Safari
safari.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov