Closed jeawhanlee closed 1 month ago
This Grooming covers these stories: https://github.com/wp-media/wp-rocket/issues/6842 https://github.com/wp-media/wp-rocket/issues/6843
Looks good to me
Added an item about renaming button Remove Unused CSS
in File Optimization tab.
Description
In 3.17, we will no longer be clearing actions between RUCSS and OCI, so to that fact, we need to change how this was done.
Scope a solution
Data Clearing
In
WP_Rocket\Engine\Saas\Admin\AdminBar
add_clean_saas_menu_item
atf
check & title withClear Critical Images
Clear Used CSS
toClear RUCSS optimizations
add_clean_url_menu_item
atf
check & title withClear Critical Images of this URL
Clear Used CSS of this URL
toClear RUCSS optimizations of this URL
display_dashboard_button
atf
checkCritical Images Cache
Remove Used CSS Cache
toRemove Unused CSS
Clear Used CSS
toClear RUCSS optimizations
Remove Unused CSS
toRemove Unused CSS (RUCSS)
In
WP_Rocket\Engine\Common\PerformanceHints\Admin
, create similar classes we had inWP_Rocket\Engine\Saas\Admin
with similar methods exclusive to the performance hints factories and we can also create a class or trait that can be shared by both performance hints and SaaS clearing module as I can see these classes (AdminBar
,Clean
,Notices
) contents can be abstracted that way we don't WRITE EVERYTHING TWICE (WET)Use
Clear Performance Hints data
as text on the WPR admin barUse Clear performance hints data of this URL as text on WPR admin bar for clearing specific url
Use
Performance Hints
as text &Clear
as label on the Quick Actions on the WPR DashboardOn hover over this button, We will display this text:
This action will clear data for Optimize Critical Images and Lazy Render Content.
In
WP_Rocket\Engine\Common\PerformanceHints\Admin\Subscriber
Replace these events (
rocket_saas_clean_all
,rocket_saas_clean_url
) with the new ones that will be created inWP_Rocket\Engine\Common\PerformanceHints\Admin\Clean
Notices
Notices for data clearing
WP_Rocket\Engine\Common\PerformanceHints\Admin\Controller::truncate_from_admin
WP Rocket: Critical images and Lazy Render data was cleared!
Notices for upgrade to 3.17
In
WP_Rocket\Engine\Admin\Beacon\Beacon::get_suggest
In
WP_Rocket\Engine\Admin\Settings\Page::display_update_notice
Update Tests
Acceptance Criteria