Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Fix alignment issue with 'Add Coupon Code' button in WooCommerce Blocks (#9391) #9392

Merged
merged 4 commits into from
May 12, 2023

Conversation

dennisjonda
Copy link
Contributor

@dennisjonda dennisjonda commented May 8, 2023

This Pull Request includes changes made to the style.css file located in \assets\js\base\components\sidebar-layout in order to fix an issue with the alignment of the "Add Coupon Code" button in the WooCommerce Blocks checkout page.

The changes involve removing the margin-left and margin-right properties for the .is-large .wc-block-components-sidebar .wc-block-components-totals-coupon-link class and adding the padding-left and padding-right properties for the .is-large .wc-block-components-sidebar .wc-block-components-totals-coupon class.

The reason for these changes is that the previous styling caused misalignment of the "Add Coupon Code" button when the text was too long. The updated CSS aligns the button properly with the other fields on the checkout page.

Fixes #9391

Accessibility

Screenshots

Before After
grafik grafik

Testing

User Facing Testing

  1. Go to /wp-admin/options-general.php and select Deutsch as the site language.
  2. Go to /wp-admin/update-core.php and fetch the available translations.
  3. Create a test page with the Checkout block.
  4. Go to the frontend.
  5. Add a product to the cart.
  6. Go to the test page with the Checkout block.
  7. Verify that the "Gutscheincode oder Rabattcode hinzufügen" button is correctly aligned (see screenshot above).

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Performance Impact

Changelog

Fix alignment issue with 'Add Coupon Code' button in WooCommerce Blocks

@nielslange nielslange self-requested a review May 10, 2023 13:07
@nielslange nielslange mentioned this pull request May 12, 2023
@nielslange nielslange added type: enhancement The issue is a request for an enhancement. block: checkout Issues related to the checkout block. focus: global styles Issues that involve styles/css/layout structure. labels May 12, 2023
Copy link
Member

@nielslange nielslange left a comment

Choose a reason for hiding this comment

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

Hello @dennisjonda 👋

Thank you very much for your first contribution to the WooCommerce Blocks, and sorry for not getting back to you earlier. The previous days, I was occupied with testing the WooCommerce Blocks 10.2.0 release.

Today, I finally found time to review your change. The change works as expected, so I went ahead and merged it. The change should be shipped with the WooCommerce Blocks 10.3.0 release. Thanks again for taking the time to contribute to this repo! 🙌

@nielslange
Copy link
Member

Merging this PR as all CI checks of the corresponding interim PR passed.

@nielslange nielslange merged commit f9f6258 into woocommerce:trunk May 12, 2023
@dennisjonda dennisjonda deleted the fix/alignment-coupon branch May 16, 2023 19:41
@mikejolley mikejolley added this to the 10.3.0 milestone May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: checkout Issues related to the checkout block. focus: global styles Issues that involve styles/css/layout structure. type: community contribution type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alignment issue with 'Add Coupon Code' button in WooCommerce Blocks checkout page
3 participants