Skip to content
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]Disable "Save changes" button on character limit exceeded #8153

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Sep 12, 2024

Description

This PR is for disable the 'Save Changes' button when the number of characters in the name or description exceeds the maximum limit.

Issues Resolved

#8154

Screenshot

image

Testing the changes

  • Clone branch code and run yarn osd bootstrap --single-version ignore
  • Add below configs in config/opensearch_dashboards.yml
savedObjects.permission.enabled: true
workspace.enabled: true
uiSettings:
  overrides:
    'home:useNewHomePage': true
opensearchDashboards.dashboardAdmin.users: ['admin']
  • Run yarn start --no-base-path
  • Visiting a existing workspace settings page
  • Click "Edit" button
  • Input a long workspace name or description, the "Save changes" button should be disabled.

Changelog

  • fix: [Workspace]Disable "Save changes" button on character limit exceeded

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Lin Wang <wonglam@amazon.com>
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.92%. Comparing base (8691010) to head (6efff25).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8153      +/-   ##
==========================================
- Coverage   60.92%   60.92%   -0.01%     
==========================================
  Files        3749     3749              
  Lines       89021    89023       +2     
  Branches    13899    13901       +2     
==========================================
  Hits        54236    54236              
- Misses      31423    31424       +1     
- Partials     3362     3363       +1     
Flag Coverage Δ
Linux_1 28.85% <100.00%> (+<0.01%) ⬆️
Linux_2 56.35% <ø> (ø)
Linux_3 37.75% <ø> (?)
Linux_4 29.94% <ø> (ø)
Windows_1 28.87% <100.00%> (+<0.01%) ⬆️
Windows_2 56.30% <ø> (ø)
Windows_3 37.76% <ø> (-0.01%) ⬇️
Windows_4 29.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

SuZhou-Joe
SuZhou-Joe previously approved these changes Sep 20, 2024
@ruanyl ruanyl merged commit 09bd013 into opensearch-project:main Sep 29, 2024
65 of 67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 29, 2024
…8153)

* Disable "Save changes" button on character limit exceeded

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #8153 created/updated

* Add more test case for empty name and description

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 09bd013)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Sep 30, 2024
…8153) (#8374)

* Disable "Save changes" button on character limit exceeded



* Changeset file for PR #8153 created/updated

* Add more test case for empty name and description



---------



(cherry picked from commit 09bd013)

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>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Oct 3, 2024
…pensearch-project#8153) (opensearch-project#8374)

* Disable "Save changes" button on character limit exceeded



* Changeset file for PR opensearch-project#8153 created/updated

* Add more test case for empty name and description



---------



(cherry picked from commit 09bd013)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants