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

Highlight global search matches on code editor #1524

Merged
merged 2 commits into from
Feb 22, 2018

Conversation

Redsandro
Copy link
Contributor

@Redsandro Redsandro commented Feb 9, 2018

I like to see the global search matches in the markdown editor for productivity reasons. I implemented this for personal use, and I hope it will be useful to others.

This partially addresses #755.

This PR makes it more evident that the global search box could really use both an "x" symbol that appears to clean/delete the current input (for touch users) or having the escape key clean the input (for keyboard users), but that is beyond the scope of this PR. See #1525.

@Redsandro
Copy link
Contributor Author

image

@kazup01 kazup01 added the awaiting review ❇️ Pull request is awaiting a review. label Feb 11, 2018
@sosukesuzuki
Copy link
Member

2 -19-2018 14-21-07
If we update keyword in search box, code editor is hidden and markdown preview is shown.
This behavior is not great.

@kazup01 kazup01 added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed awaiting review ❇️ Pull request is awaiting a review. labels Feb 19, 2018
@Redsandro
Copy link
Contributor Author

Redsandro commented Feb 19, 2018

@sosukesuzuki I hadn't observed that. I think it's because I have split view enabled by default, and you have the preview by default.

I will examine this further.

@Redsandro
Copy link
Contributor Author

Redsandro commented Feb 20, 2018

@sosukesuzuki said:

If we update keyword in search box, code editor is hidden and markdown preview is shown.

I have examined this. What you are observing is original behavior by Boostnote. If you search, your list of notes refreshes, the code editor closes, and a new note from the list is viewed in the preview. It was already like this, by design (not by me).

This PR adds global search highlighing in the code editor. It touches or changes nothing else. Especially useful in dual pane editing. Whether or not the editor should close when search is used, is not decided, designed, or changed by this PR. It is also not in the scope of this PR.

If the note selected by search should be opened in the code editor by default (e.g. when the code editor was previously selected), this should be a separate PR or feature request.


I have rebased the PR on the updated master.

Please consider merging this PR as it will be useful for some, and consider writing a PR for the extra functionality you think would be useful to others as a result of this added feature.

@Rokt33r Rokt33r added awaiting review ❇️ Pull request is awaiting a review. and removed awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels Feb 21, 2018
@Rokt33r Rokt33r added next release (v0.9.1) and removed awaiting review ❇️ Pull request is awaiting a review. labels Feb 22, 2018
Copy link
Member

@Rokt33r Rokt33r left a comment

Choose a reason for hiding this comment

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

Great work!

@Rokt33r Rokt33r merged commit cb1da60 into BoostIO:master Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants