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

Monthly Contrib Checkout Designs #83

Merged
merged 17 commits into from
Jun 14, 2017
Merged

Conversation

Ap0c
Copy link
Contributor

@Ap0c Ap0c commented Jun 14, 2017

Why are you doing this?

We want the monthly contributions checkout to look nice. These designs take those implemented on membership as a baseline.

Trello Card

Changes

  • Added babel-plugin-transform-exponentiation-operator. Basically, the linter doesn't like use of Math.pow, it pushes you to use the exponentiation operator (**), but node doesn't support this operator yet, which means the tests break. This plugin transforms the operator back to Math.pow.
  • Added a new checkoutSection component, that can be used to create chunks of the checkout page (note: flow really struggles with the React children prop), see this issue).
  • Created a displayName component, for showing the logged in user's display name. This will need to be extended in future to show the actual name rather than a dummy, and possibly to include some form of 'sign out' option.
  • Created a secure component, to show the lock and secure message; this is likely to be reused across multiple checkouts.
  • Added styling and correct copy for the Stripe button.
  • Added lock and user svgs.
  • Added a component for the terms and privacy copy, as it's likely to be reused across multiple checkouts.
  • Styled the textInput component.
  • Fixed a bug in the roundDp utility function.
  • Fixed the cta hover colour on the bundles landing page.
  • Added a contribAmount component to allow for it to change in size depending on the width of the value.
  • Restructured the main monthlyContributions jsx file to make use of these new components, and added styling.

Screenshots

Desktop (with wide value):

desktop-widevalue

Mobile:

mobile

<button
className="component-stripe-pop-up-button"
onClick={stripeClick}
>Contribute with debit/credit card</button>
Copy link
Contributor

@svillafe svillafe Jun 14, 2017

Choose a reason for hiding this comment

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

If it is possible, I would try to avoid components with just one HTML element in order to avoid over componentization.

Copy link
Contributor Author

@Ap0c Ap0c Jun 14, 2017

Choose a reason for hiding this comment

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

Hmm, is this not a special case? It's the shared Stripe component that we added in #78, I've just added a class and tweaked the copy here. I thought we wanted this to be a component because it's being used across multiple checkouts, and has a bunch of extra functionality attached to it?

}

.monthly-contrib__amount--wide-value {
padding-left: 1em;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change this to be rem so it depends on the root font-size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Under what circumstances is use of em acceptable? In this situation I specifically want to match the padding to the font size of the element...

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case that the requirement is that the padding should be tied to its parent's font-size, we should use em.

const printedAmount = wideValue ? props.amount.toFixed(2) : props.amount;

return (
<div className={className}>£{printedAmount}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking ahead, the currency could be received as an argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, sounds sensible, we need to think about how we're going to handle multiple currencies.

@superfrank
Copy link
Contributor

SignedInUser will actually be the persons account name right? + we need to add in the sign out option?

Copy link
Contributor

@svillafe svillafe left a comment

Choose a reason for hiding this comment

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

Apart from details, this good looks!!1 Good work! 🎉

@Ap0c
Copy link
Contributor Author

Ap0c commented Jun 14, 2017

SignedInUser will actually be the persons account name right? + we need to add in the sign out option?

Yup, we just haven't implemented the user stuff yet, it relies on some work that isn't merged in yet. We can do another PR once that happens.

@Ap0c Ap0c merged commit 15406b9 into master Jun 14, 2017
@prout-bot
Copy link

Seen on PROD (merged by @Ap0c 6 minutes and 41 seconds ago) Please check your changes!

Sentry Release: support-client-side, support

@Ap0c Ap0c deleted the monthly-contrib-checkout-designs branch June 15, 2017 09:43
rupertbates pushed a commit that referenced this pull request Feb 11, 2019
Explicitly set retries to 0 for RetryNone
tomrf1 pushed a commit that referenced this pull request Aug 17, 2020
* log warning not error for missing country code

* don't log country code not being able to be decoded
tomrf1 pushed a commit that referenced this pull request Aug 18, 2020
* log warning not error for missing country code

* don't log country code not being able to be decoded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants