-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Scroll to cell by ID based on hash fragment #13285
Conversation
Thanks for making a pull request to jupyterlab! |
66f4077
to
0ca3f44
Compare
b69357c
to
08a1c37
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.
Thanks @krassowski
Would you mind adding some information in the documentation about this?
`CSS.escape` was no longer correct since the rewrite to manual iteration over cells to fetch headings, since we no longer use `querySelector` and instead compare to actual heading IDs.
a90a597
to
f0282b3
Compare
Good point. Documentation added, ready for another round of review/merge. |
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 a lot @krassowski
The cell properties side panel snapshot is not sized correctly when updated.
Lately we are having again side panel sizing flakiness 😢 I think this is linked to #13037 that changes the workspace restoration logic.
please update documentation snapshots |
Kicking the CI |
Thanks @krassowski for making the test more robust. I saw that there is a regression on |
I did not find a quick way to improve that one, so just reverted the assets. The visual tests are passing now but |
I confirm this is not related. Thanks Mike - merging now. |
References
Reference implementation for jupyter/nbformat#317.
Fixes a 4.0-only regression in jumping to headings which had CSS-escapeable characters.
Closes #12928.
Code changes
setFragment
is now always called for notebook on route change, whether in full windowing mode or notCSS.escape
which was no longer correct and breaking jumping to headings with characters that would be escaped (it was useful back then when we were usingquerySelector
, see Allow cross-file anchors with leading number #11517, but not since we migrated to manual searching for heading in Windowed (Virtual) notebook #12554)User-facing changes
#cell-id=my-cell-id
will scroll to the cell with such an id.Backwards-incompatible changes
Links to headings starting with
cell id=
will now need to be updated withheading=
prefix (I don't think there are many headings like that used in the wild).