-
Notifications
You must be signed in to change notification settings - Fork 800
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
My Jetpack: Fix Protect card Tooltip placement & content issues #40691
My Jetpack: Fix Protect card Tooltip placement & content issues #40691
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.
I left a few minor comments but I don't see any as blocking. The translator comment should be fixed before deploying but that won't require a re-review
ownerDocument?: Document; | ||
}; | ||
|
||
export type PopoverProps = { |
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 guessing the Popover WordPress component doesn't have an exported types we could use instead? If not, how hard would it be to add them there? Only asking because the ideal scenario would be to have the component type itself, but I understand that may be more difficult than it's worth
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.
Yeah right, the Popover WordPress component doesn't have any exported types, unfortunately. But yeah you're right, it would be nice if it did! 👍
I'll add a followup maintenance task to update the WordPress Popover component to export the Popover type, and then come back here to clean up the InfoTooltip types.
...ckages/my-jetpack/_inc/components/product-cards-section/protect-card/scan-threats-status.tsx
Outdated
Show resolved
Hide resolved
if ( isProtectPluginActive ) { | ||
return protectPluginDashboardUrl; | ||
} | ||
return `https://cloud.jetpack.com/scan/${ siteSuffix }`; |
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 just an idea and I'm not sure how much better it would be, but it might be useful to have a getJetpackCloudLink
utility function that could be used like
return getJetpackCloudLink( `/scan/${sitesuffix}` );
Let me know what you think 😄
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.
Actually I refactored this..
Instead, I refactored class Protect::get_manage_url()
function to return either the Protect plugin dashboard url or the Jetpack Cloud Scan url based on whether the standalone or Jetpack plugin is installed & activated.
Then I pull and use that url here in use-protect-tooltip-copy.ts
. I think this would be the more appropriate solution. What do you think?
...es/my-jetpack/_inc/components/product-cards-section/protect-card/use-protect-tooltip-copy.ts
Outdated
Show resolved
Hide resolved
...es/my-jetpack/_inc/components/product-cards-section/protect-card/use-protect-tooltip-copy.ts
Outdated
Show resolved
Hide resolved
…r the standalone or Jetpack plugin.
This PR fixes a few minor issues with the placement and content of the Tooltips in the Protect product card in My Jetpack.
Original issues (screenshots):
Mobile view - Tooltip issues
** Notice in the "Auto-fix threats" tooltip (left img), it says "The last scan identified 6 critical threats.. But..."; This is wrong, as you can see, there is 6 (regular) threats and 1 critical threat.⤴️ .
This PR also fixes this incorrect wording
Fixes #40433
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: