-
Notifications
You must be signed in to change notification settings - Fork 967
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] Limit workspace colors #8607
Changes from all commits
79bfab9
e51c5af
8c637a0
16bfbd4
1ccebda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
feat: | ||
- Limit workspace colors ([#8607](/~https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8607)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,7 @@ export const WorkspaceDetailFormDetails = ({ | |
error={formErrors.color?.message} | ||
> | ||
<EuiCompressedColorPicker | ||
mode="swatch" | ||
color={formData.color} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still allow user to type whatever color they want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could add a rule for color validation when submitting like this: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we use same component as create page? for now they are different. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I‘ve tried the validation and it works on both the create page and the detail page |
||
onChange={handleColorChange} | ||
readOnly={!isEditing} | ||
|
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.
nit: Since we have this
!euiPaletteColorBlind().includes(color)
check which inlcudes the logic for!validateWorkspaceColor(color)
, we can remove!validateWorkspaceColor(color)
.