-
Notifications
You must be signed in to change notification settings - Fork 216
[DO NOT MERGE] Stripe Tax extension promotional banner #4795
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
base: develop
Are you sure you want to change the base?
Conversation
| } ); | ||
|
|
||
| it( 'should make an API call to dismiss the banner on button click', async () => { | ||
| // Keep the original function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just removing this as it is not needed
client/settings/payment-settings/promotional-banner/stripe-tax-banner.js
Show resolved
Hide resolved
malithsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
daledupreez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good from a functional perspective, though I have some minor non-blocking comments.
| import styled from '@emotion/styled'; | ||
| import interpolateComponents from '@automattic/interpolate-components'; | ||
| import { __ } from '@wordpress/i18n'; | ||
| import apiFetch from '@wordpress/api-fetch'; | ||
| import CardBody from 'wcstripe/settings/card-body'; | ||
| import illustration from 'wcstripe/settings/payment-settings/promotional-banner/illustrations/stripe-tax.svg'; | ||
| import { | ||
| BannerIllustration, | ||
| ButtonsRow, | ||
| CardColumn, | ||
| CardInner, | ||
| DismissButton, | ||
| MainCTALink, | ||
| } from 'wcstripe/settings/payment-settings/promotional-banner/banner-layout'; | ||
| import { recordEvent } from 'wcstripe/tracking'; | ||
| import { ExternalLink } from '@wordpress/components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking nit: Shouldn't these imports be in order?
| import styled from '@emotion/styled'; | |
| import interpolateComponents from '@automattic/interpolate-components'; | |
| import { __ } from '@wordpress/i18n'; | |
| import apiFetch from '@wordpress/api-fetch'; | |
| import CardBody from 'wcstripe/settings/card-body'; | |
| import illustration from 'wcstripe/settings/payment-settings/promotional-banner/illustrations/stripe-tax.svg'; | |
| import { | |
| BannerIllustration, | |
| ButtonsRow, | |
| CardColumn, | |
| CardInner, | |
| DismissButton, | |
| MainCTALink, | |
| } from 'wcstripe/settings/payment-settings/promotional-banner/banner-layout'; | |
| import { recordEvent } from 'wcstripe/tracking'; | |
| import { ExternalLink } from '@wordpress/components'; | |
| import interpolateComponents from '@automattic/interpolate-components'; | |
| import styled from '@emotion/styled'; | |
| import apiFetch from '@wordpress/api-fetch'; | |
| import { ExternalLink } from '@wordpress/components'; | |
| import { __ } from '@wordpress/i18n'; | |
| import CardBody from 'wcstripe/settings/card-body'; | |
| import illustration from 'wcstripe/settings/payment-settings/promotional-banner/illustrations/stripe-tax.svg'; | |
| import { | |
| BannerIllustration, | |
| ButtonsRow, | |
| CardColumn, | |
| CardInner, | |
| DismissButton, | |
| MainCTALink, | |
| } from 'wcstripe/settings/payment-settings/promotional-banner/banner-layout'; | |
| import { recordEvent } from 'wcstripe/tracking'; |
| `; | ||
|
|
||
| const TitleStripeTax = styled.h4` | ||
| margin-top: 0.6em !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this !important? Please add a comment as to why, as it looks very suspicious otherwise.
| <MainCTALink variant="secondary" onClick={ handleButtonClick }> | ||
| { __( 'Get Stripe Tax', 'woocommerce-gateway-stripe' ) } | ||
| </MainCTALink> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, but I think it may be semantically better to implement this using a link-style button rather than handling everything via the click handler. If we switch to an href, the only thing the click handler needs to do is track the click event. We could also consider including an icon to signify that we're going to open a new tab, but that is a bigger step.
| <MainCTALink variant="secondary" onClick={ handleButtonClick }> | |
| { __( 'Get Stripe Tax', 'woocommerce-gateway-stripe' ) } | |
| </MainCTALink> | |
| <MainCTALink variant="secondary" onClick={ handleButtonClick } href="https://woocommerce.com/products/stripe-tax/" target="_blank"> | |
| { __( 'Get Stripe Tax', 'woocommerce-gateway-stripe' ) } | |
| </MainCTALink> |

Fixes STRIPE-793
Figma 0fiyiUe18lGU6kGyQNmXxE-fi
Discussion p1762342846828169-slack-C06ETDR8APN
Changes proposed in this Pull Request:
We are introducing a new promotional banner surface to promote the Stripe Tax extension. This banner will appear for merchants with the Optimized Checkout feature enabled. The CTA button will open https://woocommerce.com/products/stripe-tax/, while the "Learn more" link will point to https://stripe.com/tax.
The updated copy was defined in the Slack discussion thread.
Preview:

We are still waiting for Stripe to approve the final copy.
Testing instructions
add/stripe-tax-extension-promotional-banner)wp-admin/admin.php?page=wc-settings&tab=checkout§ion=stripe&panel=methods) and in the Stripe settings page (wp-admin/admin.php?page=wc-settings&tab=checkout§ion=stripe&panel=settings)Changelog entry
Changelog Entry Comment
Comment
Post merge