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 getInitialQuery to documentsearch interface #6256

Merged
merged 1 commit into from Apr 27, 2019

Conversation

aschlaep
Copy link
Member

As suggested on #6081 by @gabegrand, this adds getInitialQuery to the ISearchProvider interface. This allows the SearchInstance to get the initial query (set as any because it could be any type of object in the future when we support other search widgets), populate the search box and start a search. To the user, this means that if you have a word selected and press ctrl + f, a search box will open populated with that word, all of the matches will be highlighted, and the selected match will be in yellow. This logic only activates when the search box is initially created, so it won't ever clobber existing text in the search box. Lastly, because search doesn't support newlines, if a selection contains newlines at the time of search box creation, the box will not be populated. @jasongrout

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@jasongrout jasongrout added this to the 1.0 milestone Apr 27, 2019
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Bellisimo!

@blink1073 blink1073 merged commit 392dba9 into jupyterlab:master Apr 27, 2019
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Aug 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants