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

Add blocking signal feature #443

Merged
merged 6 commits into from
Oct 14, 2022

Conversation

fcollonval
Copy link
Member

@fcollonval fcollonval commented Oct 13, 2022

Reference

Add blocking signal feature - this inspired by the Qt signal API.

Use cases are:

  • To reset an object to a given state
  • When you are synchronizing two objects, you need to temporary break the signal loop (this is the primary goal to ease code clarity for synchronizing modelDB and shared models).

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 execution
  • and Signal.blockAll(sender, callback: () => void): void to block all signals during a callback execution from a given sender.

It will block signal emission for the duration of a synchronous callback
@fcollonval fcollonval added the enhancement New feature or request label Oct 13, 2022
@fcollonval fcollonval added this to the 1.x milestone Oct 13, 2022
@fcollonval
Copy link
Member Author

Thanks @afshin for the enhancement

@fcollonval fcollonval merged commit c90adee into jupyterlab:main Oct 14, 2022
@fcollonval fcollonval deleted the ft/add-signal-block branch October 14, 2022 08:45
@fcollonval
Copy link
Member Author

@meeseeksdev please backport to 1.x

@lumberbot-app
Copy link

lumberbot-app bot commented Oct 14, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 1.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 c90adeee035170719731ccb58c06dfdc1c925460
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #443: Add blocking signal feature'
  1. Push to a named branch:
git push YOURFORK 1.x:auto-backport-of-pr-443-on-1.x
  1. Create a PR against branch 1.x, I would have named this PR:

"Backport PR #443 on branch 1.x (Add blocking signal feature)"

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 Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

fcollonval added a commit to fcollonval/lumino that referenced this pull request Oct 14, 2022
krassowski added a commit to krassowski/jupyterlab that referenced this pull request Jan 21, 2023
fcollonval added a commit to fcollonval/lumino that referenced this pull request Jan 23, 2023
fcollonval added a commit that referenced this pull request Jan 23, 2023
fcollonval pushed a commit to krassowski/jupyterlab that referenced this pull request Jan 25, 2023
krassowski added a commit to krassowski/jupyterlab that referenced this pull request Jan 28, 2023
fcollonval pushed a commit to krassowski/jupyterlab that referenced this pull request Feb 8, 2023
fcollonval pushed a commit to krassowski/jupyterlab that referenced this pull request Feb 9, 2023
fcollonval pushed a commit to krassowski/jupyterlab that referenced this pull request Feb 9, 2023
fcollonval added a commit to jupyterlab/jupyterlab that referenced this pull request Feb 9, 2023
* 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>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants