Enable creating a group chat with one other participant#40165
Conversation
src/pages/NewChatPage.tsx
Outdated
| confirmButtonText={translate('common.next')} | ||
| textInputAlert={isOffline ? [`${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}`, {isTranslated: true}] : ''} | ||
| onConfirmSelection={selectedOptions.length > 1 ? navigateToConfirmPage : createChat} | ||
| onConfirmSelection={selectedOptions.length > 0 ? navigateToConfirmPage : createChat} |
There was a problem hiding this comment.
| onConfirmSelection={selectedOptions.length > 0 ? navigateToConfirmPage : createChat} | |
| onConfirmSelection={selectedOptions.length > 0 ? navigateToConfirmPage : undefined} |
There was a problem hiding this comment.
The CreateChat is needed for the CTRL+Enter shortcut, if we remove it will introduce a regression.
FYI currently, when the user presses on CTRL+Enter, the onConfirmSelection is called.
Screen.Recording.2024-04-13.at.1.00.26.PM.mov
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb-chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
Sorry, this has a conflict now. |
|
in the conflict the selection list was introduced instead of the options selector however in the new implementation when the user selects multiple participants and then presses on Screen.Recording.2024-04-16.at.2.25.58.AM.mov |
|
Technically whoever edited this to use the new selector broke it already so I don't really feel like that's on you to fix, but if you see an easy solution I'd appreciate it. It's unlikely that anyone has caught that yet as it's not on staging yet. |
…-with-one-other-participant
|
@marcaaron @s77rt okay the issue is now fixed in the recent commit, please have a look and let me know if you have any other comments. |
marcaaron
left a comment
There was a problem hiding this comment.
One question. Changes LGTM otherwise, thanks for picking this one up! 🙇
src/pages/NewChatPage.tsx
Outdated
| const createGroup = useCallback(() => { | ||
| if (selectedOptions.length === 1) { | ||
| createChat(); | ||
| } |
There was a problem hiding this comment.
Are we missing a return here?
There was a problem hiding this comment.
ops, didnt notice this condition in the new code, actually it's not needed now, i have removed it since the user can create a group chat with only 1 selected members
marcaaron
left a comment
There was a problem hiding this comment.
LGTM thanks for the change
|
✋ 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/marcaaron in version: 1.4.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Fixed Issues
$ #39317
PROPOSAL: #39317 (comment)
Tests
Nextconfirmation button is shown and click on it to navigate to the next pageStart Groupand make sure that the group is created without errorsOffline tests
Same as in tests
QA Steps
Same as in tests
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
Screen.Recording.2024-04-12.at.9.33.06.AM.mov
Android: mWeb Chrome
Screen.Recording.2024-04-12.at.9.56.53.AM.mov
iOS: Native
Screen.Recording.2024-04-12.at.9.22.57.AM.mov
iOS: mWeb Safari
Screen.Recording.2024-04-12.at.9.21.51.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-12.at.9.12.00.AM.mov
MacOS: Desktop
Screen.Recording.2024-04-12.at.9.28.42.AM.mov