Skip to content

feat(font): update inter asset version#4681

Merged
mergify[bot] merged 1 commit into
box:masterfrom
tjiang-box:update-inter-asset-version
Jul 8, 2026
Merged

feat(font): update inter asset version#4681
mergify[bot] merged 1 commit into
box:masterfrom
tjiang-box:update-inter-asset-version

Conversation

@tjiang-box

@tjiang-box tjiang-box commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Style
    • Updated both the app and Storybook to load the newest Inter variable font assets (including normal and italic).
    • Refined Inter variable font configuration so supported normal and italic weights use a narrower range for more consistent typography rendering.

@tjiang-box tjiang-box requested a review from a team as a code owner July 8, 2026 22:03
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: edcfeee2-776f-461a-a13d-805fd36e33aa

📥 Commits

Reviewing files that changed from the base of the PR and between 3305b79 and 679dbc5.

📒 Files selected for processing (2)
  • .storybook/preview-head.html
  • src/elements/common/fonts.scss
✅ Files skipped from review due to trivial changes (1)
  • .storybook/preview-head.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/elements/common/fonts.scss

Walkthrough

Storybook 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.

Changes

Inter Font Update

Layer / File(s) Summary
Font version bump and weight range constraint
.storybook/preview-head.html, src/elements/common/fonts.scss
Preload URLs and @font-face sources now point to 1.0.18-beta.5; the InterVariable weight range is changed to 450 600 for normal and italic faces.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: jfox-box

Poem

I nibble a carrot, then hop with glee,
Beta five fonts now load so free.
Wide weights trimmed to a cozy span,
Inter sings soft, just as it can.
🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the font asset version update.
Description check ✅ Passed The description matches the repository template content and includes the required merge-queue guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tjiang-box tjiang-box force-pushed the update-inter-asset-version branch from 3305b79 to 679dbc5 Compare July 8, 2026 22:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4ff32c3 and 3305b79.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • .storybook/preview-head.html
  • src/elements/common/fonts.scss

Comment on lines 23 to 35
@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');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 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/features

Repository: 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.

@mergify

mergify Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-08 22:21 UTC · Rule: Automatic ui-elements merge · triggered by rule Automatic merge queue
  • Checks skipped · PR is already up-to-date
  • Merged2026-07-08 22:21 UTC · at 679dbc55dc29e4deb98c9f957488effa230d2434 · squash

This pull request spent 10 seconds in the queue, including 2 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub branch protection]
  • github-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Summary
    • check-neutral = Summary
    • check-skipped = Summary
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_test_build
    • check-neutral = lint_test_build
    • check-skipped = lint_test_build
  • any of [🛡 GitHub branch protection]:
    • check-success = license/cla
    • check-neutral = license/cla
    • check-skipped = license/cla
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_pull_request
    • check-neutral = lint_pull_request
    • check-skipped = lint_pull_request

@mergify mergify Bot merged commit e75b81a into box:master Jul 8, 2026
10 of 11 checks passed
@mergify mergify Bot removed the queued label Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants