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

Closes #7071 Clean CSS & fonts for host fonts locally #7110

Merged
merged 23 commits into from
Dec 13, 2024

Conversation

remyperona
Copy link
Contributor

@remyperona remyperona commented Nov 14, 2024

Description

Fixes #7071

Clean CSS & fonts when rocket_clean_domain() is called. Also do it on option change, in addition to clearing the used CSS.

Type of change

Detailed scenario

  • Clear cache should delete the CSS & fonts
  • Changing the option value should delete the CSS & fonts and the used CSS

Technical description

Documentation

Add a new class & subscriber to handle cleaning of the data

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.

@remyperona remyperona self-assigned this Nov 14, 2024
@remyperona remyperona added the type: bug Indicates an unexpected problem or unintended behavior label Nov 14, 2024
@remyperona remyperona added this to the 3.18 milestone Nov 14, 2024
@remyperona remyperona changed the base branch from develop to feature/host-google-fonts November 14, 2024 21:06
@remyperona remyperona added type: sub-task Indicates the issue is a sub-task linked to an epics card and removed type: bug Indicates an unexpected problem or unintended behavior labels Nov 14, 2024
Copy link

codacy-production bot commented Nov 14, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -0.10%) 52.08% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ea1eee8) 38495 16909 43.93%
Head commit (1757e20) 38505 (+10) 16919 (+10) 43.94% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7110) 48 25 52.08%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@wp-media wp-media deleted a comment from codacy-production bot Dec 4, 2024
@remyperona remyperona marked this pull request as ready for review December 4, 2024 19:06
@remyperona remyperona requested a review from a team December 4, 2024 19:06
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Dec 6, 2024

@remyperona Thanks for the PR.
[WIP] Exploratory test notes

  • 1- Enable/disable the host locally while RUCSS is off, won't delete the used CSS => it should be deleted in this case as per AC The feature will clear Used CSS when activating/deactivating the feature (no matter if Used CSS is enabled or not) ==> same is happening when import settings that change GF status while rucss is off) ==> still not working with commit c17b04d

  • 2- After delete WPR while Host google fonts is on, the fonts folder is not deleted => same for LL CSS background on 3.17.3.1

3- We need to decide which events exactly are used for rocket-clean-domain => https://wp-media.slack.com/archives/CUT7FLHF1/p1733497163105209 ====> New issue will be opened to exclude deletion of fonts but still CSS of GF shall be deleted

@remyperona remyperona linked an issue Dec 10, 2024 that may be closed by this pull request
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Dec 13, 2024

It is working fine now, We will need to fix the conflict and do smoke if required.
testrail-report-667.pdf

@remyperona remyperona merged commit 2c51c61 into feature/host-google-fonts Dec 13, 2024
13 checks passed
@remyperona remyperona deleted the task/7071-clear-data branch December 13, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: sub-task Indicates the issue is a sub-task linked to an epics card
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.18 - Enhancements related to clearing the data 3.18 - Clearing the data
3 participants