-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Used align hook in columns block; Fixed columns alignment bug; #6364
Conversation
blocks/library/columns/index.js
Outdated
@@ -70,20 +69,11 @@ export const settings = { | |||
}, | |||
|
|||
edit( { attributes, setAttributes, className } ) { | |||
const { align, columns } = attributes; | |||
const { columns } = attributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to introduce a similar change in #5099. If you look at https://github.com/WordPress/gutenberg/pull/5099/files#diff-89d3b001ccbb88ada880aa2d5db1c55bR58, getEditWrapperProps
was also removed because it is handled by hooks.
I did the same in #5099, we use On the technical level, this PR is good to go after no longer needed |
fe79e16
to
cf38d4b
Compare
Hi @gziolo, I'm sorry I did not remember that your PR also did this change. Given that your PR is on hold until we solve the server side blocks challenge, I think it would be ok to merge this one as it solves a bug. We are already using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to go as I mentioned earlier.
cf38d4b
to
7312dd0
Compare
…not passed to the frontend.
7312dd0
to
9c66d50
Compare
This PR makes column class make use of the align hook, by using
supports: align
. This change fixes a bug where align classes were not passed to the frontend.Fixes: #5117
How has this been tested?
Verify the columns block continue to work as expected, verify it is possible to align it to 'wide' or 'full' and then the corresponding class is passed to the frontend.