Fix #7417: Fix exclusions logic#64
Merged
wordpressfan merged 2 commits intodevelopfrom Aug 15, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the exclusions logic in the beacon's font preloading functionality by consolidating two separate exclusion lists into a single comprehensive check. The fix ensures that both preload_fonts_exclusions and external_font_exclusions are considered when determining whether to preload fonts.
- Combines two exclusion configuration arrays into a single filtering mechanism
- Updates the exclusion check logic to use the consolidated list
- Maintains existing error handling structure
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #7417
Fix the exclusions logic in the beacon
Type of change
Detailed scenario
What was tested
The beacon script
How to test
Add api.fontshare.com & cdn.fontshare.com to Preload Fonts Exclusions list in BE
From UI, update the dynamic lists data
Enable Preload Fonts
Visit https://rocketlabsqa.ovh/preloadfonts_multiple_external_fonts/ and check Console
Technical description
Documentation
This pull request refines the font preloading logic in the
BeaconPreloadFontsclass by consolidating and expanding the handling of exclusion lists.Improvements to font preloading logic:
src/BeaconPreloadFonts.js: Updated the exclusion logic to combinepreload_fonts_exclusionsandexternal_font_exclusionsinto a single list (allExclusions) for more comprehensive filtering of font links. This ensures that both types of exclusions are considered when determining whether to preload a font.New dependencies
None
Risks
None
Mandatory Checklist
Code validation
Code style