Skip to content

Conversation

@mattsherman
Copy link
Contributor

@mattsherman mattsherman commented May 11, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR fixes the product summary field top margin in the block-based product editor.

Incorrect margins have been reported and reproduced with the following setup:

  • WordPress 6.2 (built-in Gutenberg, enabled)
  • Theme: Storefront 4.2.0 (does not happen with Twenty Twenty-Tree)
  • WooCommerce: latest trunk
  • Browser: Edge, Chrome, Firefox (probably others too)
  • No plugins other the WooCommerce Beta Tester (just to enable feature: product-block-editor)

The incorrect margins on the .wp-block-woocommerce-product-summary-field block in this component are being set by the following rule from classic.css?ver=6.2:

html :where(.wp-block) {
    margin-bottom: 28px;
    margin-top: 28px;
    max-width: 840px;
}

Before

Screenshot 2023-05-11 at 10 54 11

After

Screenshot 2023-05-11 at 10 52 48

Note: Top margin is correct. Bottom margin is correct (unchanged).

How to test the changes in this Pull Request:

Note: Make sure you have Storefront 4.2.0 set as your theme.

  1. Enable the block-based product editor (feature: product-block-editor).
  2. Go to Products > Add New
  3. Verify the General > Basic details > Summary field's top and bottom margins are correct.

@mattsherman mattsherman changed the title Fix product summary field margins Fix product summary field top margin May 11, 2023
@mattsherman mattsherman self-assigned this May 11, 2023
@mattsherman mattsherman requested a review from a team May 11, 2023 14:58
@github-actions
Copy link
Contributor

Hi , @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@mattsherman mattsherman changed the title Fix product summary field top margin Product Block Editor: Fix product summary field top margin May 11, 2023
@mattsherman mattsherman added Bug The issue is a confirmed bug. plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 11, 2023
@mattsherman mattsherman marked this pull request as ready for review May 11, 2023 15:09
@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 3e790bd

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202691m 14s
E2E Tests1880010019822m 40s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@louwie17 louwie17 mentioned this pull request May 12, 2023
11 tasks
Copy link
Contributor

@louwie17 louwie17 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 fixing this @mattsherman 🎉 this tested well and fixes the summary field.
There is still some weird spacing between blocks, like the additional space above the list price field, but we hope to address this as part of this spacing issue: #38202

@louwie17 louwie17 merged commit ac78d3d into trunk May 12, 2023
@louwie17 louwie17 deleted the fix/product-summary-field-margin branch May 12, 2023 13:45
@github-actions github-actions bot added this to the 7.8.0 milestone May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug The issue is a confirmed bug. plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants