Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Bug 1490727: Various blockers for release.#5005

Merged
jwhitlock merged 26 commits intomdn:masterfrom
potatolondon:master
Sep 28, 2018
Merged

Bug 1490727: Various blockers for release.#5005
jwhitlock merged 26 commits intomdn:masterfrom
potatolondon:master

Conversation

@joshJarr
Copy link
Contributor

@joshJarr joshJarr commented Sep 27, 2018

In this PR We have addressed:

  • Copy changes, email, social share, thank you page.
  • Flow for the stripe error pages (needs copy)
  • Stripe data fixes - we now send the name of the contributor in the metadata and set the receipt email. This should be tested with the live stripe account.
  • Fixes email images being loaded with the wrong domain on staging.
  • Lazy load checkout.js using $.getScript() on all pages upon interaction with the popover (except /contribute).
  • Fix banner flashing bug after it has been closed.
  • Fix Analytics firing when the popover has been dismissed or is not shown on mobile.

Let me know if you have any feedback or if we have missed anything, Thanks!

@jwhitlock
Copy link
Contributor

@joshJarr thanks for the PR. Do you want to try to fix the flake8 issue and 2 test failures?

@joshJarr
Copy link
Contributor Author

@jwhitlock taking a look now 👍

@joshJarr
Copy link
Contributor Author

Got a fix, will test everything and push in a hour or two.

Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

This fixes the listed blockers - nice work! There's a small change to get tests working, see https://github.com/potatolondon/kuma/pull/22.

There's a few nits that you may want to work in at the same time. We can merge and deploy in the morning.

</h2>
<p>
{% trans %}
Please contact <a href="mailto:support@mozilla.com">support@mozilla.com</a> for more information on this problem.
Copy link
Contributor

Choose a reason for hiding this comment

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

Future task: We'll need to move the email outside of the translated string, and use a real email address (unless support@mozilla.com is the real email address).

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi John. Yep, I believe we're still waiting on the final support email address. As of yesterday, Kadir still hadn't received this so it might fall to you guys to update once you have it.

Copy link
Contributor

Choose a reason for hiding this comment

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

The email address is mdn-support@mozilla.com

* also handles errors when getting the resource
*/
function getStripeCheckoutScript() {
$.getScript('https://checkout.stripe.com/checkout.js')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if stripeHandler is initialized (not null), then the script should not be reloaded. You can see the multiple loads by watching the network tab while collapsing and expanding the banner multiple times.

Choose a reason for hiding this comment

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

Also, you should add the following config:

$.ajaxSetup({
  cache: true
});

If that is not set, then the script will be loaded over the network each time it is requested, instead of loading it from browser cache.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good suggestions, thank you. Please also see my comments around error handling improvements for the script loading as in the other comment as well.

Are we too consider this feedback launch blocking or is it something we can follow up with quickly next week?

Copy link
Contributor

Choose a reason for hiding this comment

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

If we get this into production by Wednesday, that should be fine. Before that we'll have a very limited test audience.

* Expands the popover to show the full contents.
*/
function expandCta() {
function expandPopover() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think expanding the popover deserves to be tracked in analytics.

Copy link
Contributor

@matthewhall matthewhall Sep 28, 2018

Choose a reason for hiding this comment

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

Hi John. Sounds like a good idea.

Is this something we can follow up with next week?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, good catch John!

If we get this into production by Wednesday, that should be fine. Before that we'll have a very limited test audience.

metadata={'name': self.cleaned_data['name']}
)
return True
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a fan of generic exception handlers, but this worked for the card error for 4100000000000019, so it removes the launch blocker. I can adjust the error handler later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please let us know if you'd like us to adjust this.

bug 1490727: Fix tests for new call
if (stripeHandler === null) {
// initialise handler
stripeHandler = initStripeHandler();
// stripeHandler = initStripeHandler();

Choose a reason for hiding this comment

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

@joshJarr From the diff it looks like this line is commented out. So, if stripeHandler is null nothing is going to happen. Is this intentional? If so, and this is handled somewhere else in the code, then it is probably best to completely remove this piece of code?

Copy link
Contributor

@matthewhall matthewhall Sep 28, 2018

Choose a reason for hiding this comment

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

Hi Schalk. Yep, I think this if statement is redundant and slipped through. stripeHandler will be set as part of getStripeCheckoutScript() when the popover is expanded. We then check if it's not null in onSubmit when the form is submitted.

I think, as a further improvement to this, we might consider showing an error message if the script fails to load for whatever reason or if it hasn't loaded by the time the user clicks submit, but I think this is an adjustment we can probably follow up with next week. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

form my point of view, if we get this into production by Wednesday, that should be fine. Before that we'll have a very limited test audience. Without knowing too much of the context, I'd only show the error message when it' necessary for payment (eg the form submission)

@matthewhall
Copy link
Contributor

matthewhall commented Sep 28, 2018

Hi @jwhitlock @schalkneethling,

Thanks for the review. Michal has pushed a fix for the tests this morning: a57c89c. Thanks for bearing with us on that.

I've added a couple of comments in to your feedback above. Please could you let me know if any of these are launch blocking? If possible, and none of these are P0s, then it might be prudent to address and quickly follow up with fixes for them post-launch. Concerned of further changes today potentially causing bugs so close to launch and would be cool to give a little more time to address them and any other fixes needed and have a day next week to test before launching.

Please let me know your thoughts. Thanks!

@schalkneethling
Copy link

@atopal Thoughts?

@atopal
Copy link
Contributor

atopal commented Sep 28, 2018

Agreed, the performance and UX issues mentioned here should be dealt with before Wednesday, but I don't see them as blockers for Monday. I'll defer to John and Schalk for anything else.

Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Thank you for fixing the tests. We can address nits and follow-on issues in the near future.

@jwhitlock jwhitlock merged commit b6bd9f7 into mdn:master Sep 28, 2018
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.

5 participants