Skip to content

Commit

Permalink
Protect: Fix Status and Scan_History option deletion on deactivation (#…
Browse files Browse the repository at this point in the history
…38815)

* Add TypeScript support to Jetpack Protect

* Downgrade typescript to 5.0.4, to match other monorepo projects

* Add TypeScript support to Jetpack Protect

* Init feature branch

* Protect: Add Scan_History class (#37903)

* Protect: Add Scan History UI (#37988)

* changelog

* Protect: Separate scanner and history views via React Router and UI adjustments (#38325)

* Run ./tools/fixup-project-versions.sh

* Restore project versions

* Run ./tools/fixup-project-versions.sh

* Remove todo comment (#38628)

* Fix History error state, add access points, and fix hidden filters (#38656)

* Only display the manual scan message under the scanner threats list (#38626)

* Protect: Add unignore threat capabilities (#38094)

* Add Scan_History class

* changelog

* Update changelog

* Merge trunk, fix versions

* Add initial UI for scan history

* Add firstDetected and fixedOn details to threat cards

* Fix ignored message

* Fix console error

* Adjust wording and styles

* Optimize

* Fix firstDetected and fixedOn property retrieval issues, add todos

* Remove unneeded ref

* Consolidate scan history UI to existing components

* Remove todos

* Return false for scanHistory when upgrade is missing

* Manage ScanPage states when viewing history

* Move source data logic to useProtectData hook

* Improve Summary component Button logic

* ScanPage refactoring

* Reapply missing scanIsUnavailable check

* Add comments

* Hide ignore when viewing threats, and clear history cache when updating or fixing

* Add unignore actions and conditional handling to the UI

* Add null coalescing to core threat prop assignment

* Fix core threat normalization

* Optimizations and refactoring

* Revert standarization, and use conditionals

* Add dummy arg to avoid bad translation minification

* Changlog entry

* Move viewingScanHistory out of initial state

* Use threat status over lack of fixedOn to display unignore button

* Add foundation for unignore request

* Remove need for signature_id

* Add TypeScript support to Jetpack Protect

* Downgrade typescript to 5.0.4, to match other monorepo projects

* Add TypeScript support to Jetpack Protect

* Init feature branch

* Protect: Add Scan_History class (#37903)

* Protect: Add Scan History UI (#37988)

* Init feature branch

* Init feature branch

* Init feature branch

* Use react router for threat history, separate scan and history root components, minor UI adjustments

* changelog

* Add dummy args to avoid bad minification

* Hide scan section navigation when user has no plan

* Wrap ScanButton with forwardRef

* Add onboarding popover to Scan Now button in empty state

* Fix filtering of core threat history

* Redirect to /scan from /scan/history when user has no plan

* Fix animation glitch in onboarding popover

* Remove unnecessary additions

* Further removals after failed base merge

* More removals

* Add todos

* Use status to conditional render unignore action button

* Move ignore/unignore actions to dedicated modals

* Add TypeScript support to Jetpack Protect

* Downgrade typescript to 5.0.4, to match other monorepo projects

* Add TypeScript support to Jetpack Protect

* Init feature branch

* Protect: Add Scan_History class (#37903)

* Protect: Add Scan History UI (#37988)

* changelog

* Protect: Separate scanner and history views via React Router and UI adjustments (#38325)

* Run ./tools/fixup-project-versions.sh

* Restore project versions

* Run ./tools/fixup-project-versions.sh

* Remove todo comment (#38628)

* Remove changelog

* Display fix threat button only for current threats

* Further unification

* Refresh scan history after unignore

* Update projects/plugins/protect/src/js/components/unignore-threat-modal/index.jsx

Co-authored-by: Nate Weller <[email protected]>

* Fix lint errors

---------

Co-authored-by: Nate Weller <[email protected]>
Co-authored-by: Nate Weller <[email protected]>

* Do not show scan error when optimistically scanning (#38703)

* Refactor useProtectData hook (#38637)

* Fixup project versions

* Update deactivation method to delete relevant options

* changelog

* Simplify

* Remove changelog entries

* Remove changelog entries

* Remove changelog entries

* changelog

* Revert unintended Jetpack changes

---------

Co-authored-by: Nate Weller <[email protected]>
Co-authored-by: Nate Weller <[email protected]>
  • Loading branch information
3 people authored and pkuliga committed Aug 23, 2024
1 parent f839ef4 commit 547dbf2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Delete relevant Protect options on deactivation
6 changes: 5 additions & 1 deletion projects/plugins/protect/src/class-jetpack-protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
use Automattic\Jetpack\Protect\Scan_History;
use Automattic\Jetpack\Protect\Site_Health;
use Automattic\Jetpack\Protect_Status\Plan;
use Automattic\Jetpack\Protect_Status\Protect_Status;
use Automattic\Jetpack\Protect_Status\Scan_Status;
use Automattic\Jetpack\Protect_Status\Status;
use Automattic\Jetpack\Status as Jetpack_Status;
use Automattic\Jetpack\Sync\Functions as Sync_Functions;
Expand Down Expand Up @@ -296,7 +298,9 @@ public static function plugin_deactivation() {
$manager = new Connection_Manager( 'jetpack-protect' );
$manager->remove_connection();

Status::delete_option();
Protect_Status::delete_option();
Scan_Status::delete_option();
Scan_History::delete_option();
}

/**
Expand Down

0 comments on commit 547dbf2

Please sign in to comment.