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 #7064 CDN Compatibility for host fonts locally #7169

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

remyperona
Copy link
Contributor

@remyperona remyperona commented Dec 4, 2024

Description

Fixes #7064

Apply CDN URL on local fonts CSS & fonts files

Type of change

Detailed scenario

  • Enable CDN
  • local CSS and fonts should have their URLs rewrittent to the CDN URL

Technical description

Documentation

Use the existing filters we have rocket_css_url and rocket_css_content to apply CDN.

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 added the type: sub-task Indicates the issue is a sub-task linked to an epics card label Dec 4, 2024
@remyperona remyperona added this to the 3.18 milestone Dec 4, 2024
@remyperona remyperona self-assigned this Dec 4, 2024
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -0.10%) 100.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b96427d) 38431 16873 43.90%
Head commit (5cee326) 38432 (+1) 16874 (+1) 43.91% (+0.00%)

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 (#7169) 2 2 100.00%

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

@remyperona remyperona requested a review from a team December 4, 2024 15:39
@remyperona remyperona marked this pull request as ready for review December 4, 2024 15:39
@jeawhanlee jeawhanlee linked an issue Dec 5, 2024 that may be closed by this pull request
@hanna-meda
Copy link
Contributor

Thanks for the PR, @remyperona.
After testing it, I came across one finding:
• When a CDN is set up and then disabled, the CDN path sometimes remains in the CSS for font URLs, while other pages correctly display the local path.
Page example with local path in both CSS and font URLs (inside CSS file) =>
https://newer.rocketlabsqa.ovh/gf-v1v2-image/
Page example where local path in CSS but CDN path for font URLs (inside CSS file) =>
https://newer.rocketlabsqa.ovh/merianda-obscure-gf-font/
Screenshot 2024-12-06 at 19 03 40
Note: This can be reproduced also when using One's CDN service.

@remyperona
Copy link
Contributor Author

Good catch, I fixed this in the PR that is handling clearing of the data 1ca09d9

@MathieuLamiot
Copy link
Contributor

Should this go back to QA then? @remyperona @hanna-meda

@hanna-meda
Copy link
Contributor

I fixed this in the PR that is handling clearing of the data 1ca09d9

Checked the fix for this on 1ca09d9 but it can still be reproduced for some pages. @remyperona, if you'll continue to fix it on task/7071-clear-data PR, then this task can be closed as done.

Copy link
Contributor

@hanna-meda hanna-meda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing this as done with note that TCs in TP will be included and retested under #7110's testing plan.
cc @Mai-Saad

@hanna-meda hanna-meda merged commit eb81681 into feature/host-google-fonts Dec 9, 2024
14 of 16 checks passed
@hanna-meda hanna-meda deleted the task/7064-cdn-compatibility branch December 9, 2024 14:43
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 - CDN compatibility part
4 participants