3.17 - Data Clearing & Notices
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- In
add_clean_saas_menu_item- Remove every
atfcheck & title withClear Critical Images - Rename
Clear Used CSStoClear RUCSS optimizations
- Remove every
- In
add_clean_url_menu_item- Remove every
atfcheck & title withClear Critical Images of this URL - Rename
Clear Used CSS of this URLtoClear RUCSS optimizations of this URL
- Remove every
- In
display_dashboard_button- Remove every
atfcheck - Remove every title & label with
Critical Images Cache - Rename
Remove Used CSS CachetoRemove Unused CSS - Rename
Clear Used CSStoClear RUCSS optimizations
- Remove every
- In File Optimtization > CSS Files > Optimize CSS delivery
- Rename button
Remove Unused CSStoRemove Unused CSS (RUCSS)
- Rename button
- In
-
In
WP_Rocket\Engine\Common\PerformanceHints\Admin, create similar classes we had inWP_Rocket\Engine\Saas\Adminwith 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 dataas text on the WPR admin bar - Use Clear performance hints data of this URL as text on WPR admin bar for clearing specific url
- Use
Performance Hintsas text &Clearas label on the Quick Actions on the WPR Dashboard- On hover over this button, We will display this text:
This action will clear data for Optimize Critical Images and Lazy Render Content.
- On hover over this button, We will display this text:
- Use
-
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
- Replace these events (
Notices
Notices for data clearing
- In
WP_Rocket\Engine\Common\PerformanceHints\Admin\Controller::truncate_from_admin- Update the notice text -
WP Rocket: Critical images and Lazy Render data was cleared!
- Update the notice text -
Notices for upgrade to 3.17
-
In
WP_Rocket\Engine\Admin\Beacon\Beacon::get_suggest- Add the new performance hint section and data
-
In
WP_Rocket\Engine\Admin\Settings\Page::display_update_notice- Update the condition to 3.17
- Update the notice text to https://www.notion.so/wpmedia/Lazy-render-content-bf707b5f731a426cb5d1294beb770540?pvs=4#b5d069b2e8d147119a15c5f7408b22b8
-
Update Tests
Acceptance Criteria
- All Cache clearing text in WPR Admin bar & Dashboard Should be updated to those in the Epic
- When RUCSS optimization data is cleared, Performance hints data (OCI & LRC) should not be cleared
- When Performance Hints data (OCI & LRC) is cleared RUCSS optimization data should not be cleared
- RUCSS optimization data should be cleared as expected for total & partial clearing, No regression should be introduced
- Performance Hints data (OCI & LRC) should be cleared as expected for total & partial data clearing.
- RUCSS optimization clear button and Performance Hints Optimization clear button should not be displayed when features are disabled both on WPR Admin bar and WPR Dashboard.
- Performance Hints data must be cleared when
- Switch theme
- Change permalinks
- Domain Changed
- Post Trash
- Post Delete
- Post cache clear
- Comment count update
- Term Update
- Term Delete
- Delete from WPR Admin Bar
- On WPR update
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.