fix(apollo-react): clip loop node matte to remove corner gaps#816
Open
SreedharAvvari wants to merge 1 commit into
Open
fix(apollo-react): clip loop node matte to remove corner gaps#816SreedharAvvari wants to merge 1 commit into
SreedharAvvari wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
Fixes a visual rendering artifact in LoopNode where the surface-overlay matte (previously drawn via a small box-shadow spread) didn’t match the card’s inner radius, causing canvas “gaps” at corners and a wedge under the header.
Changes:
- Adds an absolute, rounded, overflow-hidden clip layer matching the card’s inner edge, and moves
Header+BodyFrameinside it. - Increases the matte box-shadow spread on
BodyFrame(10px → 200px) so the clip layer, not the shadow geometry, defines the final matte silhouette. - Ensures header content paints above the enlarged matte by adding
relative z-10to the header container.
The loop node draws its surface-overlay "matte" frame with a box-shadow spread on the dashed drop-zone. A box-shadow's corner radius is frameRadius + spread, which never matched the container's inner border radius (rounded-[20px] minus the 1px border = 19px), so the canvas showed through as gaps at the card's bottom corners and a wedge at the body frame's top corners just below the header. Wrap the header and body frame in an `overflow-hidden rounded-[19px]` clip layer and enlarge the matte's box-shadow spread (10px -> 200px) so it overflows everywhere and is trimmed to the card's exact inner rounded edge. The header gets `relative z-10` (with `isolate` on the wrapper) so its content paints above the larger matte shadow. The dashed frame and header keep their original radii; the matte now hugs the border at every corner with no gaps or wedge.
633d5ec to
8bbb253
Compare
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.
Before / After
Validation overlay: matte (surface-overlay) → magenta, canvas/any gap → green, card border → gray.
Body-frame top corner wedge under the header (Issue 1):
Problem
The Loop node draws its surface-overlay "matte" (the solid frame around the dashed drop zone) with a
box-shadowspread on the dashed frame. A box-shadow's corner radius isframeRadius + spread, which never matched the container's inner border radius (rounded-[20px]− 1px border = 19px). So the dotted canvas showed through as:12 + 10 = 22) is rounder than the card, so it falls short.Radius-only tweaks can't fix both: the bottom needs a concentric radius while the top needs to be square — and squaring the dashed frame's top corners is itself a visible regression.
Fix
Let a clip define the matte's outer shape instead of the box-shadow's geometry:
Header+BodyFramein anabsolute inset-0 isolate overflow-hidden rounded-[19px]clip layer (an exact copy of the card's inner edge).box-shadowspread10px → 200pxso it overflows past the card edge everywhere; the clip trims it to the exact rounded shape.rounded-xl.Headergetsrelative z-10so its content paints above the larger matte shadow.Net: the matte hugs the card's rounded edge at every corner with zero changes to the visible radii (
rounded-t-[18px],rounded-xlunchanged).Validation (Playwright)
border → mattewith no canvas between. Clean.lintpasses. Diff is purely structural (16 insertions / 14 deletions).Test plan
Apollo React / Canvas / Components / Nodes / LoopNode→ Default, and the nested/many-children stories