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

Feature: added justification option on columns block #63459

Open
wants to merge 9 commits into
base: trunk
Choose a base branch
from

Conversation

up1512001
Copy link
Contributor

What?

  • add block control for justification.

Why?

Fixes #63458

How?

  • added JustifyContentControl to columns block.

Screenshots or screencast

Screen.Recording.2024-07-12.at.01.47.00.mov
Copy link

github-actions bot commented Jul 11, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pengsteven418.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: pengsteven418.

Co-authored-by: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@fabiankaegy fabiankaegy added [Type] Enhancement A suggestion for improvement. [Block] Columns Affects the Columns Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Jul 11, 2024
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flex justification controls are already an option that can be enabled via the allowJustification sub key of the layout block support:

https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-supports.md#layout

I think currently allowEditing is removing all those layout options. But this can be refactored to be more specific using the individual support options.

@up1512001 up1512001 force-pushed the feature/columns-justification branch from 2360e8b to b99eaed Compare July 14, 2024 18:11
"allowEditing": false,
"allowEditing": true,
"allowJustification": true,
"allowVerticalAlignment": false,
Copy link
Contributor Author

@up1512001 up1512001 Jul 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are adding vertical alignment using BlockControls we don't need to display it multiple times.

<BlockControls>
				<BlockVerticalAlignmentToolbar
					onChange={ updateAlignment }
					value={ verticalAlignment }
				/>
			</BlockControls>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if we remove that then vertical alignment will not be applied to individual column.

@up1512001
Copy link
Contributor Author

Hi, @fabiankaegy can you please review this PR, thanks.

@pengsteven418
Copy link

this person up1512001 copies other people content

@up1512001
Copy link
Contributor Author

this person up1512001 copies other people content

@pengsteven418 please check once before blaming someone this issue is reported by me and I have raise PR for same.

@up1512001
Copy link
Contributor Author

@talldan can you please review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.
3 participants