-
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
[TS migration] Migrate 'WorkspaceMembers' page to TypeScript #35065
[TS migration] Migrate 'WorkspaceMembers' page to TypeScript #35065
Conversation
@VickyStash @fabioh8010 can you take another look? 🙏 |
@hoangzinh @ One of you needs to 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] |
useEffect(() => () => (SearchInputManager.searchInput = ''), []); | ||
useEffect(() => { | ||
SearchInputManager.searchInput = ''; | ||
}, []); |
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.
Previous logic wants clear searchInput on the unmount effect, we want to clear on the mount effect. Is it intentional?
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.
Right, updated!
}); | ||
}); | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🚀
|
Details
Fixed Issues
$ #25201
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as Tests section above
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)Design
label 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.webm
Android: mWeb Chrome
chrome.webm
iOS: Native
ios.mp4
iOS: mWeb Safari
safari.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov