Skip to content

Studio: clip a scrolling dialog to the radius it draws, in Firefox only - #12437

Merged
shimmyshimmer merged 1 commit into
studio-dialog-scroll-rounded-cornersfrom
studio-firefox-scroll-clip-radius
Oct 1, 2026
Merged

shimmyshimmer merged 1 commit into
studio-dialog-scroll-rounded-cornersfrom
studio-firefox-scroll-clip-radius

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #12431, based on its branch. In Firefox, lib/scroll-overflow.ts flags a dialog while it scrolls, so .scroll-rounded clips it back to its radius only then. This tightens the watcher.

Changes

  • Firefox only. The watcher ran on every dialog in every browser, though only Firefox's clip reads its flag; Chromium and WebKit inset the track instead. It now starts only where CSS.supports("-moz-appearance", "none").
  • Only an axis that scrolls counts. A dialog whose content overflowed on an axis set to overflow-hidden was flagged, though it draws no scrollbar, and took the clip and lost its shadow. Only auto and scroll count now.
  • The clip follows the radius drawn. The class map reads the base rounded-4xl, which a call site's rounded-3xl! (chat search) or a phone-width max-sm:rounded-none! leaves in place. While flagged, the watcher writes the dialog's computed radius to --scroll-radius.

This and #12438, which drops the watcher altogether, are alternatives: merge one or the other.

Testing

  • npm run typecheck is clean and npm test passes (9700 tests). tests/dialog-scrollbar-corners.test.ts covers the three changes.
  • This build in headed Firefox and Chromium, with always-visible scrollbars, on Edit project:
    • Firefox, short window: flagged and clipped at its own 33.6px radius, and all four corners stay rounded.
    • Firefox, radius overridden to 20px: the clip follows it (21px).
    • Firefox, tall window: the flag and the clip come off once the dialog fits.
    • Chromium: never watched.

The overflow watcher ran on every dialog in every browser, though only
Firefox's clip reads its flag; Chromium and WebKit inset the track. It now
starts only in Firefox.

It flagged a dialog whose content overflowed on an axis that does not scroll,
such as a call site's overflow-hidden, which draws no scrollbar but would still
have been clipped. Only an axis set to auto or scroll counts now.

The clip took its radius from the class map, which reads the base rounded-4xl
that a call site's rounded-3xl! (chat search) or a phone-width
max-sm:rounded-none! leaves in place. While flagged, the watcher writes the
radius the dialog actually draws to --scroll-radius.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-01T13:48:48.048691Z 5ee6fb4 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. Delightful!

Reviewed commit: 5ee6fb4d6e

ℹ️ 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 fb016e7 into studio-dialog-scroll-rounded-corners Oct 1, 2026
1 of 42 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-firefox-scroll-clip-radius branch October 1, 2026 15:00
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