fix(FE): prevent saving view with empty label #6446
+6
−0
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.
PR Title:
[FE]: Prevent Saving View with Empty or Whitespace-Only Label
PR Description:
Issue:
Currently, the application allows users to save views with an empty or whitespace-only label, leading to confusion and inconsistent naming in the UI.
Fix:
This PR introduces a validation check for the "Label" field in the "Save this view" dialog to ensure that the label contains non-whitespace characters before allowing the view to be saved. If the label is empty or only contains spaces, an error message will prompt the user to enter a valid label.
Changes:
Screenshots
How to test:
Additional Context:
This fix addresses the UX issue where users could save views with invalid labels, making it difficult to manage views later. With the validation in place, users are required to enter a meaningful label before proceeding.
Important
Adds validation in
ExplorerOptions.tsx
to prevent saving views with empty or whitespace-only labels, displaying an error message if invalid.onSaveHandler
inExplorerOptions.tsx
to prevent saving views with empty or whitespace-only labels.This description was created by for 152c91a. It will automatically update as commits are pushed.