-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implement offline behavior and error handling for UpdateGroupChatName #41826
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 🙏 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB. I think we want to use a generic error message
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.
Yes, let's use the generic message as we already discussed here
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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the translations, not needed
@@ -337,7 +337,7 @@ function isValidCompanyName(name: string) { | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.
LGTM
🚀 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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-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