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

feat(payments): rename downloadURL to successActionButtonURL #12904

Merged
merged 1 commit into from
May 25, 2022

Conversation

StaberindeZA
Copy link
Contributor

@StaberindeZA StaberindeZA commented May 17, 2022

Because

  • The button on the success screen allows for a configurable label,
    which means it can be used for more than just downloading the product,
    which makes the configuration field "downloadURL" misleading.

This pull request

  • Adds support for a new configuration field "successActionButtonURL" to
    replace "downloadURL".
  • Updates the code to reflect the name change.

Issue that this pull request solves

Closes: #9338

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Additional Info

@StaberindeZA StaberindeZA force-pushed the fxa-3611-rename-downloadurl branch from c6fa9c2 to bdbc5bf Compare May 17, 2022 20:44
@StaberindeZA StaberindeZA changed the title WIP - Added successActionButtonURL as an option feat(payments): rename downloadURL to successActionButtonURL May 17, 2022
Because:
* The button on the success screen allows for a configurable label,
  which means it can be used for more than just downloading the product,
  which makes the configuration field "downloadURL" misleading.

This commit:
* Adds support for a new configuration field "successActionButtonURL" to
  replace "downloadURL".
* Updates the code to reflect the name change.

Closes #9338
@StaberindeZA StaberindeZA force-pushed the fxa-3611-rename-downloadurl branch from bdbc5bf to e784754 Compare May 17, 2022 20:50
@StaberindeZA StaberindeZA marked this pull request as ready for review May 17, 2022 20:58
@StaberindeZA StaberindeZA requested a review from a team as a code owner May 17, 2022 20:58
@StaberindeZA StaberindeZA requested a review from chenba May 17, 2022 21:10
@@ -2354,9 +2354,13 @@ export class StripeHelper extends StripeHelperBase {
const productMetadata = this.mergeMetadata(plan, abbrevProduct);
const {
emailIconURL: planEmailIconURL = '',
downloadURL: planDownloadURL = '',
downloadURL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this still here since we are replacing the "download" url in this patch?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I see a TODO below that's likely the reason for this. Is there a jira file to remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes that's what I forgot. There is one now, thank you.

https://mozilla-hub.atlassian.net/browse/FXA-5179

@@ -67,7 +67,8 @@ class SetPassword extends FormView {
const plan = plans.find((p) => p.product_id === productId);
const url = new URL(
plan && plan.product_metadata
? plan.product_metadata.downloadURL
? plan.product_metadata.successActionButtonURL ||
plan.product_metadata.downloadURL
: 'https://mozilla.org'
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 surprised that prettier didn't wrap some parens around this.

Copy link
Contributor

@chenba chenba left a comment

Choose a reason for hiding this comment

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

👍

@StaberindeZA StaberindeZA merged commit 7f62e29 into main May 25, 2022
@StaberindeZA StaberindeZA deleted the fxa-3611-rename-downloadurl branch May 25, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[subplat] Rename downloadURL Stripe metadata key to successActionButtonURL or similar
2 participants