-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Update completer part 3 #12219
Update completer part 3 #12219
Conversation
Thanks for making a pull request to jupyterlab! |
0d7e387
to
6d03704
Compare
1c81814
to
90cceac
Compare
fe206ed
to
ec887dc
Compare
Restart CI |
packages/completer/src/manager.ts
Outdated
); | ||
} | ||
|
||
get providersActivated(): ISignal<ICompletionProviderManager, void> { |
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.
Design question, are you interested by listening to the changes in the active providers or in the readiness of the manager at load time?
If this is the second, I would use a ready
attribute:
get ready(): Promise<void>
If not, the signal is good, I would use anoterh name like activeProvidersChanged
to better reflect when the signal is emitted (as it will be emitted on settings update too).
Look for example at
jupyterlab/jupyterlab/packages/apputils/src/sessioncontext.tsx
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.
Indeed I need to call the slot on the provider changed event since I need to update existing completer handlers with the new provider setting.
I'll rename the signal to reflect its intent.
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 got a question about the intent.
ec887dc
to
9fe4806
Compare
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.
Minor suggestions on the doc and it is good to go for me.
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Thanks @fcollonval for the review and suggestion! |
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 @trungleduc
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. The mean relative comparison is computed with 95% confidence. Results table
Changes are computed with expected as reference. |
References
This PR allows completer providers to customize the completer widget model and fixes an issue of activating completer before all providers are registered.
Code changes
providersActivated
), that is emitted when all providers are registered.modelFactory
method to the provider interface.User-facing changes
N/A
Backwards-incompatible changes
N/A