-
Notifications
You must be signed in to change notification settings - Fork 805
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
Update modal elements for My Jetpack modal interstitial #41300
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
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.
The interstitial(s) are lookin really nice @grzegorz-cp! 😃.
The testing instructions didn't state what I should be testing exactly, like the design, or certain specific functionality, or just an overall review of the code & appearance, etc. So I went ahead and just pointed out some small improvements in the code, and also I see some design discrepancies between the Figma design and the interstitial modal, that I have pointed out in the screenshot below:
Other than that, everything is looking really nice! 🙌
interface ProductInterstitialModalProps { | ||
title: string; | ||
description?: string; | ||
triggerButton?: React.ReactNode; |
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.
Hmm, maybe a nitpick, but this prop name is confusing, since it's type is ReactNode, I was expecting this prop would pass in an entire button element or any sort of trigger component, but it turns out that this is just the button "label" (or text). Ideally this would be named triggerButtonLabel
or triggerButtonText
.
buttonDisabled?: boolean; | ||
buttonExternalLink?: boolean; |
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.
I'm not sure if this is an actual WordPress coding standard, but all boolean variables ideally should be prefixed with is, has, can, should, etc. So for example, the boolean props here in this component would ideally be renamed to:
isSecondaryButtonExternal
,
isButtonDisabled
,
isButtonExternal
fluid={ false } | ||
> | ||
{ | ||
// left column - always takes 33% of the width or the full with for small breakpoint |
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.
Nitpick, "full with" is misspelled. It should be "full width".
{ | ||
link: ( | ||
<Button | ||
href="https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy" |
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.
To utilize the benefits if Jetpack Redirects ( PCYsg-pY7-p2 ), this href should be:
href={ getRedirectUrl( 'ai-assistant-fair-usage-policy' ) }
Fixes https://github.com/Automattic/jetpack-roadmap/issues/2125
Proposed changes:
hideCloseButton
propOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
cd projects/js-packages/storybook
andpnpm run storybook:dev
My Jetpack
and testProduct Interstitial Modal