Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Feature: add "default level" option to the Donation amount and levels block #217

Merged
merged 28 commits into from
Aug 10, 2023

Conversation

glaubersilva
Copy link
Contributor

@glaubersilva glaubersilva commented Jul 17, 2023

Description

This PR adds a new "Default Level" property as a "Radio" setting on the side of each level input. Now is also possible to reorder the levels using the mouse to drag the items.

Affects

The Donation amount and levels block

Visuals

image

image

Testing Instructions

  1. On the DONATION OPTION, set the "Multi-level Donation" value;
  2. Go to the "Donation Levels" section and you could see a "Radio" setting on the side of each level;
  3. Test the new controls by choosing different default levels and removing or adding new ones.

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

@glaubersilva glaubersilva self-assigned this Jul 17, 2023
@glaubersilva glaubersilva marked this pull request as ready for review July 17, 2023 19:09
@glaubersilva glaubersilva changed the title Feature: add default level option Feature: add default level option to the Donation amount and levels block Jul 17, 2023
@glaubersilva glaubersilva changed the title Feature: add default level option to the Donation amount and levels block Feature: add "default level" option to the Donation amount and levels block Jul 17, 2023
@JasonTheAdams
Copy link
Contributor

The biggest thing I'm wondering here, is if something like this would be a better UI for defining the amounts and selecting a default, than adding another dropdown.

image

cc: @jdghinson

@glaubersilva
Copy link
Contributor Author

@JasonTheAdams What's the name of this component?

@jdghinson
Copy link

@JasonTheAdams The chosen option would have been effective if the default amount is visible in the form builder. However, with the radio in FFM, you can easily select it and see it correctly in the form builder. If we can make it visible like the picture below then we can go with the direction you suggested.

Screenshot 2023-07-20 at 4 29 21 PM

@glaubersilva
Copy link
Contributor Author

@jonwaldstein Thanks for the review. I removed the selector, now we're using "Radio" settings on the side of each level to set the default one. I updated the PR description (and screenshots) with the new changes. Let me know if there is anything more.

@glaubersilva
Copy link
Contributor Author

@jonwaldstein Thanks for the review, I implemented the useEffect and left a couple of replies to your previous comments. Let me know if there is anything more.

Copy link
Contributor

@JasonTheAdams JasonTheAdams left a comment

Choose a reason for hiding this comment

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

I love it, @glaubersilva! What an improvement!

@JasonTheAdams JasonTheAdams merged commit 7efd4a7 into develop Aug 10, 2023
@JasonTheAdams JasonTheAdams deleted the feature/default-amount branch August 10, 2023 20:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants