-
Notifications
You must be signed in to change notification settings - Fork 1
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
EP-2521 Standard Buttons instead of Radio Buttons for suggested amounts #1116
EP-2521 Standard Buttons instead of Radio Buttons for suggested amounts #1116
Conversation
src/app/productConfig/productConfigForm/productConfigForm.tpl.html
Outdated
Show resolved
Hide resolved
@@ -68,48 +68,54 @@ <h4 class="panel-title border-bottom-small" translate> | |||
<h4 class="panel-title border-bottom-small" translate> | |||
{{'GIFT_AMOUNT'}} | |||
</h4> | |||
<div class="panel-body pt0"> | |||
<div class="panel-body p0"> |
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.
We'll need to make sure of 2 things from stakeholders:
- Should this change affect mobile only?
- Should this change be tied to the new v3 config option?
<div class="form-group"> | ||
<div class="button-group"> | ||
<div | ||
role="button" |
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.
Why did you move away from an actual button element?
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.
Great question. I had started a response while at the dentist last week and that is now gone. Initially, I opted to use a div for more control of the element but I'm realizing that we'll need to declare some accessibility functionality of each element that is inherit in a button element. But, I may end up going all the way back to using input element with radio type and just styling it to match our current design. Thoughts?
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 think a styled radio input would work fine, but I'm not fully read-in on this task, so I've assumed there was some reason to switch from radio inputs to buttons.
src/app/productConfig/productConfigForm/productConfigForm.tpl.html
Outdated
Show resolved
Hide resolved
For the suggested amount inputs, the design changes (amount background gets darker and height increases) when the user clicks on it, but these changes don't happen for the custom amount until the user enters a value. Could these changes happen when the user clicks/focuses on the custom input field for the sake of consistent UX? |
Definitely!
…On Fri, Dec 6, 2024 at 1:49 PM John Plastow II ***@***.***> wrote:
For the suggested amount inputs, the design changes (amount background
gets darker and height increases) when the user clicks on it, but these
changes don't happen for the custom amount until the user enters a value.
Could these changes happen when the user clicks/focuses on the custom input
field for the sake of consistent UX?
—
Reply to this email directly, view it on GitHub
<#1116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBNX2D77JUU3SHTWBCNPRU32EHWTLAVCNFSM6AAAAABSDESXMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTHE2DOOJVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@j2trumpet I've made this change. See here. |
I don't know what the ultimate goal for this PR/ticket is, but hopefully sticking with the radio inputs and just styling them differently works. @wrandall22 ? From a UX/UI standpoint, I think we're good. |
The main purpose is to make it easier to select these amounts on mobile devices, which is accomplished with this for sure. However, we still need to determine from stakeholders if this is going to be tied to v3 and if it will be tied specifically to mobile. |
Please change the target branch to |
Updated target branch. I'll need assistance on those conditionals. |
You can look at https://github.com/CruGlobal/give-web/pull/1120/files for the |
Got it, thanks!
…On Wed, Dec 11, 2024 at 11:23 AM Bill Randall ***@***.***> wrote:
You can look at https://github.com/CruGlobal/give-web/pull/1120/files for
the ng-if statements as a starting point.
—
Reply to this email directly, view it on GitHub
<#1116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBNX2DZRQ67EPF2XMSCH5LT2FBRJTAVCNFSM6AAAAABSDESXMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZWGQ3DGMRTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
src/app/productConfig/productConfigForm/productConfigForm.tpl.html
Outdated
Show resolved
Hide resolved
Let's make sure to clean up this Git history so the commits from the base branch don't show up here. Also, the productConfigForm conflicts need to be resolved. |
src/app/productConfig/productConfigForm/productConfigForm.tpl.html
Outdated
Show resolved
Hide resolved
src/app/productConfig/productConfigForm/productConfigForm.tpl.html
Outdated
Show resolved
Hide resolved
60989d7
to
79fcbcb
Compare
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.
It looks like there is still quite a bit of cleanup to do in the git history. What I would recommend at this point, since basically all the work is done in the first commit, is to squash everything into one commit, then do a git reset head^
to uncommit everything, then make individual commits bringing in specific changes that are logical. For this particular PR, probably 2 or 3 commits would be sufficient, something like:
- Added margin to Gift Amount header (and why)
- Build out custom amount buttons for branded checkout version 3
- Style the new layout
name="amount" | ||
class="form-control form-control-subtle" | ||
type="text" | ||
id="ca" |
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.
This line and line 178 are removed in the next commit. This is where a squash would come into play.
</li> | ||
</ul> | ||
</div><!-- // panel-body --> | ||
</div><!-- // panel --> |
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.
This change is undone in the next commit, should be squashed.
ng-change="$ctrl.changeStartDay($ctrl.itemConfig['RECURRING_DAY_OF_MONTH'], $ctrl.itemConfig['RECURRING_START_MONTH'])"> | ||
</select> | ||
</label> | ||
</div> |
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.
This change (removal of comment on div) is undone in the next commit, should be squashed.
@@ -146,7 +233,9 @@ <h4 class="panel-title border-bottom-small" translate> | |||
</div> | |||
</div> | |||
</div> | |||
</div><!-- // panel --> |
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.
This change (removal of comment on div) should be squashed.
<input | ||
name="suggestedAmount" | ||
type="radio" | ||
ng-checked="$ctrl.customInputActive" | ||
/> | ||
<input | ||
name="amount" | ||
class="form-control form-control-subtle" | ||
type="text" | ||
id="ca" | ||
step="1" | ||
tabindex="-1" | ||
ng-model="$ctrl.customAmount" | ||
ng-change="$ctrl.changeCustomAmount($ctrl.customAmount)" | ||
ng-focus="$ctrl.customInputActive = true;" | ||
ng-required="$ctrl.customInputActive" | ||
placeholder="{{'OTHER_PLACEHOLDER' | translate}}" /> | ||
<input name="suggestedAmount" |
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.
These changes aren't related to ng-if and should be squashed into the previous commit.
src/assets/scss/_give.scss
Outdated
@@ -629,6 +629,32 @@ input[type="radio"] { | |||
} | |||
/* Product Config Form Amounts End */ | |||
|
|||
.radio-method, |
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.
This seems to be the main change in this commit, so the commit message should reflect what is happening here.
@@ -187,6 +187,6 @@ export default angular | |||
onOrderFailed: '&', | |||
language: '@', | |||
showCoverFees: '@', | |||
useV3: '@' | |||
useV3: '@', |
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.
This commit should just go away since the only change is removed in the next commit.
</div> | ||
<loading inline="true" ng-if="$ctrl.changingFrequency" class="mt-- text-center"> | ||
<translate>{{'CHANGING_FREQUENCY'}}</translate> | ||
</loading> | ||
</div><!-- // panel-body --> |
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.
This looks like it should be squashed into the first or second commit.
</div><!-- // panel --> | ||
</div><!-- // panel-body --> | ||
</div><!-- // panel --> | ||
</div> | ||
</div> |
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.
This looks like it should be squashed into the first or second commit.
</div> | ||
</div> | ||
<div class="panel panel-default give-modal-panel"> | ||
<div ng-if="$ctrl.useV3 !== 'true'" class="panel panel-default give-modal-panel"> |
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.
This is unrelated to your PR, so this change should be squashed with the first commit so it will just disappear.
79fcbcb
to
e5bb559
Compare
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.
Great job!
72d00e3
into
EP-2517-branded-checkout-improvements
EP-2521
Use Buttons instead of Radio Buttons for suggested amounts.
Adjusted the ProductConfigForm file to be buttons instead of inputs. Rearranged the amount and label controllers to suit the Figma designs. Added CSS to style the buttons and add interactivity when tapping/clicking an option.