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

Image block: Fix margin issue in editor #1781

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

laurelfulford
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

A recent change added a zero margin to floated images, which caused them to meet up with the text in the editor preview when you use the default template.

This PR removes it, and re-adds it for the one column and one column wide templates, so the images aren't pushed further out for those.

Closes #1780

How to test the changes in this Pull Request:

  1. Create a post using the default template; add some text and two image blocks, one floated left and one floated right.
  2. Note the lack of spacing next to the images:

image

  1. Apply the PR and run npm run build.
  2. Confirm that the images now have a little breathing space:

image

  1. Test with the One Column and One Column Wide templates as well, just to confirm they look okay. You'll need to switch the template, click 'Update' then refresh to get the updated styles. There is more space than on the front end (a limitation of this style with all the extra markup in the editor), but they should look roughly like:

image

image

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?

@laurelfulford laurelfulford added [Status] Needs Review The issue or pull request needs to be reviewed Smaller PR This PR is smaller and quick to test. labels Apr 21, 2022
@laurelfulford laurelfulford requested a review from a team as a code owner April 21, 2022 22:11
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Apr 21, 2022
@laurelfulford
Copy link
Contributor Author

Thanks Derrick!

@laurelfulford laurelfulford merged commit cf4e008 into master Apr 22, 2022
@laurelfulford laurelfulford deleted the fix/1780-floated-image-preview branch April 22, 2022 16:49
matticbot pushed a commit that referenced this pull request May 2, 2022
# [1.58.0-alpha.1](v1.57.2...v1.58.0-alpha.1) (2022-05-02)

### Bug Fixes

* correct margin issue in editor with floated images ([#1781](#1781)) ([cf4e008](cf4e008))
* make sure captions and credits inherit colours ([#1775](#1775)) ([302b2e3](302b2e3))
* make sure links remain white in the carousel block ([#1778](#1778)) ([88f20e9](88f20e9))
* remove unneeded featured image content option ([#1776](#1776)) ([1afddcf](1afddcf))

### Features

* add custom style to subscribe patterns ([#1760](#1760)) ([83a836e](83a836e))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.58.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request May 3, 2022
# [1.58.0](v1.57.2...v1.58.0) (2022-05-03)

### Bug Fixes

* correct margin issue in editor with floated images ([#1781](#1781)) ([cf4e008](cf4e008))
* make sure captions and credits inherit colours ([#1775](#1775)) ([302b2e3](302b2e3))
* make sure links remain white in the carousel block ([#1778](#1778)) ([88f20e9](88f20e9))
* remove unneeded featured image content option ([#1776](#1776)) ([1afddcf](1afddcf))

### Features

* add custom style to subscribe patterns ([#1760](#1760)) ([83a836e](83a836e))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.58.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @alpha released Smaller PR This PR is smaller and quick to test. [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image block: floated image block with the default template touches content
3 participants