-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix settings editor missing plugins with transform step or registered late #16523
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
Fix settings editor missing plugins with transform step or registered late #16523
Conversation
|
Thanks for making a pull request to jupyterlab! |
protected to enable testing the pre-fetch behaviour
fcollonval
left a comment
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.
Thanks @krassowski
i have a minor suggestion and I spotted a regression. In the settings editor, the plugin list does not update when its status changes from all default values to some custom values:
| .catch(reason => { | ||
| console.error(`Failed to load the plugin list model:\n${reason}`); | ||
| }); | ||
| this._model.changed.connect(() => { |
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.
Should we connect this signal only after this._model.ready to ensure we don't trigger update when the model is not yet ready?
fcollonval
left a comment
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.
Thanks @krassowski
… late (jupyterlab#16523) * Fix setings editor not being loaded for some plugins * Add tests for `PluginList.Model`, expose `SettingsRegistry.ready` as protected to enable testing the pre-fetch behaviour * Handle hanging promises * Connect `model.changed` signal after the model is `ready` * Fix plugin list not updating when settings change from default * Lint test

References
Fixes #15871
Code changes
PluginListandSettingsEditorwhich lead to loading the settings for each plugin twice (this leads to a minimal performance improvement because the fetched plugins were already cached before)PluginList.Modelmodel class which is used by bothPluginListandSettingsEditorPluginList.sortPlugins()- this function was only used to implement the aforementioned duplicated logic; an equivalent function is now one of the private model methodstoSkipoption previously passed to thePluginListconstructor which should now be supplied to thePluginList.ModelinsteadPluginList.registryattribute - the plugin list should not provide the settings registry as it is not its responsibility; private_registryname is to be used going forwardUser-facing changes
transform), the settings are now correctly shown in the editorBackwards-incompatible changes
None