Implement offline behavior and error handling for UpdateGroupChatName#41826
Implement offline behavior and error handling for UpdateGroupChatName#41826marcaaron merged 8 commits intoExpensify:mainfrom
Conversation
|
@dukenv0307 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] |
|
This is working and looking pretty good to me. Are you using our standard error component for the error? The dot looks a little far away from the text to me. Looks like it's |
|
Hmm yeah, it does feel a bit far away - I wonder if we can just make the global change to match what we have in Figma, which sounds like is the gap value (8px) we'd expect for these? |
Yeah that would be ideal—I feel like this one comes up quite a bit. |
|
The error design is being refactored here #41670 |
|
@s77rt @dukenv0307 i updated code, please check again 🙏 |
s77rt
left a comment
There was a problem hiding this comment.
Can you also please check #39984 (comment) and #39984 (comment)?
src/libs/actions/Report.ts
Outdated
| value: { | ||
| reportName: currentReportData?.[reportID]?.reportName, | ||
| errors: { | ||
| reportName: Localize.translateLocal('groupChat.invalidGroupChatName'), |
There was a problem hiding this comment.
NAB. I think we want to use a generic error message
There was a problem hiding this comment.
Yes, let's use the generic message as we already discussed here
There was a problem hiding this comment.
@s77rt @dukenv0307 i added new generic error, please check again
Co-authored-by: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com>
|
@s77rt I modified function |
src/languages/en.ts
Outdated
| invalidGroupChatName: 'Invalid group chat name', | ||
| genericErrorMessage: 'An error occurred while updating group chat name, please try again.', |
There was a problem hiding this comment.
Remove the translations, not needed
|
|
||
| function isValidReportName(name: string) { | ||
| return name.trim().length < CONST.REPORT_NAME_LIMIT; | ||
| return name.trim().length <= CONST.REPORT_NAME_LIMIT; |
There was a problem hiding this comment.
Update CONST.REPORT_NAME_LIMIT check #39984 (comment)
Co-authored-by: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com>
|
@s77rt @dukenv0307 please check again |
|
Code looks good to me 👍 |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeweb-resize.mp4Android: mWeb Chromeweb-resize.mp4iOS: Nativeweb-resize.mp4iOS: mWeb Safariweb-resize.mp4MacOS: Chrome / Safariweb-resize.mp4MacOS: Desktopweb-resize.mp4 |
|
@nkdengineer Can you add the example for invalid name in test steps? Thanks |
|
@dukenv0307 please check again |
|
code looks good and tests well |
|
@marcaaron Please help to review the PR when you have a chance. |
|
🚀 Deployed to staging by https://github.com/marcaaron in version: 1.4.77-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
| key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, | ||
| value: { | ||
| reportName: currentReportData?.[reportID]?.reportName ?? null, | ||
| errors: { |
There was a problem hiding this comment.
Capturing error should be based on errorFields but since we depended on errors this resulted in issue #42765
Details
Fixed Issues
$ #39984
PROPOSAL: #39984 (comment)
Tests
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-resize.mp4
Android: mWeb Chrome
android-mweb-resize.mp4
iOS: Native
ios-resize.mp4
iOS: mWeb Safari
ios-mweb-resize.mp4
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
desktop.mov