-
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
Catch schema change event in order to have actual representation of user preferences #6510
Conversation
We should test that selection and expansion are preserved when schema is changed. |
@vzhukovskii please squash follow-up fixes for code clean ups and issues introduced by a PR itself in the original commit: https://github.com/eclipse-theia/theia/blob/master/doc/pull-requests.md#checklist-commit-history |
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.
Tested using sample plugin from How to test
section - the issue is fixed for me: plugin preferences are displayed after page refreshing.
…ser preferences Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
de07cc8
to
69f24d5
Compare
Changes squashed into single commit. |
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 think you can merge if noone objects and CI is green
What it does
This changes proposal fixes the problem, when user preference tree wasn't respect preference schema change event. The problem was in initializer code fragment that collect combined preference scheme during tree create. Here is a sample of plugin, that has definition of preference in package.json. The flow of representing problem. HostedPluginSupport initialize and calls load function and then doLoad where loads contribution and handle it, calling this function. Then it takes contribution configuration and operates with scheme, setting it up into preference provider where preference changed event fires and nothing appears. So there is a reason to subscribe preference tree listen to this kind of event to be able to update the representation of preference tree when schema changes.
There is a linked issue for this problem: eclipse-che/che#15001
Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com
How to test
Clone this sample plugin, build it and place in
theia/plugin
directory and start theia. In master branch there is a problem, when user refreshes the page where opened preference editor and after refresh configuration from the custom contribution disappears.Review checklist
Reminder for reviewers