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

ui/ux: styling input validation #12585

Merged

Conversation

vladarama
Copy link
Contributor

What it does

This PR fixes #12243 by providing visual feedback for input validation that is consistent with the input validation in the search-in-workspace and the preferences views. It adds this input validation for the SingleTextInputDialog to create better feedback for the user.

How to test

  1. Try causing an error when renaming a file
  2. Try causing an error when creating a file from the workspace using New File
  3. Try causing an error when creating a new folder from the workspace using New Folder
  4. Try causing an error when editing key bindings using File -> Preferences -> Keyboard Shortcuts
  5. The error styling should be consistent with the one in Preferences and search-in-workspace

Preferences Error Validation:
MicrosoftTeams-image

Easy errors to test include: creating a file/folder with no name or a duplicate name, renaming a file to the same name, creating empty key bindings ...

Review checklist

Reminder for reviewers

@vladarama vladarama marked this pull request as ready for review June 2, 2023 14:29
@vladarama vladarama marked this pull request as draft June 2, 2023 15:17
@vladarama vladarama marked this pull request as ready for review June 5, 2023 13:59
@vince-fugnitto vince-fugnitto added the ui/ux issues related to user interface / user experience label Jun 14, 2023
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

I think we should align with vscode regarding the styling of the validation marker:

image

We need to adjust this:

.theia-settings-container .theia-input[type="number"]:focus {
  outline-width: 1px;
}
.dialogContent .error:not(:empty),
.theia-settings-container .pref-content-container .pref-input .pref-input-container .pref-error-notification {
  border-width: 1px;
}

@vladarama
Copy link
Contributor Author

Thanks for the feedback Mark, aligning the styling with VS Code makes it look a lot cleaner.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@msujew msujew merged commit d2f091a into eclipse-theia:master Jun 29, 2023
9 checks passed
@vince-fugnitto vince-fugnitto added this to the 1.39.0 milestone Jun 29, 2023
@kittaakos
Copy link
Contributor

Hello, please mention such a breaking modification in the changelog next time. Thanks for the great work!

kittaakos pushed a commit to arduino/arduino-ide that referenced this pull request Jul 30, 2023
reverted DOM structure changes in single text input dialogs.
temporary workaround before aligning the validation style in all dialogs

Ref: eclipse-theia/theia#12585

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@vladarama vladarama deleted the gh-12243-dialog-input-validation branch October 12, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/ux issues related to user interface / user experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

dialog: provide visual feedback for input validation
4 participants