Repository navigation
Studio: clip every rounded scroller in Firefox, dropping the overflow watcher - #12438
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
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". |
… watcher Dialogs took the Firefox clip only while lib/scroll-overflow.ts flagged them as overflowing, to spare their light-mode shadow when nothing scrolls. That is two observers on every open dialog, plus ref plumbing through DialogContent and AlertDialogContent, for a faint shadow on a dimmed backdrop. Drop the watcher and clip every .scroll-rounded box in Firefox, dialogs included, as the utility first did. The recipe preview's error panel keeps its inner viewport.
563db37 to
346a082
Compare
|
@codex review |
DialogContent carries .scroll-rounded, so every CommandDialog took the Firefox clip-path too, and it cut chat search's outer shadow. Chat search is borderless, ring-0 and over a clear overlay, so that shadow is its only edge against the page. CommandDialog hides its overflow and scrolls the list inside, so it has no scrollbar to clip. Skip .overflow-hidden boxes in the Firefox rule. Boxes that scroll themselves are clipped as before.
|
@codex review |
The processors, import, config and run dialogs float over the recipe canvas on a clear overlay, with shadow-border as their edge. They scrolled their own DialogContent, so Firefox's .scroll-rounded clip cut that shadow even when nothing overflowed. Move their shared setup into RecipeDialogContent: the shadowed box hides its overflow and stays out of the clip, and an inner scroll-rounded viewport carries the padding and the scrolling. Layout is unchanged; the close button now stays put while the content scrolls.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 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". |
… watcher (unslothai#12438) * Studio: clip every rounded scroller in Firefox, dropping the overflow watcher Dialogs took the Firefox clip only while lib/scroll-overflow.ts flagged them as overflowing, to spare their light-mode shadow when nothing scrolls. That is two observers on every open dialog, plus ref plumbing through DialogContent and AlertDialogContent, for a faint shadow on a dimmed backdrop. Drop the watcher and clip every .scroll-rounded box in Firefox, dialogs included, as the utility first did. The recipe preview's error panel keeps its inner viewport. * Studio: keep chat search's shadow out of the Firefox scroller clip DialogContent carries .scroll-rounded, so every CommandDialog took the Firefox clip-path too, and it cut chat search's outer shadow. Chat search is borderless, ring-0 and over a clear overlay, so that shadow is its only edge against the page. CommandDialog hides its overflow and scrolls the list inside, so it has no scrollbar to clip. Skip .overflow-hidden boxes in the Firefox rule. Boxes that scroll themselves are clipped as before. * Studio: scroll the recipe dialogs in an inner viewport The processors, import, config and run dialogs float over the recipe canvas on a clear overlay, with shadow-border as their edge. They scrolled their own DialogContent, so Firefox's .scroll-rounded clip cut that shadow even when nothing overflowed. Move their shared setup into RecipeDialogContent: the shadowed box hides its overflow and stays out of the clip, and an inner scroll-rounded viewport carries the padding and the scrolling. Layout is unchanged; the close button now stays put while the content scrolls. --------- Co-authored-by: Unsloth <[email protected]>
Summary
Follow-up to #12431, now on main. This drops the Firefox overflow watcher (
lib/scroll-overflow.ts) and clips every.scroll-roundedbox in Firefox, dialogs included, as the utility first did.Why
The watcher clips a dialog only while it scrolls, to spare its light-mode shadow the rest of the time. That costs two observers on every open dialog and ref plumbing through
DialogContentandAlertDialogContent, all for a faint0 2px 8pxshadow on a dimmed backdrop.Changes
lib/scroll-overflow.tsand its use inDialogContentandAlertDialogContent..scroll-roundedbox, except those withoverflow-hidden: they have no scrollbar to clip. That keepsCommandDialog, which scrolls its list inside, out of the clip, so chat search keeps the shadow that is its only edge (it is borderless,ring-0, over a clear overlay).shadow-bordersurvives.shadow-borderas their edge. They now shareRecipeDialogContent: the shadowed box hides its overflow and stays out of the clip, and an innerscroll-roundedviewport scrolls. Their layout is unchanged; the close button now stays put while the content scrolls.Trade-offs
rounded-4xl, such as a phone-widthmax-sm:rounded-none!dialog, is clipped a little rounder than it draws in Firefox. Studio: clip a scrolling dialog to the radius it draws, in Firefox only #12437 fixes that by reading the computed radius.#12437, which tightened the watcher instead, was merged into #12431's branch after #12431 had already landed, so its changes never reached main. This PR removes the watcher it changed.
Testing
npm run typecheckis clean,npm testpasses (9726 tests), and the build succeeds.clip-path: inset(-1px round 34.6px)and lost its shadow. It now has no clip and keeps it, and a scrolling.scroll-rounded rounded-4xlbox is still clipped at 34.6px.clip-path: inset(-1px round 34.6px)without overflowing and lost itsshadow-border. It now has no clip and keeps it, at the same size. With 2000px of extra content it caps at 650px and the inner viewport scrolls.