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

Fix windowed notebook and ToC getting broken on reloading from disk #16013

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Mar 18, 2024

References

Fixes #15415

Code changes

  • adds a test case for headingsChanged being emitted by NotebookToCModel on cell insertion, deletion and reloading the model
  • fixes the comparison of heading equality which was preventing updates after reloading file from disk by introducing a new TableOfContentsModel.isHeadingEqual() method which can be overridden in subclasses
  • fixes windowing breaking on revert by adding a guard widget !== this._willBeRemoved in the conditional check sensing if the active cell should be softly detached (or removed)

User-facing changes

ToC/windowing works well when pressing "Revert" button.

Backwards-incompatible changes

None

@krassowski krassowski added the bug label Mar 18, 2024
@krassowski krassowski added this to the 4.2.0 milestone Mar 18, 2024
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Adds missing guard for not going into the soft detach
mode when the cell is scheduled to be removed altogether
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I tried with the built assets from the check_release run and it looks like it fixes the issue.

@jtpio jtpio merged commit 66ed610 into jupyterlab:main Mar 22, 2024
83 checks passed
krassowski added a commit to krassowski/jupyterlab that referenced this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windowed notebook/ToC breaks after File Changed/"Revert" dialog
2 participants