-
Notifications
You must be signed in to change notification settings - Fork 219
Remove extra padding for cart sidebar to fix visual regression bug #5247
Conversation
Size Change: -49 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
Took me a bit of hunting, but I limited that change to this PR #4974 so we need to make sure it won't regress it as well. |
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.
I tested this and failed to see what's trying to fix. A before and after screenshot would help.
Hi @senadir, thought I'd reply here for posterity and with some more useful details following our slack convo. Feel free to ping me on slack in that thread in response! Screenshots of the bug can be seen here. This happens mainly when the cart page has a sidebar. So it looks like when the cart block sidebar is a certain width (236px), the browser decides there isn't enough real estate and it drops the "Apply Discount" button on the second line. The styles that control the input/button come from the Woocommerce Points And Rewards plugin so we have not control over making the button smaller for example. My initial approach was to remove the extra margin added in the PR you mentioned. I realise this causes changes to the design and may not be the best solution As an alternative, we could reduce the margin to However this seems a bit arbitrary to me and i'm aware that we are trying to fix the layout for a third party plugin at a specific width. It's difficult to test the impact this might have on other plugins that add content to the sidebar and there will likely always be a case of misalignment if we change the width of the sidebar. I guess reverting the extra I'm looking for a bit of guidance here as I'm not sure what the best approach is. |
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.
LGTM! :)
When upgrading the cart, there was an extra left and right margin added to the Cart page sidebar. I'm not sure if this was intentional, however it causes a visual regression bug with the points and rewards plugin where the input box and the button don't line up properly (see issue for screenshots).
This fixes #5152
Testing
How to test the changes in this Pull Request:
Changelog