-
Notifications
You must be signed in to change notification settings - Fork 219
Fixes CSS spacing and availability issues for breadcrumb, catalog sort, and result count blocks. #8391
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +68 B (0%) Total Size: 1.1 MB
ℹ️ View Unchanged
|
8de3f23
to
0b028bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch and thanks @nerrad for working on this!
I spotted the same and also included the fixes within the bigger PR:
Given that I worked on that and that I left two minor comments, please let me know in case you'd prefer me to take it over. I can either:
- address the comments in your PR,
- include the missing Breadcrumbs fix into my PR,
- if you prefer to finish it yourself, please let me know and I'll remove the fixes from my PR so there's no conflicts. 👍
.woocommerce .wc-block-catalog-sorting { | ||
.woocommerce-ordering { | ||
margin: auto; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to move the Catalog Sorting styles to the respective style file: https://github.com/woocommerce/woocommerce-blocks/blob/trunk/assets/js/blocks/catalog-sorting/style.scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yea definitely, my bad 🤦🏻 will do.
.woocommerce.woocommerce-shop .wc-block-breadcrumbs { | ||
.woocommerce-breadcrumb { | ||
margin: auto; | ||
display: block; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above, it could be moved to Breadcrumbs style file:
https://github.com/woocommerce/woocommerce-blocks/blob/trunk/assets/js/blocks/breadcrumbs/style.scss
0b028bc
to
78ab031
Compare
Good catch on the reviews about the implementation of the style fixes. I had done the initial iteration quickly to verify fixes and forgot about moving them into the right files. I think it's beneficial to do the style fixes in their own PR to help keep PRs smaller and more precise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it makes sense to keep the CSS fixes separated 👍
I tested the changes and all looks good!
(I'll remove the corresponding fixes from my PR once this one is merged!)
78ab031
to
acd3faf
Compare
While testing the implementations of the Store Breadcrumbs, Catalog Sorting and Product Result Counts block, I noticed that on some themes the margins were causing some spacing alignment issues. I also noticed that the Store Breadcrumbs block was not even showing on some pages (Shop page) because of some theme specific rules shipped with WooCommerce core.
Below screenshots are on the Twenty Twenty Two theme.
Store Breadcrumbs
Misaligned Margin
Breadcrumbs not even displaying for shop page.
While it appears okay when editing the Product Catalog template, it is not shown on the frontend for certain themes. It surfaced with Twenty Twenty Two (or derivatives of that theme) for me.
Catalog Sorting Block
Product Results Count
Other Checks
Testing
Automated Tests
User Facing Testing
The issues are primarily visible with the Twenty Twenty Two theme. However, testing should be done against some other themes to make sure this doesn't introduce significant issues with those themes. In theory, it shouldn't because the CSS for the blocks should appropriately inherit what the theme provides for default margins and spacing in the container around the blocks.
Appearance
->Editor
).sitedomain.com/shop
on most WP installs) shows all blocks aligned as in the above screenshots.WooCommerce Visibility
Performance Impact
Changelog