Bug 1490727: Various blockers for release.#5005
Bug 1490727: Various blockers for release.#5005jwhitlock merged 26 commits intomdn:masterfrom potatolondon:master
Conversation
…ent-on-mobile Check if the popover is hidden before sending the shown event
fix error handling in make_charge function of ContributionForm
…m-by-default Make the contribution popover default to hidden to prevent it from blinking
…upon-interaction Hotfix/load stripe checkout upon interaction
|
@joshJarr thanks for the PR. Do you want to try to fix the flake8 issue and 2 test failures? |
|
@jwhitlock taking a look now 👍 |
|
Got a fix, will test everything and push in a hour or two. |
jwhitlock
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
| * also handles errors when getting the resource | ||
| */ | ||
| function getStripeCheckoutScript() { | ||
| $.getScript('https://checkout.stripe.com/checkout.js') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
I think expanding the popover deserves to be tracked in analytics.
There was a problem hiding this comment.
Hi John. Sounds like a good idea.
Is this something we can follow up with next week?
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
|
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! |
|
@atopal Thoughts? |
|
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. |
jwhitlock
left a comment
There was a problem hiding this comment.
Thank you for fixing the tests. We can address nits and follow-on issues in the near future.
In this PR We have addressed:
checkout.jsusing$.getScript()on all pages upon interaction with the popover (except/contribute).Let me know if you have any feedback or if we have missed anything, Thanks!