Skip to content

Studio: even 17px spacing in the Hub filter popover - #13972

Merged
shimmyshimmer merged 4 commits into
mainfrom
studio-hub-filter-rhythm
Oct 16, 2026
Merged

shimmyshimmer merged 4 commits into
mainfrom
studio-hub-filter-rhythm

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What changed

The Hub filter popover (Discover > Filters) had uneven spacing that got worse when zooming, and the divider above Reset all was wider than everything else in the popover.

  • Divider width: the line above Reset all is now inset like the option tiles and rows (mx-3), instead of only by the popover's padding. Before, it sat 13px from the edge while the content sat 21px in.
  • One gap everywhere: every gap is 17px, scaled with the UI zoom. That covers the popover top to the first title, between Capabilities, Parameters, Context length, Uploader and Datasets only, down to the divider, and above and below Reset all. The leftover pixel offsets (calc(5px*...), calc(7px*...)), the empty spacer divs and the mixed pt-2/pb-1.5/pb-0.5/gap-2.5/gap-3 are replaced by one flex column with gap-4.25.
  • Gaps measure to the text: section titles and the Reset all label use leading-[1.25] (Inter's text box), so a gap ends at the glyphs, not at line-height padding.
  • Reset all: "Reset all" has no descenders, so its letters sit 0.25em inside its text box. The button is pulled in by -my-[0.25em], which makes both the divider-to-letters and letters-to-edge gaps measure 17px (16.97 and 17.08 at 100%, 21.46 and 21.11 at 125%).
  • Sliders: the range sliders end at the thumb's edge. The thumb is a fixed 12px inside a scaled h-4 root, so the gap below a slider used to come out about 2px larger than the rest.
  • Labels: the Uploader and Datasets only labels are vertically centred against their controls.
  • Datasets view: Modalities and Size (rows) follow the same spacing.

Measurements

Measured with getBoundingClientRect in an isolated Studio, at 100% UI zoom (CSS px):

Gap Before After
Popover top to Capabilities 17 17
Capabilities to Parameters 23 17
Parameters to Context length 25 17
Context length to Uploader 25 17
Uploader to Datasets only 12 17
Datasets only to divider 15 17
Divider to Reset all 10.5 17
Reset all to popover bottom 15.5 17
Divider inset (content inset is 21) 13 21

At in-app zoom 67%, 80%, 90%, 110%, 125% and 150% (each at device pixel ratio 1, 1.25 and 2), the gaps scale together: for example 13.6 at 80% and 21.25 at 125%. The divider inset matches the tiles at every level.

Models view at 100% zoom, merge base (left) vs this branch (right):

Filter popover before and after

Datasets view with the same spacing:

Datasets filter popover

Verification

  • npm run typecheck, npm test (12475 pass) and npm run build in studio/frontend. biome check on the file reports only the two existing useSemanticElements notes on untouched lines.
  • Two source tests that pinned the old markup (hub-uploader-filter.test.ts, hub-capability-split.test.ts) now pin the inset divider and the flattened range list.
  • An isolated Studio built from this branch, driven with Playwright: the popover was opened in both the models and datasets views, gaps were measured at every zoom level above, and before/after screenshots were taken against the merge base.

Not tested here

  • Fonts other than the default Inter: with a custom Appearance font, gaps measured to text can be off by about 1px, because leading-[1.25] is tuned to Inter.
  • Desktop (Tauri) webviews were not run on this host; the change is CSS-only and the layout is the same as in the browser.

shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 16, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 16, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T07:09:39.909806Z ca7f429 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 68f62c7976

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: ca7f429ed5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

@shimmyshimmer
shimmyshimmer merged commit c401482 into main Oct 16, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-hub-filter-rhythm branch October 16, 2026 09:00
danielhanchen added a commit that referenced this pull request Oct 16, 2026
…13991)

## Summary

`Frontend build + bundle sanity` is red on main again. #13969 merged
with it red, and its run reported `over the startup budget: transfer
1995.0 KB > 1994.7 KB, raw 6633.8 KB > 6632.7 KB`. Main at 6106de9
measures 6,796,799 B raw / 2,044,202 B transfer, against limits of
6,792,425 / 2,042,777.

Measured commit by commit (one machine and build, Node 24, 95 chunks
throughout, `rm -rf dist` before each build):

| commit | raw B | transfer B |
|---|---|---|
| 1790106 (#13983, last raise from me) | 6,791,768 | 2,042,404 |
| 7d33eff (#13965) | 6,792,034 | 2,042,515 |
| cc0cb59 (#13966) | 6,792,447 | 2,042,693 |
| 7bee02d (#13969) | 6,793,737 | 2,043,138 |
| ce83dee (#13973) | 6,796,298 | 2,044,201 |
| 6106de9 (main, after #13974, #13972, #13951, #13945) | 6,796,799 |
2,044,202 |

The two largest steps:
- Inline chat markdown tables with hover controls and the expand dialog
(#13973): +2,561 B raw / +1,063 B transfer, in the eager chat chunk.
- Latest Unsloth Models ranking (#13969): +1,290 B raw / +445 B
transfer.

#13945 already raised the budget for its own 497 B.

## Change

The budget is set to the measured build plus the margin main had at
1790106 (160 B raw, 189 B transfer), with the per-commit numbers
recorded beside the limits as in the earlier raises. If #13973's expand
dialog should be lazy-loaded instead, that is a follow-up for its owner.
This only gets main and every open PR off a red that none of them
caused.

## Testing

- `npm run build && npm run bundle:check` on main with this change:
within budget (0.2 KB transfer, 0.2 KB raw to spare). Without it: over
by 4,374 B raw / 1,425 B transfer.
- `tests/bundle-budget-cli.test.ts` and
`tests/bundle-budget-closure.test.ts`: 43 passed.
- `prettier --check scripts/check-bundle-budget.ts`: clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant