[Workspace]Add name and description characters limitation#7656
Merged
ruanyl merged 7 commits intoopensearch-project:mainfrom Aug 15, 2024
Merged
Conversation
Signed-off-by: Lin Wang <wonglam@amazon.com>
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 <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
ruanyl
reviewed
Aug 9, 2024
| expect(onChangeMock).not.toHaveBeenCalled(); | ||
| }); | ||
|
|
||
| it('should render the correct number of characters left when value is falsy', () => { |
| readOnly, | ||
| onChange, | ||
| }: WorkspaceNameFieldProps) => { | ||
| const handleChange = useCallback( |
Member
There was a problem hiding this comment.
Shall we allow user to keep editing but display error message when exceed limit?
Collaborator
Author
There was a problem hiding this comment.
I'm open to this. Can be discuss with designer about that behavior.
Collaborator
Author
There was a problem hiding this comment.
I've updated this part according the latest feedback. Could you help me take a look?
Signed-off-by: Lin Wang <wonglam@amazon.com>
ruanyl
previously approved these changes
Aug 12, 2024
Signed-off-by: Lin Wang <wonglam@amazon.com>
SuZhou-Joe
reviewed
Aug 14, 2024
src/plugins/workspace/public/components/workspace_form/fields/workspace_name_field.tsx
Show resolved
Hide resolved
SuZhou-Joe
reviewed
Aug 14, 2024
src/plugins/workspace/public/components/workspace_form/fields/workspace_description_field.tsx
Show resolved
Hide resolved
SuZhou-Joe
approved these changes
Aug 14, 2024
ruanyl
approved these changes
Aug 15, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Aug 15, 2024
* Add name and description characters limitation Signed-off-by: Lin Wang <wonglam@amazon.com> * Changeset file for PR #7656 created/updated * Add workspace name and description limitation in server side Signed-off-by: Lin Wang <wonglam@amazon.com> * Add unit tests for workspace name and description field Signed-off-by: Lin Wang <wonglam@amazon.com> * Update test case name Signed-off-by: Lin Wang <wonglam@amazon.com> * Allow input text when exceed max length Signed-off-by: Lin Wang <wonglam@amazon.com> --------- Signed-off-by: Lin Wang <wonglam@amazon.com> 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>
ruanyl
pushed a commit
that referenced
this pull request
Aug 15, 2024
) * 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 <wonglam@amazon.com> 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR mainly includes two changes:
Issues Resolved
#7657
Screenshot
Testing the changes
yarn osd bootstrapconfig/opensearch_dashboards.ymlyarn start --no-base-pathChangelog
Check List
yarn test:jestyarn test:jest_integration