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 #7068 admin UI for host fonts locally #7094

Merged
merged 7 commits into from
Nov 8, 2024

Conversation

remyperona
Copy link
Contributor

@remyperona remyperona commented Nov 6, 2024

Description

Fixes #7068

Add admin UI & option sanitization for the new host fonts locally option

Type of change

Detailed scenario

  • Host Google Font option is added in the media tab as a checkbox below the Image Dimensions section
  • The text under the media tab changes to “LazyLoad, image dimensions, font optimization”
  • The section heading is “Fonts”
  • The section description is “Download and serve fonts directly from your server. Reduces connections to external servers and minimizes font shifts. More info” (need links to documentation, FR and EN)
  • The checkbox label is “Host Google Fonts locally”
  • When enabling the option, the option is there in the options table

Technical description

Documentation

Added new sections for the fonts & host fonts locally in the admin.
Added initialization and sanitization of the host fonts locally option in the WPR settings.

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.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 1a097421 36.96% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1a09742) Report Missing Report Missing Report Missing
Head commit (63e4520) 38155 16707 43.79%

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 (#7094) 46 17 36.96%

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

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@remyperona remyperona marked this pull request as ready for review November 6, 2024 21:03
@Khadreal Khadreal linked an issue Nov 7, 2024 that may be closed by this pull request
@remyperona remyperona self-assigned this Nov 7, 2024
@remyperona remyperona added type: sub-task Indicates the issue is a sub-task linked to an epics card module: media labels Nov 7, 2024
@remyperona remyperona added this to the 3.18 milestone Nov 7, 2024
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Nov 8, 2024

Working as expected (fresh install , update, rollback and import settings). if nothing is needed for CI failed above then we can merge.
https://wpmediaqa.testrail.io/index.php?/cases/view/16909
https://wpmediaqa.testrail.io/index.php?/cases/view/16911
https://wpmediaqa.testrail.io/index.php?/cases/view/16912

@remyperona remyperona merged commit 48ef288 into feature/host-google-fonts Nov 8, 2024
12 of 15 checks passed
@remyperona remyperona deleted the task/7068-admin-ui branch November 8, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: media 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 - Admin UI part
3 participants