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

Update Column Block styles for WordPress 5.9. #1020

Merged
merged 4 commits into from
Jan 18, 2022

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Jan 17, 2022

All Submissions:

Changes proposed in this Pull Request:

In the Newspack Blocks suite, we have some column block styles that:

  1. Update the default column block styles, to not wrap until they hit the mobile breakpoint.
  2. Allow you to add borders to the columns.
  3. Allow you to reorder the columns on desktop.

Changes coming in WP 5.9 to add the option to not wrap columns on mobile have overridden some of our own styles. This PR hopefully sorts them out and gets them working again, without causing issues in 5.8.

Closes #1018 and #1019

How to test the changes in this Pull Request:

This will be easiest to test if you can work with two test sites and compare them: one running WordPress 5.8.X, and the other running the 5.9 RC.

  1. In the test site running 5.9 RC, copy this test content to the editor, or add a bunch of column blocks with different settings. Change the page you test to use the one column wide template.
  2. In the test site running 5.8.X, copy this test content to the editor, or add a bunch of column blocks with different settings. Change the page you test to use the one column wide template.
  3. Apply this PR to both sites and run npm run build.
  4. Apply this theme PR to both sites and run npm run build - it updates a couple styles in the theme: Update Column Block styles for WordPress 5.9. newspack-theme#1670
  5. View and compare both posts at different breakpoints. Things to look for include:
  • Making sure the columns block doesn't wrap on mobile when its set not to on the 5.9 site.
  • That the columns styles and spacing look consistent between the different sections.
  • That the border styles and spacing look consistent between the different sections.

Here are some examples of how things should look:

WordPress 5.9

Regular columns:
image

"Don't stack on mobile" setting (the first column doesn't have this checked, and the second one does)

image

Reordered blocks:

image

Columns blocks with borders:

image

WordPress 5.8

Regular columns:
image

Reordered columns:

image

Columns with borders:

image

  1. Review things in the editor and make sure things look fairly consistent between the two versions.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

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

I can still see some significant differences between 5.9 and 5.8, here's what I've identified:

EDIT: The screenshots below are from an instance with Gutenberg's current trunk and do not reflect the current release on 5.9 RC2.

5.9 RC2 5.8 Comment
image image Grid is not behaving the same on equal viewport
image image Difference in grid also causing a border out of place
image image Flex gap disrupting border alignment
image Column containers have bigger margin between them, which doesn't occur on 5.8

@dkoo
Copy link
Contributor

dkoo commented Jan 18, 2022

I'm not seeing the same thing as @miguelpeixe. I found it difficult to compare apples to apples with two different sets of content, so what I did was to paste both sets of content into a single post on both 5.8 and 5.9 sites.

With both sites using the same content, it's easier to see that the styles match well across both WP versions. The main differences I see are:

  • The "Don't stack on mobile" columns do stack in WP 5.8 (as expected, since this is a new feature in 5.9)
  • Slight differences in spacing in the editor, but not on the front-end

@miguelpeixe can you review these two test sites and let us know what you see?

@miguelpeixe miguelpeixe self-requested a review January 18, 2022 17:30
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

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

I'm sorry about that! I was not on 5.9 RC2's Gutenberg. I now can confirm that the columns are behaving as expected!

@laurelfulford
Copy link
Contributor Author

Thank you @miguelpeixe and @dkoo! 🙌

@laurelfulford laurelfulford merged commit a38ce32 into master Jan 18, 2022
@laurelfulford laurelfulford deleted the fix/column-block-styles branch January 18, 2022 18:18
matticbot pushed a commit that referenced this pull request Jan 18, 2022
# [1.45.0-alpha.6](v1.45.0-alpha.5...v1.45.0-alpha.6) (2022-01-18)

### Bug Fixes

* update columns styles for WordPress 5.9 ([#1020](#1020)) ([a38ce32](a38ce32))
* update Subscribe patterns for WordPress 5.9 ([#1017](#1017)) ([5cef283](5cef283))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.45.0-alpha.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jan 19, 2022
# [1.45.0](v1.44.1...v1.45.0) (2022-01-19)

### Bug Fixes

* add Author List block to manifest of blocks to build in production ([#1011](#1011)) ([abd5b7c](abd5b7c))
* add simplified CSS class to carousel to reduce style size ([#983](#983)) ([f8b1b0a](f8b1b0a))
* **author-list:** user query when CAP is not installed ([#1015](#1015)) ([e798d9b](e798d9b))
* force alpha rebuild ([1e55132](1e55132))
* lint errors ([#1010](#1010)) ([c50a1f5](c50a1f5))
* re-add space between stacked columns ([#1022](#1022)) ([d560199](d560199))
* update columns styles for WordPress 5.9 ([#1020](#1020)) ([a38ce32](a38ce32))
* update Subscribe patterns for WordPress 5.9 ([#1017](#1017)) ([5cef283](5cef283))

### Features

* author list block ([#947](#947)) ([b98b8b8](b98b8b8))
* **donate-stripe:** hide fee checkbox if fees are zero ([#985](#985)) ([04e7892](04e7892))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Column block spacing changed in 5.9
4 participants