wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

3.17 - Data Clearing & Notices

Open jeawhanlee opened this issue 1 year ago • 3 comments

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 atf check & title with Clear Critical Images
      • Rename Clear Used CSS to Clear RUCSS optimizations
    • In add_clean_url_menu_item
      • Remove every atf check & title with Clear Critical Images of this URL
      • Rename Clear Used CSS of this URL to Clear RUCSS optimizations of this URL
    • In display_dashboard_button
      • Remove every atf check
      • Remove every title & label with Critical Images Cache
      • Rename Remove Used CSS Cache to Remove Unused CSS
      • Rename Clear Used CSS to Clear RUCSS optimizations
    • In File Optimtization > CSS Files > Optimize CSS delivery
      • Rename button Remove Unused CSS to Remove Unused CSS (RUCSS)
  • In WP_Rocket\Engine\Common\PerformanceHints\Admin, create similar classes we had in WP_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 bar
    • Use 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 Dashboard
      • On 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 in WP_Rocket\Engine\Common\PerformanceHints\Admin\Clean

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!

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

jeawhanlee avatar Aug 06 '24 10:08 jeawhanlee

This Grooming covers these stories: https://github.com/wp-media/wp-rocket/issues/6842 https://github.com/wp-media/wp-rocket/issues/6843

jeawhanlee avatar Aug 06 '24 10:08 jeawhanlee

Looks good to me

Miraeld avatar Aug 06 '24 10:08 Miraeld

Added an item about renaming button Remove Unused CSS in File Optimization tab. CleanShot 2024-08-20 at 09 18 16@2x

benorfaz avatar Aug 20 '24 07:08 benorfaz