Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- `CustomSelectControl`: Restore `describedBy` functionality ([#63957](https://github.com/WordPress/gutenberg/pull/63957)).
- `Button`: Improve the aria-disabled focus style ([#62480](https://github.com/WordPress/gutenberg/pull/62480)).
- `Modal`: Fix the dismissal logic for React development mode ([#64132](https://github.com/WordPress/gutenberg/pull/64132)).
- `Autocompleter UI`: Fix text color when hovering selected item ([#64294](https://github.com/WordPress/gutenberg/pull/64294)).

### Enhancements

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/autocomplete/autocompleter-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ function ListBox( {
'components-autocomplete__result',
className,
{
// Unused, for backwards compatibility.
'is-selected': index === selectedIndex,
}
) }
variant={ index === selectedIndex ? 'primary' : undefined }
onClick={ () => onSelect( option ) }
>
{ option.label }
Expand Down
6 changes: 0 additions & 6 deletions packages/components/src/autocomplete/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,4 @@
&:focus:not(:disabled) {
@include block-toolbar-button-style__focus();
}

&.is-selected,
&:not(:disabled,[aria-disabled="true"]):active {
background: $components-color-accent;
Copy link
Member

Choose a reason for hiding this comment

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

I'm personally fine with that change 👍

Do we need a design approval on the darker hover of the selected item?

Copy link
Member

Choose a reason for hiding this comment

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

@WordPress/gutenberg-design

Darker hover

I think it's fine for now, as it's consistent with the primary Button variant. However, I'm wondering if these styles should eventually be refactored/consolidated with DropdownMenu(v2). I think we can say they are the same UI pattern, but the selected item is styled differently:

DropdownMenu

Copy link
Contributor

Choose a reason for hiding this comment

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

Hover color looks fine and is consistent with primary buttons. I'd agree the more we can consolidate, simplify, the better.

Copy link
Member

Choose a reason for hiding this comment

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

Extracted to new issue: #64323

color: $white;
}
}