Skip to content

Conversation

@remyperona
Copy link
Contributor

@remyperona remyperona commented Mar 31, 2022

Description

Update the deactivation form UI to provide a simpler choice to the users, and allow them to snooze the form for a period of time or forever.

Also remove the mixpanel usage.

Fixes #4867
Fixes #1959

Type of change

  • Enhancement (non-breaking change which improves an existing functionality)

Is the solution different from the one proposed during the grooming?

No

How Has This Been Tested?

  • Manual tests
  • Automated tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@remyperona remyperona added the type: enhancement Improvements that slightly enhance existing functionality and are fast to implement label Mar 31, 2022
@remyperona remyperona added this to the 3.11.1 milestone Mar 31, 2022
@remyperona remyperona self-assigned this Mar 31, 2022
@remyperona remyperona marked this pull request as ready for review April 5, 2022 19:17
@remyperona remyperona requested a review from a team April 5, 2022 19:17
@CrochetFeve0251
Copy link
Contributor

@Tabrisrp There is a notification about a file tests/Fixtures/inc/ThirdParty/Plugins/PDFEmbedder/core/secure/uploads.php
where I can't comment but where a property is in the middle of multiple functions can you move it up with the others properties as I can't do anything on this file except adding a new commit?

@engahmeds3ed
Copy link
Contributor

@Tabrisrp
just one small question, does it worth to deprecate the deleted class here inc/classes/admin/deactivation/class-render.php so if it's used by another code to keep it working with deprecation notice.

But we are fine to go.

@Mai-Saad
Copy link
Contributor

Mai-Saad commented Apr 19, 2022

@Tabrisrp @piotrbak Please find exploratory test notes/qs below
1- Do we need to display any notice when applying safe mode?

2- UI: the current modal does not match the design in the following points (for me it's fine, what do you think @piotr?)
2.1 dropdown black border not there in design
2.2 dropdown items color blue while the design is black and bold
2.3 check icon exists in design but not in modal beside the dropdown
Screenshot from 2022-04-19 10-49-03
Screenshot from 2022-04-19 10-48-51
Screenshot from 2022-04-19 10-48-44

3- Responsive:
3.1 Spacing adjustment needed in mobile view
Screenshot from 2022-04-19 08-54-07

3.2 Background color of snoozing time dropdown is different between different browsers, shouldn't it be the same?
FFDeactivate

4- Fatal error exists when we switch to trunk, composer dumpautoload then refresh the dashboard without deactivating WPR, Do we need to guard against it?

[19-Apr-2022 08:51:12 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::__construct() must implement interface WP_Rocket\Interfaces\Render_Interface, string given in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Admin/Deactivation/DeactivationIntent.php:50
Stack trace:
#0 [internal function]: WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent->__construct('WP_Rocket\\Admin...', Object(WP_Rocket\Admin\Options), Object(WP_Rocket\Admin\Options_Data))
#1 /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Definition/Definition.php(256): ReflectionClass->newInstanceArgs(Array)
#2 /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Definition/Definition.php(212): WP_Rocket\Dependencies\League\Container\Definition\Definition->resolveClass('WP_Rocket\\Engin...')
#3 /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/ in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Admin/Deactivation/DeactivationIntent.php on line 50

If we didn't use composer dumpautoload, the error will block the dashboard

@engahmeds3ed engahmeds3ed merged commit 903d311 into develop Apr 28, 2022
@engahmeds3ed engahmeds3ed deleted the enhancement/4867-deactivation-ui branch April 28, 2022 13:36
CrochetFeve0251 added a commit that referenced this pull request May 2, 2022
* Fixes #4757 Exclude AMP redirection script from delay JS (#4827)

* Added amp-mobile-version-switcher to the HTML DelayJs exclusion array

* Added amp-mobile-version-switcher script the delayJs fixture to ensure by automated testing that this script is not deleted

* Reverted changes in DelayJS and fixtures corresponding to it.

* Added a call to the filter rocket_delay_js_exclusions in the AMP Subscriber to exclude amp-mobile-version-switcher

* Wrapped the filter rocket_delay_js_exclusions in the AMP verification to launch it only when it is activated

* Fixed code standards

* Added integration test for the exclude_script_from_delay_js method

* Update version in inc/ThirdParty/Plugins/Optimization/AMP.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Use configTestData instead of providerTestData tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Remove providerTestData function in tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Removed providerTestData mehod in tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Use configTestData instead of providerTestData in tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Update inc/ThirdParty/Plugins/Optimization/AMP.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Update tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Update tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Added Integration TestCase

Co-authored-by: Rémy Perona <remy@wp-rocket.me>

* Fixes #4804 Use absint values for width/height values when setting image dimensions of SVG files (#4805)

* Fixes #4527 Remove Rocket option to deactivate lazyload of iframes and YT videos when Autoptimize lazyload is enabled (#4889)

* Closes #4020 Delete metadata from the postmeta table during uninstall (#4855)

* Closes #4133 Clean feeds only if our cache feeds helper plugin is enabled (#4833)

* Fixes #4171 Exclude judge.me script from delay JS (#4839)

* Fixes #4032 Disabling heartbeat causing dependency error in query monitor (#4888)

* Prevent issues when parsing the HTML to apply optimizations (#4838)

* Fixes #4758 Exclude our remove CPCSS script from delay JS (#4824)

* Closes #4896 Update test suite (#4903)

Update our test suite to be cross-compatible with WP and PHPUnit versions

* Prevent PHP 8.1 deprecation notices (#4732)

* Flatsome preserver dynamic #image_ style (PR #4979)

Fixes #4971

* Preserve Health Center dynamic CSS selectors (PR #4976)

* Closes #4867 Update the deactivation form UI (PR #4880)

* Remove render class
* move deactivation form assets to deactivation intent class
* update classes instantiation
* add subscriber class
* update code for new deactivation intent form
* delete new option and transient on uninstall
* remove modal task
* remove old modal CSS
* remove old modal JS
* use micromodal for deactivation modal
* update the form HTML
* update the modal CSS
* update micromodal to v0.4.10
* return type hint
* add transition
* replace divs by list
* remove unneeded comment
* add missing semicolon
* update activate_safe_mode tests
* add unit tests
* add fixtures
* cast option to int
* update used hooks
* remove screen check
* update test and fixture
* integration tests
* fix PHPCS

* Fixes #4868 Apply CDN to used CSS on output instead of on saving (PR #4893)

* Moved the filter and removed the clean_used_css_with_cdn method
* Removed fixtures and integration tests from the method `clean_used_css_with_cdn`
* Added unit tests for treeshake function from UsedCSS controller
* Fixed code standards
* Removed quotes
* Fixed errors with the tests
* replicate magic isset declaration from parent class
* revert previous commit

Co-authored-by: Rémy Perona <remperona@gmail.com>

* Fix problem with action scheduler (PR #4965)

* Added fix
* Added fix standards
* Added check on pending
* Fixed search
* Added fix standards
* Fixed to conform to CR
* Fixed code standards
* Fixed code standards
* Changed `search` method usage to keep backward compatibility
* stop bailing out after cancel all actions

Co-authored-by: Ahmed Saeed <eng.ahmeds3ed@gmail.com>

* update plugin version

* Fixed failing test (#4986)

Co-authored-by: COQUARD Cyrille <18537428+CrochetFeve0251@users.noreply.github.com>
Co-authored-by: Rémy Perona <remy@wp-rocket.me>
Co-authored-by: Klemart3D <Klemart3D@users.noreply.github.com>
Co-authored-by: michael lee <38788055+jeawhanlee@users.noreply.github.com>
Co-authored-by: Rémy Perona <remperona@gmail.com>
Co-authored-by: Adame Dahmani <hello@adame.io>
Co-authored-by: Vasilis Manthos <vmanthos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Improvements that slightly enhance existing functionality and are fast to implement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the deactivation intent UI Why is WP Rocket adding Mixpanel JS to plugins.php?! Rocket Analytics is OFF!

5 participants