-
Notifications
You must be signed in to change notification settings - Fork 918
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]Add name and description characters limitation #7656
[Workspace]Add name and description characters limitation #7656
Conversation
Signed-off-by: Lin Wang <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7656 +/- ##
=======================================
Coverage 63.74% 63.74%
=======================================
Files 3637 3639 +2
Lines 80426 80442 +16
Branches 12786 12795 +9
=======================================
+ Hits 51264 51279 +15
Misses 26030 26030
- Partials 3132 3133 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
expect(onChangeMock).not.toHaveBeenCalled(); | ||
}); | ||
|
||
it('should render the correct number of characters left when value is falsy', () => { |
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.
When description is empty?
readOnly, | ||
onChange, | ||
}: WorkspaceNameFieldProps) => { | ||
const handleChange = useCallback( |
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.
Shall we allow user to keep editing but display error message when exceed 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.
I'm open to this. Can be discuss with designer about that behavior.
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.
I've updated this part according the latest feedback. Could you help me take a look?
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
src/plugins/workspace/public/components/workspace_form/fields/workspace_name_field.tsx
Show resolved
Hide resolved
src/plugins/workspace/public/components/workspace_form/fields/workspace_description_field.tsx
Show resolved
Hide resolved
* Add name and description characters limitation Signed-off-by: Lin Wang <[email protected]> * Changeset file for PR #7656 created/updated * Add workspace name and description limitation in server side Signed-off-by: Lin Wang <[email protected]> * Add unit tests for workspace name and description field Signed-off-by: Lin Wang <[email protected]> * Update test case name Signed-off-by: Lin Wang <[email protected]> * Allow input text when exceed max length Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 7aef6e3) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
) * Add name and description characters limitation * Changeset file for PR #7656 created/updated * Add workspace name and description limitation in server side * Add unit tests for workspace name and description field * Update test case name * Allow input text when exceed max length --------- (cherry picked from commit 7aef6e3) Signed-off-by: Lin Wang <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
This PR mainly includes two changes:
Issues Resolved
#7657
Screenshot
Testing the changes
yarn osd bootstrap
config/opensearch_dashboards.yml
yarn start --no-base-path
Changelog
Check List
yarn test:jest
yarn test:jest_integration