fix(gooey): eliminate box-shadow artifacts and synchronize satellite expansion - #11
Open
dqev wants to merge 1 commit into
Open
fix(gooey): eliminate box-shadow artifacts and synchronize satellite expansion#11dqev wants to merge 1 commit into
dqev wants to merge 1 commit into
Conversation
…ansion 1. Fix box-shadow drop box artifact behind Gooey component: Route shadow layers through SVG filter primitives on the liquid silhouette instead of CSS drop-shadow on the root <svg> element, and strip outer dark drop shadows to eliminate rectangular shadow halos. 2. Synchronize expandable PlusMenu satellites: Change openStagger default from 40ms to 0ms so satellite buttons expand in 100% perfect synchronization without delay offsets.
There was a problem hiding this comment.
🟡 Changes recommended
There’s a functional/light-theme shadow regression in the Studio preset plus several now-inaccurate/outdated in-code explanations that need to be corrected to match the new rendering approach.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the liquid-gooey rendering pipeline and demo presets to remove rectangular drop-shadow artifacts from the SVG container and to make PlusMenu satellite expansion fully synchronized.
Changes:
- Remove CSS
filter: drop-shadow(...)usage on the Gooey SVG container and route shadow rendering through SVG filter primitives. - Simplify/strip outer shadow layers from the studio + playground shadow presets.
- Set PlusMenu
openStaggerdefaults to0so satellites expand simultaneously.
File summaries
| File | Description |
|---|---|
sites/home/src/studio/gooey.tsx |
Updates studio shadow preset and morph defaults (stagger). |
sites/gooey/playground/theme.ts |
Adjusts playground shadow presets to remove outer shadows. |
sites/gooey/playground/demos/PlusMenu.tsx |
Changes PlusMenu default openStagger to 0. |
packages/liquid-gooey/src/Gooey.tsx |
Removes CSS drop-shadow pipeline and keeps shadows inside the SVG filter path. |
Review details
Suppressed comments (1)
packages/liquid-gooey/src/Gooey.tsx:160
- The CSS
filterstyle was removed from this , butwillChangestill includesfilter. KeepingfilterinwillChangecan force extra compositor resources/tiles without benefit, and the adjacent comment implies a CSS filter promotion that no longer exists on this element.
// Promote the filtered layer: WebKit otherwise repaints the goo a
// frame or two behind the plain-DOM content.
willChange: 'filter, transform',
- Files reviewed: 4/4 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
25
to
28
| light: { | ||
| 'Figma soft': | ||
| '0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.05), 0 4px 42px rgba(0, 0, 0, 0.06)', | ||
| Floating: '0 2px 6px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.18)', | ||
| 'Figma soft': '0 0 0 1px rgba(0, 0, 0, 0.06) inset', | ||
| Floating: '', | ||
| None: '', |
Comment on lines
99
to
+103
| const LIQUID_SHADOW: Record<GooeyTheme, string> = { | ||
| dark: | ||
| "0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 1px 0 0 rgba(255, 255, 255, 0.03) inset, " + | ||
| "0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 6px 0 rgba(0, 0, 0, 0.05), 0 4px 42px 0 rgba(0, 0, 0, 0.24)", | ||
| "0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 1px 0 0 rgba(255, 255, 255, 0.03) inset", | ||
| light: | ||
| "0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.05), 0 4px 42px rgba(0, 0, 0, 0.06)", | ||
| "", |
Comment on lines
127
to
129
| // 5-25% alphas shadows use, that cross-term is under 1% alpha, invisible. | ||
| // The filter pad also shrinks to what the REMAINING svg layers reach, | ||
| // which cuts the rasterised area again. |
Comment on lines
19
to
23
| /** Light keeps the prototype's Figma elevation. Dark is the Logram dropdown | ||
| * spec (Figma 2572:83262), verbatim and in the design's layer order: two | ||
| * light inset layers (inner hairline + top highlight), then the black outer | ||
| * chain — rendered on the merged liquid silhouette by the engine's inset | ||
| * support. */ |
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.
Summary of Changes
1. Eliminate Box-Shadow / Drop-Box Artifacts behind Gooey Components
filter: drop-shadow(...)on the root<svg>container element. Because the<svg>container occupies full element dimensions, browser rendering engines (Chromium & WebKit) cast a drop-shadow of the SVG filter's rectangular raster bounding box, producing an unsightly dark rectangular box-shadow halo behind the liquid element.Gooey.tsxso all shadow layers are routed directly into SVG filter primitives (<ShadowPass>and<InsetPass>) rendered on the liquid silhouetteshape.cssShadowFilterfrom the root<svg>style.LIQUID_SHADOWandSHADOWSdefinitions while preserving inner highlights/hairlines.2. Synchronize Expandable PlusMenu Satellites
MorphDemo/PlusMenu,openStaggerwas set to40ms, causingdelay={i * phase.stagger}to delay satellite 1 by 40ms and satellite 2 by 80ms. On expansion, satellite 0 popped out immediately while satellites 1 and 2 lagged behind, appearing out of sync.openStaggerdefault from40to0inMORPH_DEFAULTS(studio/gooey.tsx) andDEFAULTS(PlusMenu.tsx). All satellite buttons now expand simultaneously in 100% perfect synchronization.Verification
@sites/homeandliquid-gooeypackage cleanly.