Skip to content

Conversation

@octaedro
Copy link
Contributor

@octaedro octaedro commented Jun 26, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

Error 1 - When collapsing the WordPress menu, a grey box appears in the top left corner.

Error 2 - When navigating to the Inventory field, the same grey background is displayed at the bottom of the form.

Screenshot 2023-06-22 at 3 19 31 PM

Closes #38887.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Navigate to /wp-admin/admin.php?page=wc-settings&tab=advanced&section=features and ensure that New product editor is enabled.
  2. Go to Products > Add New using a window with a height shorter than the admin menu, and scroll down.
  3. Verify that the product header is always positioned behind the admin bar.
  4. Click the Collapse menu button located at the bottom of the admin bar.
  5. The product header should now cover the full width of the page.
  6. Go to the Inventory tab.
  7. Confirm that the white background extends to the bottom of the page.

Screen Capture on 2023-06-26 at 11-19-25

@github-actions github-actions bot added focus: react admin [team:Ghidorah] plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jun 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 26, 2023

Test Results Summary

Commit SHA: 3d79670

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 59s
E2E Tests1900018020814m 29s

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.

@octaedro octaedro requested a review from a team June 26, 2023 14:59
@octaedro octaedro self-assigned this Jun 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 26, 2023

Hi @louwie17,

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

@octaedro octaedro marked this pull request as ready for review June 26, 2023 15:00
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.

Left one suggestion on making use of the folded body class and also noticed one bug with the feedback footer, that one might just need a width: 100% if the parent width is already correct:
Screenshot 2023-06-27 at 10 15 20 AM

width: calc(100% - $admin-menu-width);
left: $admin-menu-width;
width: calc(100% - $admin-menu-width-collapsed);
left: $admin-menu-width-collapsed;
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of setting this to the default width and left could we make use of the folded class that gets added to the body tag when the menu is collapsed?
You might be able to do something within here like:

&.folded .interface-interface-skeleton__header, &.folded .interface-interface-skeleton__footer  {
    width: calc(100% - $admin-menu-width-collapsed);
    left: $admin-menu-width-collapsed;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call! I changed that in the commit 0937df1

@octaedro
Copy link
Contributor Author

Thank you @louwie17 for reviewing this PR. I just addressed the changes you suggested.
Could you take another look at this PR?

@octaedro octaedro requested a review from louwie17 June 27, 2023 23:51
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 addressing the suggestion, although your latest change with adding the additional wrapper for the footer css broke some other styling.

width: calc(100% - 160px);
bottom: -1px; /* to hide the border when no visible children */
z-index: 1001; /* on top of #wp-content-editor-tools */
.woocommerce-admin-page__add-product {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason you decided to wrap the entire footer css with woocommerce-admin-page__add-product?
This means it will break on any other WooCommerce related page, also this breaks on the edit product page.

I would say we should leave it as is and remove the wrapper again, unless you have a strong reason to do otherwise?

Copy link
Contributor Author

@octaedro octaedro Jul 3, 2023

Choose a reason for hiding this comment

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

Nice catch! I fixed this in the commit ee1e52c.

@louwie17
Copy link
Contributor

@octaedro also noticed another issue where if you navigate to WooCommerce > Home from the product edit page, probably related to this line:

div#wpwrap {
	background-color: $white;
}
Screenshot 2023-06-29 at 11 43 10 AM

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 the updates @octaedro, this tested well this time around!

@octaedro octaedro merged commit 00d8e65 into trunk Jul 4, 2023
@octaedro octaedro deleted the fix/38887_grey_background_when_menu_collapsed branch July 4, 2023 17:59
@github-actions github-actions bot added this to the 8.0.0 milestone Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Product Block Editor] Grey background when menu is collapsed

3 participants