-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add validations to Monaco #11257
Add validations to Monaco #11257
Conversation
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.
I confirmed that the first part of the steps to test is successful, preferences at higher scopes have precedence and apply (ex: workspace over user).
I did notice however that:
- the browser tests fail on CI
- there is no validation message when setting an invalid preference (even with #11025 I understood that it should happen for manual updates by the user)
I'll check into this.
This is expected: Monaco doesn't provide any indication that the user has done something wrong; it just uses a different value. With this code, the |
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.
The changes are looking good to me 👍
- Preferences scopes seem to use the correct precedence now
- Monaco preferences (minimap, rendering whitespace) continues to work correctly
- Setting a preference manually to an invalid value shows a warning and the default value is applied
8f96b3a
to
2517465
Compare
2517465
to
bb1f3a4
Compare
What it does
Fixes #11241 by removing the buggy
ValidatedPreferenceProxy
implementation in favor of adding validations for a few key preferences to Monaco's own validation system for editor preferences.How to test
editor.fontSize
to some non-default value.Review checklist
Reminder for reviewers