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

Button: Style variation name is different in the toolbar vs. the inspector #54987

Closed
richtabor opened this issue Oct 2, 2023 · 2 comments · Fixed by #55008
Closed

Button: Style variation name is different in the toolbar vs. the inspector #54987

richtabor opened this issue Oct 2, 2023 · 2 comments · Fixed by #55008
Assignees
Labels
[Block] Buttons Affects the Buttons Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@richtabor
Copy link
Member

I noticed the button block’s style variation is named “Default” in the inspector (which I consider the primary method for applying variations) and “Fill” in the block toolbar.

These should be consistent. But I’m also curious if style variations should persist in both locations anyhow #54986.

CleanShot 2023-09-13 at 12 38 10
@richtabor richtabor added [Type] Bug An existing feature does not function as intended [Block] Buttons Affects the Buttons Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature labels Oct 2, 2023
@carolinan
Copy link
Contributor

Good find.

This becomes even more confusing if a plugin or theme registers a style and sets that as the default with
isDefault: true

To test, I added this to functions.php in Twenty Twenty-Four:

		register_block_style(
			'core/button',
			array(
				'name'         => 'test',
				'label'        => __( 'test style', 'twentytwentyfour' ),
				'inline_style' => "",
				'is_default'   => true,
			)
		);

The UI shows two button styles named default:
The button block style setting with 3 options: Default, Default, and Outline

@carolinan
Copy link
Contributor

I think the label is wrong though, block variations are the row/stack, columns and query loop variations.

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 [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Status] In Progress Tracking issues with work in progress [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