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

Buttons block: 1st button doesn't inherit the preferred default style #27217

Closed
kmadhak opened this issue Nov 24, 2020 · 5 comments · Fixed by #31089
Closed

Buttons block: 1st button doesn't inherit the preferred default style #27217

kmadhak opened this issue Nov 24, 2020 · 5 comments · Fixed by #31089
Labels
[Block] Buttons Affects the Buttons Block [Type] Bug An existing feature does not function as intended

Comments

@kmadhak
Copy link

kmadhak commented Nov 24, 2020

Describe the bug
in Button Block the "Default Style" is set to "Outline" instead of "Not set"

Steps to reproduce the behaviour:

  1. Go to 'Editor'
  2. Add new page
  3. Click on 'add block'
  4. Select the block 'Button'
  5. View the options of 'Default Style' drop down
  6. See error

Expected behaviour
instead of showing "Outline" in drop down we have to show "Not set" as default in drop down

Screenshots
https://prnt.sc/vovex9

Video
for more detail please view the attached video
https://www.loom.com/share/93958a6d4c3b427bad3c16a33a6af450

Editor version:
WordPress version: 5.6-RC1

Desktop:
OS: Windows
Browser chrome
Version 86.0.4240.193 (Official Build) (64-bit)

@tellthemachines
Copy link
Contributor

I can't reproduce this in Chrome on Windows. Adding a Buttons block, the Style is set to "Fill" and Default style is "Not set".

@kmadhak are you using any particular theme or plugin that might be setting a different default?

@tellthemachines tellthemachines added the [Status] Needs More Info Follow-up required in order to be actionable. label Nov 27, 2020
@kmadhak
Copy link
Author

kmadhak commented Nov 27, 2020

Hello @tellthemachines, thanks for providing the replay.

As I am not using and plugin or different theme setting then also the button Default style is "Outline" instead of "Not set", for more details I have attached a video, please look into it and let me know your feedback.

Video: https://www.loom.com/share/cb768f7e5bc64350be42e6d2fc16da26

Thank you.

@tellthemachines
Copy link
Contributor

Thanks for the video @kmadhak ! After some testing I think I've found the cause: when you change the default style in a Buttons block, the browser will store that option, and the next time you add a Buttons block to a post it will have whichever option you previously chose selected by default. You can confirm this by logging into your site in incognito mode, or from a different browser, and verifying that the default style is displaying correctly as "Not set".

I did find a bug in how this works: if the default style is set to "Outline", the block should automatically adopt that style when added to the page. That isn't currently happening: if I set my default style to "Outline" and add a new block, its style is still "Fill". I can also reproduce this issue in 5.5.3, so it's not a 5.6 regression.

@tellthemachines tellthemachines added [Block] Buttons Affects the Buttons Block [Type] Bug An existing feature does not function as intended and removed [Status] Needs More Info Follow-up required in order to be actionable. labels Nov 29, 2020
@kmadhak
Copy link
Author

kmadhak commented Apr 27, 2021

Hello @tellthemachines,

Greetings of the day!!!

I would like to know the progress of this issue, please let me know if you need more detail on it.

Thank you.

@aristath aristath changed the title Button Block: the "Default Style" is set to "Outline" instead of "Not set" Buttons block: 1st button doesn't inherit the preferred default style Apr 27, 2021
@aristath
Copy link
Member

I changed the title of this ticket to make it more clear what the issue is.
There is a draft PR on #31089 exploring this issue, the problem is the template we pass to inner blocks

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

Successfully merging a pull request may close this issue.

3 participants