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

Stop word selection plugin highlighting conflicting with searchbar #1290

Merged
merged 11 commits into from
Aug 2, 2023

Conversation

jeremypw
Copy link
Collaborator

Fixes #807

  • Remove word selection plugin highlighting if there are current search matches
  • Make plugin honor case-sensitive setting of searchbar, if searchbar has a search context (to be confirmed).

It is unclear whether the plugin should follow the searchbar settings with respect to case sensitivity or always be case insensitive as at present. Need design input.

@danirabbit
Copy link
Member

I can't confirm the original issue. Can you provide steps to reproduce? Is there something I'm missing here?

Screenshot from 2023-04-24 17 10 56

@jeremypw
Copy link
Collaborator Author

@danirabbit The problem occurs if you

  • Set search option to be case sensitive
  • Select a word (plugin highlights all case-insensitive occurrences )
  • Press Ctrl-F to find case-sensitive matches of selected word
  • The case-insensitive matches are still highlighted.

This PR makes the plugin highlighting match the search case-sensitivity to fix this.

@jeremypw
Copy link
Collaborator Author

@zeebok Thanks for the review!

@danirabbit There is an open design question here regarding whether or not the word highlighting plugin should still follow the search options when there is no current search term. In this PR it now does. As this is a change in behaviour design input would be appreciated.

One drawback of this is the search options are hidden in a popover so it may not be immediately obvious why some words are not highlighted if the user forgets they changed the options to do a search. On the other hand the alternative would mean the behaviour of the plugin changing depending the presence or absence of a search term which is also non-obvious.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Aug 2, 2023

I'll merge this now, any refinements to behaviour can be done in a separate PR.

@jeremypw jeremypw merged commit 9babc15 into master Aug 2, 2023
5 of 6 checks passed
@jeremypw jeremypw deleted the fix-select-highlight-plugin branch August 2, 2023 13:56
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.

Highlight Word Selection plugin interferes with case-sensitive Find
3 participants