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

Fixes an issue with stats cards breaking out of the container #153

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

cameronterry
Copy link

Description of the Change

Fixes an issue introduced by WordPress 6.0 and above on the columns block within the .pmk-stats group block, where the columns/column blocks were breaking out of the container.

Sadly this involved using !important; there might be a better alternative ...

It seems was first introduced into Gutenberg between December 2022 and January 2023 (WordPress/gutenberg#37436) and then included in WordPress Core with the 6.0 release (https://core.trac.wordpress.org/ticket/55505). I confirmed this by downgrading my local to 5.9.3 (wp core update --version=5.9.3 --force) and the fix in this PR wasn't needed. Upgrading to 6.0, the columns broke and the fix was required.

Closes #135

How to test the Change

  1. Follow plugin installation steps: https://wordpress.org/plugins/publisher-media-kit/#installation.
  2. Publish the "Media Kit" page.
  3. Download and activate the Newspack Base theme.
  4. Visit the "Media Kit" page, ensure the Cards under "Audience Profiles" is partly stacked (3 on top, 2 beneath) as per the screenshot in the README.md file.
  5. Repeat checks for tablet and smartphones, ensuring the display is appropriate for the screensize (i.e. the Cards should be stacked in rows, 1 per card, etc.).

Changelog Entry

Fixed - issue with statistics cards breaking out of container in WordPress 6.0 and above.

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @cameronterry

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly. (N/A)
  • I have added tests to cover my change. (N/A)
  • All new and existing tests pass.

@cameronterry cameronterry self-assigned this Jul 11, 2023
@github-actions github-actions bot added the needs:code-review This requires code review. label Jul 11, 2023
@jeffpaul jeffpaul added this to the 1.3.3 milestone Jul 12, 2023
@jeffpaul jeffpaul requested review from a team and dkotter and removed request for faisal-alvi and a team July 12, 2023 15:11
@dkotter dkotter merged commit 660aeed into develop Jul 12, 2023
12 checks passed
@dkotter dkotter deleted the fix/card-alignment-issue branch July 12, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

This card is going outside of the alignment
3 participants