-
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
Workspace Feed - Limit card name #51948
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
@@ -2873,6 +2873,7 @@ const CONST = { | |||
*/ | |||
NVP_FINANCIALFORCE_EXPORT_VENDOR_POLICY_ID: 'financialforce_export_vendor_policy_id', | |||
}, | |||
CARD_TITLE_INPUT_LIMIT: 100, |
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.
let's use STANDARD_LENGTH_LIMIT instead of creating new one
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.
looks good, thank you!
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its getting a bit repetitive, we might want to consider if there is a nice way to dry this up
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.
ahh great point
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.
cc @narefyev91
✋ 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop