Skip to content
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

ThreatsModal: Add bulk support #40692

Open
wants to merge 293 commits into
base: add/protect/core
Choose a base branch
from

Conversation

dkmyta
Copy link
Contributor

@dkmyta dkmyta commented Dec 19, 2024

Description

Update the original ThreatModal integration (proposed here) to add support for handling bulk threats.

Note: This addresses adding a modal for bulk fixer actions to align with that of the internal Protect alternative, however, we should consider a follow up task to add functionality to allow users so select any individual from the bulk list to view the individual threat details, proceed with actions, etc. Drafted up a potential solution for this here: #40720

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

  • See ThreatsModal and ThreatsDataViews storybooks
  • Checkout this Protect branch on Jurassic Tube/Ninja
  • Ensure that the modal is properly integrating in the ScanResultsDataViews instance and displays when trigger the Show auto fixers action

Screenshots

Single threat:
Screen Shot on 2024-12-19 at 19-18-13

Multiple threats:
Screen Shot on 2024-12-20 at 14-08-05

nateweller and others added 26 commits January 12, 2025 11:19
Protect: add HMR support

Revert "Protect: add HMR support"

This reverts commit 06497a0.
* Init project branch

* Protect: Add Go to Cloud and Scan now button to Protect primary header (#40057)

Co-authored-by: Nate Weller <hello@nateweller.com>

* Protect: Update Scan and History headers (#40058)

* Update Scan and History section header structure/content

* changelog

* Update projects/plugins/protect/src/js/routes/scan/scan-admin-section-hero.tsx

Co-authored-by: Nate Weller <nate.weller@automattic.com>

---------

Co-authored-by: Nate Weller <nate.weller@automattic.com>

* Protect: de-emphasize cloud link by using link variant (#40211)

* Protect: add ShieldIcon component

* Protect: Add ShieldIcon Component (#40402)

* Protect: Integrate ThreatsDataViews Component (#40076)

* Components: Add ScanReport (#40419)

* Fix type errors

* Protect: add home page

---------

Co-authored-by: Nate Weller <hello@nateweller.com>
Co-authored-by: Nate Weller <nate.weller@automattic.com>
Co-authored-by: Dean Kmyta <dkmyta@automattic.com>
* Init project branch

* Init project branch

* Disable hiding of relevant fields

* Remove custom name field handling for files, show type by default in list view

* Init project branch

---------

Co-authored-by: Nate Weller <hello@nateweller.com>
* Init project branch

* Protect: Add Go to Cloud and Scan now button to Protect primary header (#40057)

Co-authored-by: Nate Weller <hello@nateweller.com>

* Protect: Update Scan and History headers (#40058)

* Update Scan and History section header structure/content

* changelog

* Update projects/plugins/protect/src/js/routes/scan/scan-admin-section-hero.tsx

Co-authored-by: Nate Weller <nate.weller@automattic.com>

---------

Co-authored-by: Nate Weller <nate.weller@automattic.com>

* Protect: de-emphasize cloud link by using link variant (#40211)

* Protect: add ShieldIcon component

* Protect: Add ShieldIcon Component (#40402)

* Protect: Integrate ThreatsDataViews Component (#40076)

* Components: Add ScanReport (#40419)

* Fix type errors

Protect: add HMR support

Revert "Protect: add HMR support"

This reverts commit 06497a0.

* Protect: Refactor AdminSectionHero (#40516)

* Restore history header

* Pass status filter presets to consumer

* Restore early return

* Add plan level restrictions

* Remove unneeded filter handling

* Revert unnecessary threats data views updates

* Fix import

* Add size prop

---------

Co-authored-by: Nate Weller <hello@nateweller.com>
Co-authored-by: Nate Weller <nate.weller@automattic.com>
* Init project branch

* Protect: Refactor AdminSectionHero (#40516)

* Restore history header

* Pass status filter presets to consumer

* Restore early return

* Add plan level restrictions

* Init project branch

* Protect: Integrate ThreatsDataViews Component (#40076)

* Separate scan and history DataViews

* Reapply history routes

* Add filters

* Add toggle group control

* Add historic flag

* Update stories

* Remove unneeded filter handling

* Revert unnecessary threats data views updates

* Fix import

* Include fixer action as label in list view action dropdown

* Add field constants

* Reorg

* Add initialFields prop, update active to current where applicable

* Init project branch

* Fix exports and imports

* Move default values to function params

* Fix ts warning

* minor adjustment to definition of initial filters

* Add tsc-expect-error to dummy arg for minification cases

---------

Co-authored-by: Nate Weller <hello@nateweller.com>
Co-authored-by: Nate Weller <nate.weller@automattic.com>
* Init project branch

* Init project branch

* Improve component responsiveness

* Init project branch

* Fix merge conflict

* Simplify, and only default to list view in mobile

* Fix spacing

* Minor adjustments to initialization of defaultLayouts, remove memo

* Remove style overrides on core component

* Reapply min-width for ScanToggleGroupControl

---------

Co-authored-by: Nate Weller <hello@nateweller.com>
…to add/components/threats-modal-bulk-variation
Base automatically changed from add/components/threats-data-views-modal-integration to add/protect/core January 14, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs [JS Package] Components [JS Package] Scan [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. RNA [Status] In Progress [Tests] Includes Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants