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]Fix workspace description error when name invalid #8079

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/8079.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Workspace]Fix workspace description error when name invalid ([#8079](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8079))
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ export const WorkspaceCreatorForm = (props: WorkspaceCreatorFormProps) => {
/>
<EuiSpacer size="m" />
<div {...generateRightSidebarScrollProps(RightSidebarScrollField.Description)} />
<WorkspaceDescriptionField
value={formData.description}
onChange={setDescription}
error={formErrors.name?.message}
/>
<WorkspaceDescriptionField value={formData.description} onChange={setDescription} />
Copy link
Member

@ruanyl ruanyl Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does description field have validation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No validation for description field for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I thought we have 200 size limit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the workspace description field will turn to red. And the create workspace button will be disabled when description text over 200 characters. But the "Saved changes" button won't be disabled in the edit mode in workspace detail page. Do we need to add this in current PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with having it in a separate PR

<EuiSpacer size="m" />
<EuiCompressedFormRow
label={i18n.translate('workspace.form.workspaceDetails.color.label', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const WorkspaceDetailFormDetails = ({
value={formData.description}
onChange={setDescription}
readOnly={!isEditing}
error={formErrors.name?.message}
/>
</EuiDescribedFormGroup>
<EuiDescribedFormGroup title={<h3>{detailsUseCaseLabel}</h3>}>
Expand Down
Loading