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

monaco: fix focused quick-input #10074

Merged
merged 1 commit into from
Sep 20, 2021
Merged

monaco: fix focused quick-input #10074

merged 1 commit into from
Sep 20, 2021

Conversation

vince-fugnitto
Copy link
Member

What it does

The commit fixes the monaco quick-input styling for entries which are focused by end-users.
The change includes additional vscode colors (registered to the ColorRegistry) and applies them to the focused elements.

The changes should:

  • properly apply the focused background color similarly to vscode.
  • properly style foreground elements for focused entries including label, keybindings, separators.
  • properly style fuzzy results (highlights) when entries are focused so they do not clash with the focused background.
monaco-focused-updates.mp4

How to test

  1. start the application and use multiple themes (light and dark).
  2. confirm that selected entries (through up and down arrow) are properly styled.
  3. confirm that labels, keybindings and separators are displayed properly when focused and otherwise.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added monaco issues related to monaco ui/ux issues related to user interface / user experience labels Sep 9, 2021
@msujew
Copy link
Member

msujew commented Sep 10, 2021

Thanks @vince-fugnitto that looks great! I noticed an issue with the high-contrast theme:

image

There's no way to track the focused element anymore as its background color is also black. Compare to vscode which paints an outline around selected elements:

image

It seems like vscode has special css rules for high contrast themes that handle outlines for different elements.

@vince-fugnitto
Copy link
Member Author

vince-fugnitto commented Sep 10, 2021

Thanks @vince-fugnitto that looks great! I noticed an issue with the high-contrast theme

I think its part of a much bigger issue across the framework #6743 and also present on master. I believe we should tackle it later when we support high contrast theming properly across the framework. What do you think?

@msujew
Copy link
Member

msujew commented Sep 10, 2021

I believe we should tackle it later when we support high contrast theming properly across the framework. What do you think?

Sure, I just didn't notice it on master previously. I have no issues dealing with it in a separate PR.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

LGTM 👍

The commit fixes the styling for the monaco `quick-input` by introducing
additional colors (through the `ColorRegistry`) and applying specific
styling when an entry is currently focused.

The changes should:
- properly apply a foreground color for focused entries (including
  label, keybinding, separator).
- display properly when focused and fuzzy search results are present.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto
Copy link
Member Author

@msujew I updated the pull-request to also style the focused icons similarly to vscode:

For example, in the symbols menu:

active-symbol.mp4

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Quick input icons are now colored correctly as well 👍

@vince-fugnitto vince-fugnitto merged commit 0f7dec1 into master Sep 20, 2021
@vince-fugnitto vince-fugnitto deleted the vf/monaco-focus-bg branch September 20, 2021 12:27
@github-actions github-actions bot added this to the 1.18.0 milestone Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco ui/ux issues related to user interface / user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants