-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
lineHighlight added to Find but not Search; low highlight contrast #9631
Comments
Visual Studio uses a line highlight for goto file and find in files/search but not for find. In fact, as soon as the user enters the find dialog, the current line highlight is removed hence reducing the potential for confusion when navigating find results. It's definitely helpful in both VS and VS Code for goto line. I think we should keep it for goto line, and either remove it for find or add it for search too. |
Since it was a suggestion by a user to add the line highlight for find, can we add it for search too. As soon as the user selects a search result, we highlight the result and the line, just like we do for find. In addition, lets increase the contrast on the found text. @bgashler1 - can you suggest the right contrast to use? |
@stevencl sure, I'll get that up here soon. |
I've added the current line for the find widget recently. I think the problems we have come from the fact that some colors are defined in a theme and some colors (decorations especially) are hard-coded in CSS with different values for dark vs light. IMHO we need to compute all decorations colors and derive them from the theme or support additional keys in the themes (a theme is an open-ended key-value pair in the end). IMHO This would allow for third-parties to customize all the colors. fyi @aeschli |
@alexandrudima I've noticed that the Search viewlet leverages the After a lot of thought, I think we should actually just go with
Thoughts? In the mean time, I have created a pull request with better contrasting colors for the Find/Replace results and the |
Sorry, I'm not sure I understand what you mean. Here are the current things we have:
The problem that I tried to solve by giving a I have a feeling that the root of all issues is that the In parallel, @sandy081 starts to look into adding support for reading these colors from themes under custom Visual Studio Code theme keys (non standard TM keys), but that is a different discussion. |
@alexandrudima thanks for the explanation. I'm actually seeing something a little different on the Search viewlet, though: The above GIF might be too small to show it, but I'm seeing the current-line for each result I click on in the Search viewlet. It seems part of what you and I want is already working in the Insiders build. It's true that hiding the It seems we have 2 options
If we go with option 2, we could make it more beautiful by hiding the OR, We could treat Find and Search result selections different from user selections so that they can receive a What do you think? |
@bgashler1 I have narrowed down the difference in what we are seeing to a bug in the search viewlet. It appears the search viewlet does not select the result when the replace field is revealed. I believe this is a recent bug, from when the replace logic was added. Let's track that in #11024 . It is especially mean that it makes you think you have a selection there when in fact you don't (look at the status bar). I am fine going either way, but I would prefer the
In parallel, we should extract the color for Please also note the special case that works easily today of multiline emphasis: |
@alexandrudima you convinced me. That's an excellent argument with the regex multiple result. I also like your rationale for lineHighlight being the go to decoration for pointing out something you are looking for, whether it be outline, go to line, find, search, etc. Responding to theme colors that we don't yet respond to such as selection and lineHighlight are great plans along with a computed fallback in case none is provided so that contrast is always strong. Let me know if you need anything else for me on this or related issues. @sandy081 I'd like to tweek the colors in my PR for lineHighlight once you have the lineHighlight theme colors working. |
@bgashler1 Implementation of reading VS Code specific (non standard) settings in TM themes is tracked here #11095. List of settings defined there are already extracted. Please feel free to add more if you think of any. |
Looks like this issue is tracking muliple issues Color for Highlighting a line (Find, Go to line, Outline) is not good enough for all themes.
Search not supporting highlighting the line. Let's use this to track Color for line highlighting and use #11318 for other |
Steps to Reproduce:
@alexandrudima, since this does not also occur in our Search viewlet, it feels inconsistent to me. Also, this line highlight reduces the contrast of the highlighted found text, making it harder to see what is found. Visual Studio IDE also does not use the lineHighlight for this.
After looking issue #2792, I can see the underlying problem that was trying to be solved with helping users find the active highlight, but perhaps it would not be needed if we had a stronger highlight color contrast. At a minimum we should increase that highlight contrast anyway since it would be beneficial with or without the line highlight.
Options:
@stevencl do you have any thoughts on this?
The text was updated successfully, but these errors were encountered: