WordPress / gutenberg

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

Dropdown active option indicator misaligned #52001

Open dcalhoun opened 1 year ago

dcalhoun commented 1 year ago

Description

The indicator for the currently selected option within a dropdown menu is misaligned.

This appears to have been introduced in the 22.5 release via https://github.com/WordPress/gutenberg/pull/50665 or https://github.com/WordPress/gutenberg/pull/50907.

Step-by-step reproduction instructions

  1. Add a Heading block[^1].
  2. Tap the "Change level" button (an H2 icon) to open the heading level dropdown menu.

[^1]: Reproducing via heading level may not be possible due to https://github.com/WordPress/gutenberg/issues/51996, but this can be reproduced via block or text alignment dropdown menus as well.

Expected behaviour

The check mark indicating the selected option is flush to the right.

Actual behaviour

The check mark indicating the selected option is slightly to the right of center.

Screenshots or screen recording (optional)

Correct (22.4) Incorrect (22.5)
alignment-correct alignment-incorrect

WordPress information

Device information

dcalhoun commented 1 year ago

@fluiddot not a disruptive or new regression, but it appears this may be the result of recent changes to the Cell component.

fluiddot commented 1 year ago

@fluiddot not a disruptive or new regression, but it appears this may be the result of recent changes to the Cell component.

That's interesting. In the tests we made when updating the Cell component, we covered the different components that used it. However, seems I overlooked DropdownMenu. I'll try to take a quick look in the next few weeks to plan a fix, maybe we could use the RadioControl component as a replacement here 🤔.

devmuhib009 commented 11 months ago

I just checked in my android mobile, heading display label the label at the top. There is no check mark on android. Gutenberg Mobile

devmuhib009 commented 11 months ago

As heading label displaying at the top of H2 heading, it does not allow to select the H2 heading in mobile. I tried to select the H2 heading in various way, but once I change heading from H2 to another, I can't get back to original one.

fluiddot commented 11 months ago

Hey @devmuhib009, thanks for chiming in 👋 . Per the screenshot you shared, it appears you are using the Gutenberg editor in the browser. The original issue only affects the mobile native version of the editor, which is embedded in the WordPress/Jetpack app. Hence, it can only be reproduced using the app.