Skip to content

Conversation

@donnie-msft
Copy link
Contributor

@donnie-msft donnie-msft commented Aug 30, 2022

Bug

Fixes: NuGet/Home#10978

Regression? Last working version:

Description

Behavior changes:

  • ComboBoxes in PM UI now use the same Styles as VS Common Controls. This provides a background color contrast and a border around the hovered item.

  • Selected Items no longer have a background color. The reasoning is the selected item is always displayed in the textbox. The Search control already had this behavior.

    • image
  • Switch ThemedComboStyleKey to ComboBoxStyleKey which is preferred by Platform unless there's a specific need.

  • Use the new VsResourceKeys.ComboBoxItemStyleKey which required a reference update of VS Platform (I requested in Bug 1470750: Add VsResourceKeys.ComboBoxItemStyleKey to allow other components to get standard VS look and feel

    • Side effect: analyzers are now enforcing VS threading rules, so had to fix those
  • Removed the no longer necessary custom Styles for ComboBox.

  • Removed static styles.cs class, since I could find no evidence of it accomplishing anything beyond referencing the styles directly.

Drop-down/ComboBoxes affected:

  1. Project PMUI Details Pane: Versions (see below sections demoing 3 themes)
  2. Solution PMUI Details Pane: Versions
    image
  3. Package Source
    image

Blue theme

Before (left) / After (right)
image

Dark theme

Before (left) / After (right)
image

Light theme

Before (left) / After (right)
image

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A - I expect when we update documentation, screenshots taken will capture the new colors.

@donnie-msft donnie-msft force-pushed the dev-donnie-msft-comboboxStyling2 branch from c479f6b to bccf672 Compare August 30, 2022 04:54
@donnie-msft
Copy link
Contributor Author

I noticed ComboBoxes no longer have dashed-lines around the focused item. Checking on this before I open PR.

@donnie-msft
Copy link
Contributor Author

I noticed ComboBoxes no longer have dashed-lines around the focused item. Checking on this before I open PR.

This is default WPF ComboBox behavior, and existing behavior for PM UI. Documented investigation and ideas at https://github.com/NuGet/Client.Engineering/issues/1831

@donnie-msft donnie-msft marked this pull request as ready for review August 30, 2022 20:15
@donnie-msft donnie-msft requested a review from a team as a code owner August 30, 2022 20:15
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.

[Bug Bash]The new designs of hovered-on menu between VS and NuGet are inconsistent

4 participants