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

Refactor: Remove radio button for single active gateway #7429

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented Jul 3, 2024

Resolves GIVE-545

Description

Currently, even when there is only one payment gateway option in the donation form, the radio button is shown. This does not make much sense in that situation since you cannot switch to any other method.

This pull request adds CSS styles to hide the radio button when the payment gateway is the only one in the list.

Affects

Gateways list

Visuals

CleanShot 2024-07-03 at 13 48 29
Before

CleanShot 2024-07-03 at 13 50 46
After

CleanShot 2024-07-03 at 13 51 30
After but having more than 1 option

Testing Instructions

  1. Configure more than one payment method in Settings.
  2. Open a form and confirm that all options have radio buttons.
  3. Re-configure the payment methods to have only one active.
  4. Open the form and confirm that when there is only one option, no radio button is shown.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@pauloiankoski pauloiankoski requested a review from jdghinson July 3, 2024 22:00
Copy link
Contributor

@jdghinson jdghinson left a comment

Choose a reason for hiding this comment

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

Looks good!

@JoshuaHungDinh JoshuaHungDinh self-requested a review July 5, 2024 19:02
Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh left a comment

Choose a reason for hiding this comment

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

That's a clever use of pseudo-class selectors. This is G2G!

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests.

@pauloiankoski pauloiankoski merged commit c34d3a8 into develop Jul 9, 2024
20 checks passed
@pauloiankoski pauloiankoski deleted the refactor/single-gateway-radio-button branch July 9, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants