-
Notifications
You must be signed in to change notification settings - Fork 166
LG-8274: In-Person Proofing CTA A/B Testing #7669
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
Changes from all commits
4150aa1
0a4050a
f9b03ab
0b26483
d71117f
b406cb2
272ec5a
0a033ab
7305923
1cf93da
bb03445
96a82fe
d3ab1ff
7d4a49e
7b2641e
9834cbf
cbf5f3d
38f3c71
a473396
6d9702a
95b3778
746791d
ffc3675
c42f0d5
5c6fe33
5736bec
cf1be06
e5866a9
ac84f4f
e7af181
ff93953
f80bf84
720bb08
09327aa
67718f8
bf5c4a2
4ac9186
24ed7f3
c41d007
859b1f3
3e45804
54f6d48
2061018
b1e2e48
afab0db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,21 @@ interface WarningProps { | |
| */ | ||
| actionOnClick?: () => void; | ||
|
|
||
| /** | ||
| * Secondary action button text. | ||
| */ | ||
| altActionText?: string; | ||
|
|
||
| /** | ||
| * Secondary action button text. | ||
| */ | ||
| altActionOnClick?: () => void; | ||
|
|
||
| /** | ||
| * Secondary action button location. | ||
| */ | ||
| altHref?: string; | ||
|
|
||
| /** | ||
| * Component children. | ||
| */ | ||
|
|
@@ -45,6 +60,9 @@ function Warning({ | |
| heading, | ||
| actionText, | ||
| actionOnClick, | ||
| altActionText, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just want to make sure i understand - altAction is variant-b's cta?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Speaking first generally, we augmented this component to allow for two actions in the same paradigm as you might see an "OK" and a "Cancel". The primary user action is as before: Blue button, white text. We've added an alternative user action option that is presented as a white button with blue outline. You are correct about the way this is used in the variant B Warning component.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh ok so then i should think of this as a [stylistic] secondary version of the button.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm I might be misunderstanding you here - "a [stylistic] secondary version of the button" makes it sound like a different (stylistic) way to present a sole intended user option, like you would be using the white-with-blue-outline style instead of the blue. While the implementation would technically allow for that (I think...), that isn't the intended use. Rather than a different way to display the same button, we wanted the Warning to display two different buttons. |
||
| altActionOnClick, | ||
| altHref, | ||
| children, | ||
| troubleshootingOptions, | ||
| location, | ||
|
|
@@ -69,6 +87,22 @@ function Warning({ | |
| {actionText} | ||
| </Button>, | ||
| ]; | ||
| if (altActionText && altActionOnClick) { | ||
| actionButtons.push( | ||
| <Button | ||
| isBig | ||
| isOutline | ||
| isWide | ||
| href={altHref} | ||
| onClick={() => { | ||
| trackEvent('IdV: warning action triggered', { location }); | ||
| altActionOnClick(); | ||
| }} | ||
| > | ||
| {altActionText} | ||
| </Button>, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| return ( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.