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

[Preferences] Adjust tool tip text when the preference is not defined. #3334

Closed
lmcbout opened this issue Oct 30, 2018 · 11 comments
Closed

[Preferences] Adjust tool tip text when the preference is not defined. #3334

lmcbout opened this issue Oct 30, 2018 · 11 comments
Labels
json issues related to the json language preferences issues related to preferences

Comments

@lmcbout
Copy link
Contributor

lmcbout commented Oct 30, 2018

In the preference editor, when a preferences does not exist or has been removed, the squiggly line appears under-it. For the tool tip, it says "Property is not allowed". It leads to some confusion.

The tool tip should say "Property is not defined in the schema".

Note: the squiggly line is not in master branch yet, this will be the next thing to fix after issue #3247

@vince-fugnitto
Copy link
Member

@lmcbout what do you believe the error text should be?

In VSCode it looks like they override the default text to Unknown configuration setting.

I don't believe changing Property is not allowed. to Property is not defined in the schema. is overly more informative to end users, the basic idea is that the preference doesn't exist.

@vince-fugnitto vince-fugnitto added json issues related to the json language preferences issues related to preferences labels May 2, 2019
@lmcbout
Copy link
Contributor Author

lmcbout commented May 2, 2019

@vince-fugnitto "Unknown configuration setting" would be good. It is just the current text: "... is not allowed" is not the proper text for a defined preference which is somehow wrong at the moment.

@vince-fugnitto
Copy link
Member

@lmcbout I believe it is a standard json error that the property is not allowed since it does not exist.
Also, I'm not sure if we can differentiate between old preferences which are no longer correct at the moment from those that simply never existed.

@lmcbout
Copy link
Contributor Author

lmcbout commented May 2, 2019

@vince-fugnitto The preference being defined does no prevent Theia to load, it is just that the variable is not known with the current configuration. So reporting it as "Not allowed" seems inappropriate .

@vince-fugnitto
Copy link
Member

vince-fugnitto commented May 2, 2019

@lmcbout the preference is not actually defined, therefore json does not know anything about it, meaning it returns the warning property {preference} is not allowed.

@lmcbout
Copy link
Contributor Author

lmcbout commented May 2, 2019

@vince-fugnitto This could happen when an extension is not part of your current configuration, but may be good when loading a second Theia configuration, you don't want to remove this pref momentarily, so "is not allowed" is not appropriate

@vince-fugnitto
Copy link
Member

@lmcbout yes but as I mentioned, there is no way to distinguish preferences which are invalid and those which may be valid in a different IDE, so the warning is fine (it informs users that the current preference is not allowed and will not take effect). If they ever go to the other IDE, then the preference will simply apply, but there is no way to distinguish if it is valid in a different context.

@vince-fugnitto
Copy link
Member

Say for a moment in time I have the cpp extension which gives me the cpp.clangTidy preference.
Opening a Theia version without the extension means that my cpp.clangTidy preference will no longer be valid in the current format of my Theia.

It is the same error as if I have a a.b preference which is never valid. Theia cannot distinguish the two.

@lmcbout
Copy link
Contributor Author

lmcbout commented May 2, 2019

@vince-fugnitto I think it is wrong info being displayed, if you want to keep it the way it is, just close this ticket. There is no way to distinguish whether this pref is for another config or is invalid the way it is written, b ut saying "is not allowed" is too strong word for this purpose.

@vince-fugnitto
Copy link
Member

@lmcbout I'd be fine to change it to what VSCode has (Unknown configuration setting.) if you believe the default Property is not allowed. be too strong.

@vince-fugnitto
Copy link
Member

I'll close the issue for now, I believe property ${name} is not allowed is sufficiently descriptive for end-users to understand that the property they provided is not valid or supported. Moreover, based on previous discussions in the issue, there is no way to distinguish a valid preference from a now removed extension and preferences which were never valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
json issues related to the json language preferences issues related to preferences
Projects
None yet
Development

No branches or pull requests

2 participants