-
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: Add a Protect 'needs-attention' status when Threats are detected. #40628
base: trunk
Are you sure you want to change the base?
Conversation
…ubble-needs-attention-notice
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 have added one commit to fix minification issue with i18n. The code tests well after that!
I left some remarks, and the phan error should be addressed. Hope that will help move things further.
projects/packages/my-jetpack/_inc/components/product-card/action-button.tsx
Outdated
Show resolved
Hide resolved
projects/packages/my-jetpack/_inc/components/product-card/action-button.tsx
Outdated
Show resolved
Hide resolved
projects/packages/my-jetpack/_inc/components/product-card/index.tsx
Outdated
Show resolved
Hide resolved
if ( slug === 'protect' ) { | ||
return __( 'Active', 'jetpack-my-jetpack' ); | ||
} | ||
return __( 'Needs attention', 'jetpack-my-jetpack' ); |
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 ask to understand more: are there no cases we need to actually display "Needs attention" in Protect card?
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.
If so, I could make use of some comment here, cause it's a bit difficult to understand from the context.
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 ask to understand more: are there no cases we need to actually display "Needs attention" in Protect card?
As I understand it, for the Protect card, even when it has a NEEDS_ATTENTION__{WARNING | ERROR} status (which means threats have been detected), we still want to show the card status as 'Active' (per the designs: v1IWiVmOAvI8yT8CCa4b1I-fi-4398_9423).
I believe this is to portray to the user that Protect is still operating correctly/normally as it should (however threats were detected).
I left a comment in the code (as you suggested) to explain there also.
@robertsreberski, thanks very much for the review! Much appreciated! 🙌 |
This PR adds a 'needs-attention' status to the Protect product card in My Jetpack when Protect threats are detected.
The Primary CTA changes to "Fix threats".
The 'needs-attention' status itself is actually hidden in the sense that the status still remains as "Active", however the product card border will either be yellow or red
Fixes https://github.com/Automattic/jetpack-roadmap/issues/1939
Proposed changes:
needs_attention
status into 2 separate statuses (needs-attention__warning
&needs-attention__error
)needs-attention__warning
), if there are Critical threats, Protect has a red border (needs-attention__error
).Other information:
Jetpack product discussion
Project Thread: pbNhbs-bJN-p2
Design post: p1HpG7-umC-p2
Does this pull request change what data or activity we track or use?
Testing instructions: