Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divi compatibility: Notice to clear used CSS is missing after re-enabling RUCSS feature even when needed #6095

Closed
MathieuLamiot opened this issue Aug 9, 2023 · 3 comments
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting can't reproduce Issues that can't be reproduced module: remove unused css needs: grooming priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement

Comments

@MathieuLamiot
Copy link
Contributor

MathieuLamiot commented Aug 9, 2023

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
This issue has been spotted by QA while testing #6074 . Notices for Divi users to clear used CSS is not displayed when the Remove Unused CSS option is switched from deactivated to activated, even though it could be needed.

To Reproduce
There are a couple of scenarios that are failing.

With Remove Unused CSS enabled and used CSS existing in the database:

  1. Disable Remove Unused CSS.
  2. Edit the global header in Divi's Theme Builder for any existing template.
  3. Enable Remove Unused CSS -> the notice is displayed. ✔️
  4. Disable Remove Unused CSS -> the notice isn't displayed. ✔️
  5. Enable Remove Unused CSS -> the notice is NOT displayed. ❌

For the second scenario, with Remove Unused CSS enabled and used CSS existing in the database:

  1. Disable Remove Unused CSS.
  2. Delete a template using the Divi Theme Builder -> the notice is not displayed. ✔️
  3. Enable Remove Unused CSS -> the notice is NOT displayed. ❌

Expected behavior
When activating the Remove Unused CSS options, if a Divi template has been updated since the last update of used CSS, then the notice must be displayed.

Additional context
This is a continuation of #6074

Acceptance Criteria

  • Scenarios from "To reproduce" are not failling anymore.
  • Acceptance criteria of the original feature still pass:
    Whenever Divi Template is updated and Used CSS is enabled, we'll display a dismissible warning on all admin pages (just like for activation/deactivation of the plugins, lack of the CSS is major thing)
    Whenever Divi Template is updated and Used CSS is disabled, notice will not be displayed.
    Wording will be as following: WP Rocket: Your Divi template was updated. Clear the Used CSS if the layout, design or CSS styles were changed.
    After clicking on Clear Used CSS, we'll purge the Used CSS and Cache
    After clicking on Dismiss, the message will disappear
    If the Divi template will be updated in the future, the message should be displayed once again
@piotrbak piotrbak added type: enhancement Improvements that slightly enhance existing functionality and are fast to implement 3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting priority: low Issues that can wait module: remove unused css needs: grooming labels Aug 27, 2023
@mostafa-hisham
Copy link
Contributor

mostafa-hisham commented Aug 29, 2023

I couldn't reproduce the problems in both scenarios
I provided recordings of the test

divi.notice.second.seario.mp4
divi.notice.first.seario.mp4

FYI: The recording and testing were done on fix/truncate-rucss-on-wp-rocket-options-changes branch of this PR because the fix is required for this feature to work. and it is not merged at this time

@mostafa-hisham mostafa-hisham added the can't reproduce Issues that can't be reproduced label Aug 29, 2023
@engahmeds3ed
Copy link
Contributor

@vmanthos @MathieuLamiot @piotrbak what do u think about that?

@vmanthos
Copy link
Contributor

vmanthos commented Sep 5, 2023

@engahmeds3ed Both me and @Mai-Saad tested this using 3.15 and the issues aren't there anymore. 🎉
I'll close the issue.

@vmanthos vmanthos closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting can't reproduce Issues that can't be reproduced module: remove unused css needs: grooming priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

No branches or pull requests

5 participants