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

Layout: Move generation of util classes to existing method to avoid adding global public method WP #41885

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

glendaviesnz
Copy link
Contributor

What?

Moves adding several layout utility classnames to blocks that have layout attributes specified into gutenberg_render_layout_support_flag instead of own method.

Why?

To avoid adding a potentially temporary method to global wp_ scope in 6.0.1 release.

How?

Copy pasta from one place to another

Testing Instructions

  • Add a Buttons block with one child Button block
  • On parent Buttons block set alignment to centre and turn off the wrapping option
  • Check that is-content-justification-center and is-nowrap classes are added in editor and frontend

Screenshots or screencast

Screen Shot 2022-06-02 at 11 17 33 AM

@glendaviesnz glendaviesnz added the CSS Styling Related to editor and front end styles, CSS-specific issues. label Jun 23, 2022
@glendaviesnz glendaviesnz self-assigned this Jun 23, 2022
@glendaviesnz glendaviesnz marked this pull request as ready for review June 23, 2022 03:03
@andrewserong andrewserong added the [Type] Code Quality Issues or PRs that relate to code quality label Jun 23, 2022
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

Thanks for following up @glendaviesnz:

✅ Code change looks good, class names are still rendering in the editor and on the site front end
✅ Orientation works as expected
✅ Content justification works as expected
is-nowrap class is added when expected

LGTM!

@glendaviesnz glendaviesnz merged commit 74e4714 into trunk Jun 23, 2022
@glendaviesnz glendaviesnz deleted the move/layout-util-class-generation branch June 23, 2022 05:05
@github-actions github-actions bot added this to the Gutenberg 13.6 milestone Jun 23, 2022
@mburridge mburridge added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 14, 2022
@mburridge
Copy link
Contributor

Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release.

@bph bph mentioned this pull request Sep 14, 2022
89 tasks
@glendaviesnz glendaviesnz added Needs Dev Note Requires a developer note for a major WordPress release cycle and removed Needs Dev Note Requires a developer note for a major WordPress release cycle labels Sep 14, 2022
@glendaviesnz
Copy link
Contributor Author

Thought it didn't need a dev note, but maybe it does, depends if the utility classnames is covered elsewhere or not, will try and work that out

@glendaviesnz
Copy link
Contributor Author

Relevant details about this will be covered in dev note for #40875

@glendaviesnz glendaviesnz removed the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants