feat(font): update inter asset version#4681
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughStorybook and shared font styles now preload and reference InterVariable assets at version 1.0.18-beta.5. The SCSS font-face declarations also narrow the declared weight range to 450–600. ChangesInter Font Update
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3305b79 to
679dbc5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/elements/common/fonts.scss`:
- Around line 23-35: The InterVariable font-face definitions currently only
cover the 450–600 range, but `body.is-inter-font` still requests 400 and 700
weights from `src/styles/common/_typography.scss`, so those styles will fall
back to the system font. Update the `@font-face` blocks in `fonts.scss` to
include the full themed weight range used by the typography styles, or adjust
the themed weight values to stay within the declared InterVariable range, making
sure headings and bold text map to matching weights.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c636f0c1-a0e6-42ae-8f96-4613538f3be1
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
.storybook/preview-head.htmlsrc/elements/common/fonts.scss
| @font-face { | ||
| font-weight: 100 900; | ||
| font-weight: 450 600; | ||
| font-family: InterVariable; | ||
| font-style: normal; | ||
| src: url('https://cdn01.boxcdn.net/fonts/1.0.18-beta.4/inter/InterVariable.woff2') format('woff2'); | ||
| src: url('https://cdn01.boxcdn.net/fonts/1.0.18-beta.5/inter/InterVariable.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-weight: 100 900; | ||
| font-weight: 450 600; | ||
| font-family: InterVariable; | ||
| font-style: italic; | ||
| src: url('https://cdn01.boxcdn.net/fonts/1.0.18-beta.4/inter/InterVariable-Italic.woff2') format('woff2'); | ||
| src: url('https://cdn01.boxcdn.net/fonts/1.0.18-beta.5/inter/InterVariable-Italic.woff2') format('woff2'); | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for font-weight declarations that fall outside the 450-600 range,
# which would no longer match the updated InterVariable `@font-face`.
# Look for common font-weight values (400, 700, etc.) in SCSS files
rg -n --type=scss 'font-weight:\s*(400|700|normal|bold|100|200|300|800|900)' src/ --glob '!**/node_modules/**'Repository: box/box-ui-elements
Length of output: 186
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== files ==\n'
git ls-files 'src/elements/common/fonts.scss' 'src/styles/mixins/_typography.scss' 'src/' | sed -n '1,120p'
printf '\n== fonts.scss ==\n'
cat -n src/elements/common/fonts.scss
printf '\n== typography mixin ==\n'
cat -n src/styles/mixins/_typography.scss
printf '\n== InterVariable refs ==\n'
rg -n 'InterVariable|is-inter-font|font-weight' src/ --glob '!**/node_modules/**'Repository: box/box-ui-elements
Length of output: 18902
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== files ==\n'
git ls-files 'src/elements/common/fonts.scss' 'src/styles/mixins/_typography.scss' | sed -n '1,120p'
printf '\n== fonts.scss ==\n'
cat -n src/elements/common/fonts.scss
printf '\n== typography mixin ==\n'
cat -n src/styles/mixins/_typography.scss
printf '\n== InterVariable refs ==\n'
rg -n 'InterVariable|is-inter-font|font-weight' src/ --glob '!**/node_modules/**'Repository: box/box-ui-elements
Length of output: 14961
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== fonts.scss ==\n'
cat -n src/elements/common/fonts.scss
printf '\n== typography mixin ==\n'
cat -n src/styles/mixins/_typography.scss
printf '\n== InterVariable refs ==\n'
rg -n 'InterVariable|is-inter-font|font-weight' src/ --glob '!**/node_modules/**'Repository: box/box-ui-elements
Length of output: 14882
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== src/styles/common/_typography.scss ==\n'
cat -n src/styles/common/_typography.scss
printf '\n== body.is-inter-font selectors ==\n'
rg -n 'body\.is-inter-font|font-weights' src/styles src/elements src/components src/features --glob '!**/node_modules/**'Repository: box/box-ui-elements
Length of output: 3685
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== font weight tokens ==\n'
rg -n --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
--fixed-strings -- '--font-weights-' src/
printf '\n== font-weight declarations in inter-font paths ==\n'
rg -n --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
'body\.is-inter-font|font-weight:\s*(normal|bold|[0-9]+|var\(--font-weights-[^)]+\))' \
src/styles src/elements src/components src/featuresRepository: box/box-ui-elements
Length of output: 8876
Widen the InterVariable weight range or update the themed weights. body.is-inter-font still renders headings and bold text at 400/700 in src/styles/common/_typography.scss, so font-weight: 450 600 will miss those requests and fall back to the system stack.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/elements/common/fonts.scss` around lines 23 - 35, The InterVariable
font-face definitions currently only cover the 450–600 range, but
`body.is-inter-font` still requests 400 and 700 weights from
`src/styles/common/_typography.scss`, so those styles will fall back to the
system font. Update the `@font-face` blocks in `fonts.scss` to include the full
themed weight range used by the typography styles, or adjust the themed weight
values to stay within the declared InterVariable range, making sure headings and
bold text map to matching weights.
Merge Queue Status
This pull request spent 10 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
Summary by CodeRabbit