Conversation
blazejkustra
left a comment
There was a problem hiding this comment.
Couple minor comments, other than that - great refactor 😄
| route: 'r/:reportID/invite/:role?', | ||
| getRoute: (reportID: string, role?: string) => `r/${reportID}/invite/${role}` as const, | ||
| getRoute: (reportID: string, role?: string) => { | ||
| const route = role ? (`r/${reportID}/invite/${role}` as const) : (`r/${reportID}/invite` as const); |
There was a problem hiding this comment.
How about a shorter version?
| const route = role ? (`r/${reportID}/invite/${role}` as const) : (`r/${reportID}/invite` as const); | |
| getRoute: (reportID: string, role?: string) => `r/${reportID}/invite${role ? `/${role}`: ''}` as const, |
There was a problem hiding this comment.
@BrtqKr Could you please help to detail which problem here?
Fixed role undefined case on room members invite
There was a problem hiding this comment.
when someone didn't have a role inside of a report we ended up with /undefined inside of the url. It just seems like someone forgot to put a proper fallback in there
There was a problem hiding this comment.
@BrtqKr With previous code, we added a fallback value is empty string. Why shouldn't use ?? operator?
There was a problem hiding this comment.
Not sure what you meant exactly, but two explanations:
1.
getRoute: (reportID: string, role?: string) =>r/${reportID}/invite/${role} as const,
In the previous version, skipping the role meant getting undefined, which was getting stringified, which resulted in for example
r/151422415264937/invite/undefined in the url.
?? operator works only as a fallback for null and undefined and in this case we want to include empty string in the same group to remove slash for this scenario
| }, | ||
| beforeRemove: () => { | ||
| // Clear search input (WorkspaceInvitePage) when modal is closed | ||
| SearchInputManager.searchInput = ''; |
There was a problem hiding this comment.
Shouldn't we clear it here?
There was a problem hiding this comment.
No, because we've removed the usage of persist on that page. Apparently navigation patterns have changed and this is no longer necessary.
| Onyx.merge(ONYXKEYS.ROOM_MEMBERS_USER_SEARCH_PHRASE, value); | ||
| } | ||
|
|
||
| export {clearUserSearchPhrase as clearUserSearchValue, updateUserSearchPhrase}; |
There was a problem hiding this comment.
| export {clearUserSearchPhrase as clearUserSearchValue, updateUserSearchPhrase}; | |
| export {clearUserSearchPhrase, updateUserSearchPhrase}; |
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
||
| function clearUserSearchPhrase() { | ||
| Onyx.set(ONYXKEYS.ROOM_MEMBERS_USER_SEARCH_PHRASE, ''); |
There was a problem hiding this comment.
Let's use merge here as well
|
@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] |
|
@BrtqKr Minor question #47076 (comment) and please resolve conflict |
|
@BrtqKr Friendly bump |
|
@DylanDylann Bartek got sick 😢 He will get back to it later this week or in the upcoming week |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-28.at.17.52.50.movAndroid: mWeb ChromeScreen.Recording.2024-08-28.at.17.53.29.moviOS: NativeScreen.Recording.2024-08-28.at.17.51.47.moviOS: mWeb SafariScreen.Recording.2024-08-28.at.17.52.24.movMacOS: Chrome / SafariScreen.Recording.2024-08-28.at.17.42.50.movMacOS: DesktopScreen.Recording.2024-08-28.at.17.50.29.mov |
|
@grgia All yours |
|
@BrtqKr Conflict |
|
@grgia, I think this should be done 🙏 |
|
@BrtqKr we can merge once conflicts are fixed! Thanks for your patience, I was OOO |
|
Ok, I needed to adjust RoomParticipants after changes from the main, but it seems to be working as expected |
|
bump for rereview after changes @DylanDylann |
|
The new change in @grgia 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. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.33-4 🚀
|
roleundefined case on room members inviteDetails
Fixed Issues
$ #47783
PROPOSAL: https://swmansion.slack.com/archives/C05LX9D6E07/p1723130121950609
Tests
Everything is related to the RHP screens, that contain user search - the behaviour should be identical to the current state of the app, that is:
The changes have been applied to both room members and room participants flows.
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop