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

block.json: supports > layout > allowJustification set to false doesn't hide the Justification settings UI #53871

Open
danieldudzic opened this issue Aug 22, 2023 · 3 comments
Labels
[Feature] Blocks Overall functionality of blocks Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended

Comments

@danieldudzic
Copy link

Description

In block.json setting the allowJustification to false in the following way:

{
	"supports": {
		"layout": {
			"default": {
				"type": "flex"
			},
			"allowVerticalAlignment": true,
			"allowJustification": false,
			"allowOrientation": false,
			"allowInheriting": false
		}
	}
}

Doesn't result in a hidden Justification settings UI:
Cursor_i_Single_Product_‹_Template_‹_Editor_‹_productgallery_—_WordPress

Step-by-step reproduction instructions

Add layout support to any block in the following way:

{
	"supports": {
		"layout": {
			"default": {
				"type": "flex"
			},
			"allowVerticalAlignment": true,
			"allowJustification": false,
			"allowOrientation": false,
			"allowInheriting": false
		}
	}
}

Note the Justification settings UI is present in the Block settings sidebar.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

@jordesign jordesign added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks Needs Testing Needs further testing to be confirmed. labels Aug 23, 2023
@github-actions
Copy link

Hi,
This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Sep 23, 2023
@jeremylind
Copy link
Contributor

I think this is either an issue with layouts, or with the block.json schema documentation. The block.json schema says of the allowJustification layout support setting: "For the flex layout type, determines display of justification controls in the block toolbar and block sidebar. For the constrained layout type, determines display of justification control in the block sidebar."

It looks like this block supports setting is only ever read for the constrained layout type though. See

and . No similar check exists for the flex layout type, even though the schema documentation implies that it does.

@brnhrst
Copy link

brnhrst commented Mar 14, 2024

I can confirm that setting allowJustification: false in a block.json currently (WP 6.5 RC1) has no effect on the tools in the editor if the layout type is flex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants