-
Notifications
You must be signed in to change notification settings - Fork 843
Protect Meets Core: add components to scan package #42562
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
Conversation
|
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Protect plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 5 files.
21 files are newly checked for coverage. Only the first 5 are listed here.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
34e0cda to
2ac6e59
Compare
c88b374 to
df7e741
Compare
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.
Really nicely done! A few minor things:
- The Loading, Stale, and Error stories for the
ThreatFixerButtondo not appear to be working. - For the
ThreatsDataViewsHistoric story, I noticed we offer aStop ignoringitem in the action drop down, will this immediately trigger an un-ignore without confirmation or should it open an un-ignore confirmation modal? - The
ThreatsDataViewsAdditional Connections Needed story currently does not show any prompts for connections when triggering an action. - The
ThreatsDataViewsUser Connection Needed story currently shows the credentials prompt when triggering an action. - I think this might be correct but I will mention it anyway, for all of the
ThreatsDataViewsconnection related stories we don't show the connection prompts for ignore/unignore, my memory is failing me here, do we not currently do that or need that for these actions? - The
ThreatsDataViewsFree Results story does not currently render the upgrade prompt in the modal.
Some non-blocking nit-picks:
- For the
ThreatsDataViews, is there any way to improve the transition between modal states? Looks like currently the modal closes, we quickly flash the table, then a new one opens with the new content, rather than modal remaining open and the content changing without a transition. - For the
ThreatsDataViewsHistoric story I initially found theStop ignoringbutton content slightly confusing for the un-ignored threats modal - as if it was currently in the process of ignoring and I could stop that. I don't loveUn-ignoreeither but it is the clear opposite action ofIgnore.
199b740 to
79f3429
Compare
changelog changelog Update changelog Update changelog changelog
79f3429 to
8832648
Compare
8832648 to
c403999
Compare
|
@dkmyta I've updated the ThreatsDataViews story to use storybook args to allow for testing various component props together:
Additionally fixed the fixer button stories, and adjusted stop vs un ignore verbiage 👍 |
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.
ThreatsDataViews stories are much better using the storybook args, nice work!
I haven't exhaustively tested all the various combinations but there seems to be at least one outstanding issue with this configuration:
Data Type : Current Threat
Jetpack Plan : Scan
Jetpack Connection : Custom
Site Credentials : Connected
Refer to Codeable : false
Clicking an update action causes Error: Cannot read properties of null (reading 'connected')
I am not sure of the use-case of this Custom connection type, and it might not be a possible combination in the wild, but we should ensure stories aren't erroring out in any case, and/or remove any options that aren't currently possible.
Previously we had a custom modal state for when there were both connections missing. Is that no longer a thing? I have no problem with the individual/consecutive connection modals, just want to make sure I am not missing something I should be seeing.
A few items from my previous notes we should also confirm on:
- Should
Un-ignore(from modal or actions dropdown) immediately trigger an un-ignore action or should it open a un-ignore confirmation modal like the ignore action? - Ignore actions prompt for connections, should un-ignore actions?
- Note: Seems like only a site connection is prompted currently
- Question: If only fixers require connections, maybe both ignore/un-ignore can be free of this? Either way, we should keep them consistent IMO
- I suspect improving modal transitions is not an easy fix, just wanted to get your opinions in case you missed it initially

Proposed changes:
@automattic/jetpack-scanproject.add/protect/corebranch can be rebased, and any modifications in the components package removed.Other information:
Jetpack product discussion
peb6dq-31T-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
cd projects/js-packages/storybook && pnpm storybook:devto run locally.