-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Improve focus behaviour in search #14387
Conversation
Thanks for making a pull request to jupyterlab! |
626021c
to
8c25d16
Compare
cbf1108
to
0dfab76
Compare
0dfab76
to
7256388
Compare
Merged master to clean update-links job failure that was addressed earlier. |
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 for working on this.
@andrii-i can we merge this one or did you have any specific feedback here? |
Merging now to get it in the RC |
@krassowski Good to merge, no feedback on my end, it was mentioned as needing a review last week but I have not came around to reviewing. Thanks for reviewing @fcollonval. |
which included jupyterlab#14387 enabling to finish the tests off
* Draft for automatically toggling search in selection * Implement `jp-mod-search-active` class, add `await`s * Draft unit tests for `getSelectionState` (currently failing) * Harmonise setting values to end with `-selected` * Interpret having an active cell as not having any selected cells for purposes of auto-selection toggling, as this would always toggle search in cell selection (which we can revisit if we get user feedback). * Add integration tests for auto-selection and toggle shortcut * Fix typos, polish docs * Attempt to fix flaky test * Update test after merge with master which included #14387 enabling to finish the tests off * Update shortcuts snapshot (not sure why it changes)
References
Fixes #14308
Depends on codemirror/view@f49f2ee included in @codemirror/view 6.9.5, therefore required #14413
Code changes
SearchStartAnchor
type to disambiguate the search start behaviour allowing to fix highlighting issuesIHighlightAdjacentMatchOptions
interface to specify whether highlighting should scroll/select new matchUser-facing changes
Extending selection after changing to command mode now works smoothly (does not revert to edit mode, which was caused by CodeMirror bug, and is faster - which was previously slowed down by needless cleaning of highlights due to both
activeCellChanged
andselectionCellChanged
handlers being used - now the shared job will only be performed once).Initial match is set consistently across various scenarios, e.g.:
Including, in file editor, and when populating search box from selection (regardless of selection direction):
Backwards-incompatible changes
N/A