WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.2k forks source link

Autocomplete: Refactor to use DropdownMenu #64323

Open mirka opened 3 months ago

mirka commented 3 months ago

What problem does this address?

The Autocomplete component is currently implemented with a custom listbox, rather than using a standard component like DropdownMenu. In addition to adding unnecessary code to the bundle, having a custom implementation can introduce subtle differences in styling, keyboard navigation, and accessibility.

Autocomplete DropdownMenu
Darker hover DropdownMenu

Inconsistency discovered in https://github.com/WordPress/gutenberg/pull/64294#discussion_r1705957965

What is your proposed solution?

Refactor the component to use DropdownMenu (possibly DropdownMenuV2).

Ideally, we should first figure out a way to make this component testable in Storybook (related: #25715).

Vrishabhsk commented 4 weeks ago

Hi @mirka 👋

Can I work on this issue?

mirka commented 3 weeks ago

@Vrishabhsk Sure, thanks!