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

Probably unintentional alignment button appears on button block toolbar #38331

Open
kurudrive opened this issue Jan 28, 2022 · 3 comments
Open
Labels
[Block] Buttons Affects the Buttons Block [Type] Bug An existing feature does not function as intended

Comments

@kurudrive
Copy link
Contributor

kurudrive commented Jan 28, 2022

Description

Hi there.
Thanks for Gutenberg team's effort.

Only when you place a new button will the button block toolbar display an unintended alignment UI.
It disappears when you enter any characters, so it's probably a bug.

Step-by-step reproduction instructions

  1. Input /button on editor
  2. select Buttons block and put on editor.
  3. Click Button(Not Buttons) Block
  4. I see the "justify item alignment" button, but I also see the "Change alignment" button
  5. Input any characters.
  6. The "Change alignment" button disappears.

Screenshots, screen recording, code snippet

gutenberg-button-align-toolbar-bug.mov

button-alignment-toolbar-bug

Environment info

  • WordPress 5.9 only
  • WordPress 5.9 with Gutenberg 12.4.1
  • Theme : TT2
  • Browser : Chrome
  • Device : Mac OS 11.6

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@amustaque97 amustaque97 added [Block] Buttons Affects the Buttons Block Needs Testing Needs further testing to be confirmed. labels Jan 29, 2022
@Trapsta
Copy link
Contributor

Trapsta commented Feb 17, 2022

@kurudrive Thanks for reporting, but I believe this is not a bug and is the intended behaviour. The children buttons' toolbar "absorbs" the relevant parents controls to make it easier and more intuitive to change the parent's attributes without constantly switching between parent and child. You can find more context in #26313

@talldan
Copy link
Contributor

talldan commented Feb 28, 2022

I think the confusing UI is an issue, even if it is intentional to show the parent block's controls. Most users wouldn't know which of the duplicate controls to use.

I'm also not sure why it disappears. 🤔

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Aug 25, 2022
@mrfoxtalbot mrfoxtalbot added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. labels Sep 13, 2022
@mrfoxtalbot
Copy link

mrfoxtalbot commented Sep 13, 2022

Thank you for reporting this @talldan. I can still reproduce what you described:

Screen Shot on 2022-09-13 at 09:52:00

It is worth mentioning that the content of each button's dropdown is actually different:

Screen.Capture.on.2022-09-13.at.09-52-18.mp4

Thank your for mentioning #26313, @Trapsta.

The children buttons' toolbar "absorbs" the relevant parents controls to make it easier and more intuitive to change the parent's attributes without constantly switching between parent and child.

I am not sure this applies to this case, though. If you look at the parent buttons block, it only has one alignment button.

Screen Shot on 2022-09-13 at 09:57:17

Additionally, as soon as the justification is changed on the parent buttons block, the second alignment button will disappear:

Screen Shot on 2022-09-13 at 09:58:36

Aside from the above, I do not understand the goal of individual buttons showing width and alignment settings this way. I agree with @talldan that this can lead to a lot of confusion.

I the light of all the reasons above, I do think this is a bug. I am going to remove the Stale label and add the Bug one.

Thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants