You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is a summary generated by AI that I've edited. Some important context in there around specificity issues.
I'd like reviewers to take a look at the chromatic snapshot diff and see if you can work out an alternative explanation than a 'rendering artifact' for the diff.
Please note that the commit history is a bit messed up because the PR below this one was rebased and I merged it into this one. I tried using the stack feature but didn't realising merging a rebasing should not mix with that feature!
Summary
Batch 1 of the SCSS Modules migration converts Copyright, ReadTime, and InlineLink from Emotion to SCSS Modules.
EmbedError is also migrated because its consumer-owned Emotion override exposed a real styling regression in InlineLink.
The migration and styling guidance has been updated with the lessons from the implementation and review.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved moderate issues remain in EmbedError focus-class preservation and InlineLink’s 320–399px typography breakpoint.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (4)
src/app/components/Copyright/index.module.scss:11
This new module still hard-codes the ReithSans stack. The theme already centralizes that value as $reith-sans in src/app/components/ThemeProviderSCSSModules/fontFamilies.scss:34, and the migrated SCSS convention is to consume tokens through themeTokens; leaving the literal here can drift from the shared theme value. Forward the font-family token through themeTokens and use it here.
Passing styles.inlineLink replaces InlineLink's default className="focusIndicatorReducedWidth". Before this change EmbedError passed no className, so the link received the reduced focus ring; now it only receives the generic anchor focus rule, changing the component's focus treatment. Compose the contextual class with focusIndicatorReducedWidth instead of replacing it.
This switches to the group-D custom properties only at 1008px, but the previous fontSizes styles and the SCSS gel-font-size mixin switch to group D at 600px (src/app/components/ThemeProvider/fontSizes.ts:15-18 and src/app/components/ThemeProviderSCSSModules/fontSizes.scss:236-240). Between 600px and 1007px, migrated links therefore keep the smaller group-B typography. Use the font-specific group-D breakpoint instead.
This change specifically promises to preserve consumer-supplied className values, but the ReadTime suite never renders one. Add a test asserting that a supplied class is present alongside styles.readTimeContainer, so a future regression to overwriting or dropping the consumer class is caught.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Two moderate issues remain involving EmbedError focus styling and serifRegular fallback behavior.
Review details
Suppressed comments (2)
src/app/components/Embeds/EmbedError/index.tsx:24
Passing styles.inlineLink replaces InlineLink's default focusIndicatorReducedWidth class instead of adding to it. Embed errors therefore lose the reduced-width focus treatment and fall back to the generic anchor focus rule; combine the two classes here (or make InlineLink merge its default class with consumer classes).
This alias changes the existing serifRegular behaviour for services that define --serif-regular-*. The legacy resolver deliberately maps serifRegular to the serif medium variant (src/app/components/ThemeProvider/fontVariants/index.tsx:24-25), and the existing Text test expects ReithSerif weight 500 (src/app/components/Text/index.test.tsx:32-44), but this chain resolves --serif-regular-font-weight first, which is 400 in fontVariants/reith.scss. Make the serif-regular alias start at serif-medium (while retaining the sans fallback) and add a regression assertion for this chain.
* Passing `styles.inlineLink` replaces InlineLink's default `focusIndicatorReducedWidth` class instead of adding to it. Embed errors therefore lose the reduced-width focus treatment and fall back to the generic anchor focus rule; combine the two classes here (or make InlineLink merge its default class with consumer classes).
* This alias changes the existing `serifRegular` behaviour for services that define `--serif-regular-*`. The legacy resolver deliberately maps `serifRegular` to the serif medium variant (`src/app/components/ThemeProvider/fontVariants/index.tsx:24-25`), and the existing Text test expects ReithSerif weight 500 (`src/app/components/Text/index.test.tsx:32-44`), but this chain resolves `--serif-regular-font-weight` first, which is 400 in `fontVariants/reith.scss`. Make the `serif-regular` alias start at `serif-medium` (while retaining the sans fallback) and add a regression assertion for this chain.
This is a valid observation: the legacy Emotion resolver currently maps serifRegular to serif.medium, which gives ReithSerif weight 500, while the SCSS alias prefers the explicit serif-regular token, which gives weight 400.
The SCSS behaviour is intentional and was introduced earlier in f0bc46f when the serifRegular font was corrected to reflect what must have been originally intended.
I'll address the inconsistency in a follow-up PR by updating the Emotion resolver and its consumers to use the same font fallback chain.
The size branch now emits group-B and group-D font-size/line-height custom properties, but the test table only asserts group A. The Sass test confirms that the mixin references B/D variables, not that this helper populates the correct values, so a regression in those mappings (or in the camelCase doublePica conversion) would pass. Add explicit expected assertions for all groups and both properties for at least one representative size.
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
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.
Below is a summary generated by AI that I've edited. Some important context in there around specificity issues.
I'd like reviewers to take a look at the chromatic snapshot diff and see if you can work out an alternative explanation than a 'rendering artifact' for the diff.
Please note that the commit history is a bit messed up because the PR below this one was rebased and I merged it into this one. I tried using the stack feature but didn't realising merging a rebasing should not mix with that feature!
Summary
Batch 1 of the SCSS Modules migration converts Copyright, ReadTime, and InlineLink from Emotion to SCSS Modules.
EmbedError is also migrated because its consumer-owned Emotion override exposed a real styling regression in InlineLink.
The migration and styling guidance has been updated with the lessons from the implementation and review.
Changes
Component migrations
Copyright
p.copyrightselector to override the remaining Emotion colour rule fromText.ReadTime
classNamevalues withclsx..readTimeContainercontext.InlineLink
sizeandfontVariantthrough the shared typography helper into inline--gel-typography-*custom properties.EmbedError
Migrated to SCSS Modules.
Its previous Emotion override changed the link's default colour, underline, and typography.
The override now uses the existing DOM context:
This changes only the default state. InlineLink retains ownership of visited, hover, and focus styles.
Consumer compatibility
css={styles.inlineLink}usage from Disclaimer.send/[id]pages to use a local copy of the former InlineLink Emotion helper in styles.ts.Theme typography
--gel-font-variant-*values.inheritfallback.Guidance and documentation
Updated the component migration skill, webcore conversion skill, service theme skill, and styling standards to cover:
css={...}.data-*selectors for small sets of named variants.style[amp-custom]payload and keeping it below AMP's hard 75 KB limit.Useful Links