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

core(font-display): dedupe warnings by font origin #11068

Merged
merged 5 commits into from
Jul 8, 2020
Merged

Conversation

brendankenny
Copy link
Member

fixes #9775

as agreed in the bug bash that generated the last issue comment, the vast majority of these warnings are from cross-origin fonts that the audit can't see font-display info about, so we decided to dedupe by origin.

before/after shots:

#⁠9775 oopif smoke test repro

before:

after:
font-display audit after fix

#10812 repro

before:
font-display audit before fix

after:
font-display audit after fix

@brendankenny brendankenny requested a review from a team as a code owner July 7, 2020 22:12
@brendankenny brendankenny requested review from connorjclark and removed request for a team July 7, 2020 22:12
Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

nice.gif

'for the following URL: {fontURL}.',
undeclaredFontOriginWarning:
'Lighthouse was unable to automatically check the {fontCountForOrigin, plural, ' +
'=1 {`font-display` value for the following origin: {fontOrigin}.} ' +
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: maybe drop both usages of following?

Copy link
Member Author

Choose a reason for hiding this comment

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

nit: maybe drop both usages of following?

yeah, I'm not super in love with the warning text overall, but it's rarely seen enough that I don't have any interest in trying out a whole new sentence. Just dropping 'following' sounds good :)

Copy link
Member

@exterkamp exterkamp left a comment

Choose a reason for hiding this comment

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

Need to fix the ICU to be valid in tc/

undeclaredFontURLWarning: 'Lighthouse was unable to automatically check the font-display value ' +
'for the following URL: {fontURL}.',
undeclaredFontOriginWarning:
'Lighthouse was unable to automatically check the {fontCountForOrigin, plural, ' +
Copy link
Member

Choose a reason for hiding this comment

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

This is illegal. Can't have text outside a complex ICU message. It should be moved to be repeated in each option.

go/icu-message-migration#message-should-not-have-text-including-whitespaces-andor-placeholders-preceding-or-following-icu-complex-syntax

Copy link
Member Author

Choose a reason for hiding this comment

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

This is illegal. Can't have text outside a complex ICU message. It should be moved to be repeated in each option.

arg, makes sense (for those without access, other languages might need to change other parts outside of the brackets to grammatically work with the plural).

Seems like something we could automatically reject in the future.

Copy link
Member

@exterkamp exterkamp left a comment

Choose a reason for hiding this comment

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

ICU LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

font-display audit warnings for iframes
6 participants