Repository navigation
Studio Agents tab: use text-ui-* tokens instead of raw px text sizes - #7464
Closed
danielhanchen wants to merge 1 commit into
Closed
danielhanchen wants to merge 1 commit into
danielhanchen wants to merge 1 commit into
Conversation
tests/studio/test_ui_font_scale_contract.py::test_no_raw_pixel_text_utilities
is failing on main, so Repo tests (CPU) is red on every open PR:
Raw px text utilities ignore the UI font size preference; use the
text-ui-* / leading-ui-* tokens in index.css instead:
['features/settings/tabs/agents-tab.tsx: text-[11px]',
'features/settings/tabs/agents-tab.tsx: text-[10px]',
'features/settings/tabs/agents-tab.tsx: text-[10px]']
The Agents settings tab landed with three raw pixel text utilities. They
ignore the Settings > Appearance UI font size preference, which is exactly
what the contract guards.
Swap them for the equivalent scaled tokens, same as the voice tab did:
text-[11px] -> text-ui-11 (0.6875rem) and text-[10px] -> text-ui-10
(0.625rem). Both resolve to the current pixel size at scale 1, so the
default rendering is unchanged and the text now follows the preference.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Member
Author
|
Duplicate of #7462, which has the identical diff and landed first. Continuing there. |
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.
Problem
Backend CI / Repo tests (CPU)is red onmainfor a second reason, on top of the ROCm routing errors that #7461 fixes:The Agents settings tab added in #7303 carries three raw pixel text utilities. Raw
text-[Npx]bypasses the--ui-font-scaletokens, so that text ignores the Settings > Appearance UI font size preference, which is exactly what the contract guards against.Fix
Swap them for the equivalent scaled tokens, the same treatment the voice tab got in #7378:
text-[11px]->text-ui-11(calc(0.6875rem * var(--ui-font-scale, 1)))text-[10px]->text-ui-10(calc(0.625rem * var(--ui-font-scale, 1)))Both resolve to the current pixel size at scale 1, so the default rendering is byte-for-byte the same size and the text now follows the preference when it is changed.
Verification
pytest tests/studio/test_ui_font_scale_contract.py -q->11 passed(was1 failed, 10 passed).