-
-
Notifications
You must be signed in to change notification settings - Fork 128
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 blocking signal feature #443
Conversation
It will block signal emission for the duration of a synchronous callback
Co-authored-by: Afshin Taylor Darian <git@darian.email>
Thanks @afshin for the enhancement |
@meeseeksdev please backport to 1.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
This was added in jupyterlab/lumino#443.
This reverts commit c90adee.
This was added in jupyterlab/lumino#443.
This was added in jupyterlab/lumino#443.
This was added in jupyterlab/lumino#443.
This was added in jupyterlab/lumino#443.
This was added in jupyterlab/lumino#443.
* Upgrade lumino packages `2.0.0-alpha.6` → `2.0.0-beta.0` * Add `Signal.block()` shim after updating lumino. This was added in jupyterlab/lumino#443. * Disable notebook toolbar paint containment Overriding lumino 2.0 default strict CSS containment * Bump to Lumino 2 beta 1 Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com> * Restore partial border effect for menu, remove commented style introduced in #13276 * Revert changes to staging * Increase specificity of menu selectors in tests * Update Playwright Snapshots * Update Playwright Snapshots * Workaround issues with cell unrendering/state * Update Playwright Snapshots * Update Playwright Snapshots * Fix rendering markdown cell * Fix js-cell test Big thanks to @brichet * Convert the signal to a promise prior to carrying the action triggering the signal * Fix more selector * Update snapshots --------- Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frédéric Collonval <fcollonval@gmail.com>
Reference
Add blocking signal feature - this inspired by the Qt signal API.
Use cases are:
It will block signal emission for the duration of a synchronous callback
Code changes
Add
ISignal.block(callback: () => void): void
to block a single signal during a callback executionSignal.blockAll(sender, callback: () => void): void
to block all signals during a callback execution from a given sender.