Workspace Feed - Limit card name#51948
Conversation
|
@eh2077 this is handled by @DylanDylann and @allgandalf |
|
If possible, @narefyev91 Could you help to make the same fix on WorkspaceEditCardNamePage (Expensify Card) for consistency? Thanks |
|
@narefyev91 Also please help to address two these pages src/pages/workspace/companyCards/addNew/CardNameStep.tsx One more thing, I think we should use 100 character limit in all places for consistency cc @mountiny |
|
The rest looks good |
Reviewer Checklist
Screenshots/Videos |
src/CONST.ts
Outdated
| */ | ||
| NVP_FINANCIALFORCE_EXPORT_VENDOR_POLICY_ID: 'financialforce_export_vendor_policy_id', | ||
| }, | ||
| CARD_TITLE_INPUT_LIMIT: 100, |
There was a problem hiding this comment.
let's use STANDARD_LENGTH_LIMIT instead of creating new one
| const errors = ValidationUtils.getFieldRequiredErrors(values, [INPUT_IDS.NAME]); | ||
| const length = values.name.length; | ||
| if (length > CONST.STANDARD_LENGTH_LIMIT) { | ||
| ErrorUtils.addErrorMessage(errors, INPUT_IDS.NAME, translate('common.error.characterLimitExceedCounter', {length, limit: CONST.STANDARD_LENGTH_LIMIT})); | ||
| } | ||
| return errors; |
There was a problem hiding this comment.
its getting a bit repetitive, we might want to consider if there is a nice way to dry this up
|
✋ 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/mountiny in version: 9.0.58-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.58-2 🚀
|







Explanation of Change
Add logic to show standard error message - if card name is bigger than 100 characters
Fixed Issues
$ #51899
PROPOSAL:
Tests
Offline tests
Same logic as for the main feature
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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