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

bug 1490727: Contribution views flow #4976

Merged
merged 41 commits into from Sep 18, 2018

Conversation

Projects
None yet
7 participants
@joshJarr
Copy link
Contributor

commented Sep 18, 2018

Initial payment flow. FE code is still WIP, feedback still to be addressed, not quite production ready but should be enough for user testing.

ExE-Boss and others added some commits Aug 31, 2018

Merge pull request #4961 from ExE-Boss/styles/wiki/indicators/fix-snu…
…gging

Bug 1487656 ‑ Comment out the indicator `:matches(…)` block for now
Bug 1490392: Reduce web font usage (#4967)
Squashes several commits:
* Removing Open Sans from Gaia demos
* Fixing linting issue on mixins
* removing open sans from maintenance page
* Tweaking styles now that Verdana is in place to minimize differences
* Preload zilla bold
* Removing actual font files
* Using a variable in the breakpoints
* Using rems for letter-spacing
* Using body-font-size in document
* Font smoothing
Merge pull request #4966 from schalkneethling/bug1489981-history-butt…
…on-goes-to-edit-dashboard

Bug 1489981, history button goes to edit instead on dashboard
bug 1490727: Add stripe 2.7.0 requirement
The Python library for the Stripe payments API.
bug 1490727: Update to stripe 2.8.0
* stripe 2.7.0 → 2.8.0: Add support for automatic retries
bug 1490727: Update to stripe 2.8.1
* stripe 2.8.0 → 2.8.1: Sync features with ruby library
Merge pull request #4974 from jwhitlock/stripe-1490727
bug 1490727: Add stripe dependency
bug 1490727: Fixes for staging test (#4)
* bug 1490727: Fix path to American Express logo

* bug 1490727: Remove duplicate code

These should have been removed when moved to the contributions app.

* bug 1490727: Add locale-prefix to contribute

Make /contribute a locale-prefixed URL, and add tests for both the
enabled and disabled view.
Implemented FAQ styles, merged with current master branch. (#6)
* Implemented FAQ styles, merged with current master branch.

* Fix newline linting issue on SVGs

* added newline in js

* Address PR feedback, fix linting errors.

@jwhitlock jwhitlock self-requested a review Sep 18, 2018

@jwhitlock
Copy link
Member

left a comment

This looks good, let's get it to staging for user testing.

I've made some additional changes, see potatolondon#7.

We can add URLs for the legal statement in the near future.

@@ -119,6 +123,12 @@
</div>
</main>

{% if settings.MDN_CONTRIBUTION and not '/contribute' in request.path %}

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

I'm going to replace the check for /contribute with a jinja2 {% block %}

@@ -0,0 +1,15 @@
<svg class="icon icon-chevron-down" width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

I'm going to run this and the other SVG files through svgo to minimized them.

from kuma.contributions.forms import ContributionForm


def global_contribution_form(request):

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

Interesting. I haven't seen this before, but it does get the form on every page.

@@ -1,6 +1,7 @@
from __future__ import unicode_literals

import stripe
from decimal import Decimal

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

I think this should go a few lines up, in the standard library group. I'll see if I get a flake8 error if I move it there.

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

Oops, forgot to try this...

amount = amount * 100
if isinstance(amount, Decimal):
amount = amount * Decimal('100')
amount = amount.quantize(Decimal('0'))

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

Interesting catch. Is amount ever not a Decimal? We can test later.

<h3>{{_('Why is MDN asking me for money?')}}</h3>
<span class="faq-number">1</span>
<p>{{_('In 2017, MDN established a <a href="https://hacks.mozilla.org/2018/01/introducing-the-mdn-product-advisory-board/">Product Advisory Board</a> and added documentation from several other developer programs to begin to create a truly world-wide, web-wide developer resource. Having this broader readership contribute directly to MDN creates a tighter, healthier loop between our audience (you), our content (written for you), and our financial supporters (also, you, again, if you can help by putting a price on a priceless resource!).')}}</p>
<p>{{_('MDN <a href="https://developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses#History_of_MDN_Web_Docs">originally began as the Mozilla Developer Network</a> and was used almost exclusively for Firefox internal documentation. But we have outgrown that. And your needs have outgrown that. We’ve now broadened our coverage to web standards beyond Firefox, and our funding should match that reality. ')}}</p>

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

I'm planning to adjust this and the above so that the links aren't part of the translatable string.

<g id="✏️-working" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="AppleColorEmoji, Apple Color Emoji" font-size="25" font-weight="normal">
<g id="03_FAQs" transform="translate(-671.000000, -2922.000000)" fill="#262D2D">
<g id="Thumbs-up" transform="translate(656.000000, 2905.000000)">
<text id="👍-copy" transform="translate(28.000000, 27.500000) scale(1, -1) translate(-28.000000, -27.500000) ">

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

scale(1, -1) is a clever way to make a thumbs down 👍 (or should it be 👎 ?)

{{form.stripe_token}}
{{form.stripe_public_key}}
<p class="legal-copy">
These contributions are not tax deductible. Your payment details will be processed by <a href="">Stripe</a>. Mozilla will keep record of your contribution in accordance with it <a href="">Privacy Notice</a>, and does not receive your payment details.

This comment has been minimized.

Copy link
@jwhitlock

jwhitlock Sep 18, 2018

Member

TODO: need links here.

@jwhitlock jwhitlock merged commit 806f447 into mozilla:potato-1490727 Sep 18, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk - package.json (mdn) No manifest changes detected

@jwhitlock jwhitlock added the payments label Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.