-
Notifications
You must be signed in to change notification settings - Fork 5k
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 for "find searches only part of the file" bug #6905
Conversation
bot please update playwright snapshots |
@@ -6,7 +6,7 @@ | |||
"command": "documentsearch:start", | |||
"keys": ["Accel F"], | |||
"selector": ".jp-mod-searchable", | |||
"disabled": true | |||
"disabled": false |
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.
Since these settings only include the keyboard shortcut override, maybe we could actually remove the whole file?
Thanks @ericsnekbytes for working on this! I left a small suggestion above to clean up unused settings files, but otherwise should be good to go. Maybe we can also mention this in the documentation as part of this PR? |
cc @yuvipanda for awareness since you had originally commented on this on the RetroLab issue: jupyterlab/retrolab#294 (comment) As explained in #6697, the motivation for reverting this change is the new virtual implementation of the notebook in JupyterLab (and in Notebook 7). Some cells might not be visible on the page until they are in the viewport. If we keep the shortcut disabled, then the browser search bar is still triggered on So with this PR it's mostly a matter of changing the default. Users who still want the browser search (even though it would not work on hidden elements) would have to disable the shortcut via the settings. |
docs/source/notebook.md
Outdated
Your browser's `find` function will give unexpected results because it doesn't have | ||
access to the full content of a document, but you can still use your browser find | ||
function from the browser menu if you want, or you can disable the intelligent search | ||
shortcut using the advanced settings editor. TODO: DETAILS (investigate settings bug?) |
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.
Should we track this TODO in an isssue?
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.
And if it's a more general issue about settings maybe we can track it on the JupyterLab repo directly: https://github.com/jupyterlab/jupyterlab
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.
@jtpio I've verified that the settings JSON schema that shows up in the advanced settings editor is different than your sample video. The issue is that I don't know the expected schema for the JSON object being edited, and thus how to explain how to disable the shortcut to a user.
There's also the matter of explaining to users what a JSON object is and what a key/value pair is, on top of where those go in the schema to properly disable the shortcut...this is more content that should be communicated in a docs entry. At this point I'm wondering if simply acknowledging the behaviors of intelligent-search and browser-search (which is already done in the docs in this PR) is enough for now...we can merge this in and worry about docs for disabling later. Thoughts?
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.
simply acknowledging the behaviors of intelligent-search and browser-search (which is already done in the docs in this PR) is enough for now...we can merge this in and worry about docs for disabling later.
Yes, and this is likely something to address in JupyterLab actually.
But it would be nice to not leave the TODO
in the docs before merging.
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.
@jtpio That's done, I'm opening a new PR for Lab too and will link it here.
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.
Same docs updates for JupyterLab are at: jupyterlab/jupyterlab#14667
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.
Thank you for working on this @ericsnekbytes. This looks good to me. Please find a suggestion on capitalization for consistency below.
Co-authored-by: Andrii Ieroshenko <[email protected]>
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!
As suggested in #6697, this PR enables the Jupyter Document Search shortcut as a default behavior, so that users will get it by default instead of the browser find tool (Lab and Notebook 7 now only render visible-on-page content in the DOM, so the browser find is not going to work for file content outside the visible/viewport range).