Buttons block: 1st button doesn't inherit the preferred default style
Describe the bug in Button Block the "Default Style" is set to "Outline" instead of "Not set"
Steps to reproduce the behaviour:
- Go to 'Editor'
- Add new page
- Click on 'add block'
- Select the block 'Button'
- View the options of 'Default Style' drop down
- 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)
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?
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.
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.
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.
I changed the title of this ticket to make it more clear what the issue is.
There is a draft PR on https://github.com/WordPress/gutenberg/pull/31089 exploring this issue, the problem is the template we pass to inner blocks