Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WCRemoveButton for Actions Like "Remove Coupon" and "Remove Discount" #13229

Draft
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

AnirudhBhat
Copy link
Contributor

@AnirudhBhat AnirudhBhat commented Jan 2, 2025

Closes: #12686 and #12685

Description

This PR introduces a new composable button, WCRemoveButton, designed for actions such as "Remove coupon" and "Remove discount." The button is visually styled to convey its purpose, featuring a red border and text, and supports optional leading and trailing icons for better contextual representation.

Steps to reproduce

Testing information

The tests that have been performed

Images/gif

Screenshot 2025-01-02 at 9 30 20 AM Screenshot 2025-01-02 at 9 30 31 AM
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@AnirudhBhat AnirudhBhat added the type: bug A confirmed bug. label Jan 2, 2025
@AnirudhBhat AnirudhBhat added this to the 21.4 milestone Jan 2, 2025
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitd9f7e7f
Direct Downloadwoocommerce-wear-prototype-build-pr13229-d9f7e7f.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitd9f7e7f
Direct Downloadwoocommerce-prototype-build-pr13229-d9f7e7f.apk

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 40.63%. Comparing base (bcbbde1) to head (d9f7e7f).

Files with missing lines Patch % Lines
...oocommerce/android/ui/compose/component/Buttons.kt 0.00% 28 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13229      +/-   ##
============================================
- Coverage     40.64%   40.63%   -0.02%     
+ Complexity     6387     6386       -1     
============================================
  Files          1351     1351              
  Lines         77444    77472      +28     
  Branches      10650    10663      +13     
============================================
- Hits          31479    31478       -1     
- Misses        43186    43214      +28     
- Partials       2779     2780       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The remove coupon button doesn't match the remove button style
4 participants