Repository navigation
layout: a place's corner is a small bubble peeking past its curve - #578
Merged
Merged
Conversation
#555's corner piece was drawn under the place's content clip, the card inset by its padding: its top and right were cut off, so it read as an inset square with one odd corner. The corner is now a 16 pt round bubble centred halfway round the card's top-right curve, half over the card and half past it, drawn and morphed under the card's own rect (outset by half the bubble), kept inside the window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 8 tasks
foxnne
added a commit
that referenced
this pull request
Oct 19, 2026
) Part of fizzyedit/plans#29 (the liquid edge, step 2 in the comment that revised it). ## What changes Glass can belong to a place and merge with that place's edge. This is the primitive behind controls that come out of a viewport's edge, metaball-like, without crossing it. - **`LiquidField.edge`**: a place's outline, its rect and corner radii (rounded or square). The outside of the place is one more shape in the field. A shape near the outline runs into it through the field's smooth minimum, so it joins the edge by a neck. The outline then cuts the glass's coverage, so none of it crosses. - **No rim along the cut.** The lens, the rim and the light are worked out from the joined shape, not the cut one, so where the glass meets the edge it reads as carrying on past it. - **Never drawn on its own.** The edge's surface starts 1px outside the outline (`EDGE_GAP`), so nothing shows along the edge, only the necks where shapes come near it. - **Computed only near the shapes.** Each quad is still only its group's shapes, grown by half the merge width (as far as a neck can reach) and clipped to the place, so no draw covers the whole place. - **No new uniforms.** The edge takes the program's last shape slot, flagged 2 where a shape's round flag goes. Plugins packing with an older `LiquidField` never set it. A field with an edge holds one shape fewer. - **`glassBubbles(..., .{ .edge = ... })`** passes it on. Without the glass program, the bubbles are cut to the edge's rect. - **`LiquidField.sample`**, the CPU mirror, does the same, line for line with the HLSL. The compiled forms (SPIR-V, DXIL, Metal, GLSL) come from CI's `Shaders` job and are committed in a second commit here. ## SDK impact - [ ] None - [x] Core-only or additive: reaches plugins at the next SDK release - [ ] Fingerprint moved: recorded in `sdk/src/version.zig`, `sdk_version` untouched, PR labelled `sdk` - [ ] SDK release: bumps `sdk_version`, lists the `sdk` PRs since the last `sdk-v*` tag ## Verified - [x] macOS: - `zig build`, `zig build check-web`, `zig build test-sdk-version` all pass. - `zig build test`: 109/109 steps. - `zig build test-integration`: 78/78 steps, 609/609 tests, including a new test against `LiquidField.sample`: a drop near the edge joins it by a neck; there's no glass along the edge away from it; a drop pushed past the edge is cut there, round a curved corner too; and a field with an edge holds one shape fewer. - Not yet seen on screen: needs the compiled shaders, next commit. - [ ] Windows: - [ ] Linux: - [ ] Web: `check-web` only ## Follow-ups - The arrange corner on it: the next PR, stacked on this one and #578. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of fizzyedit/plans#27 (the corner). Follows #555.
What changes
The corner #555 put on every filled place looked wrong on
main(seen by the user): "doesn't look like a bubble filling the top right corner, it's got sharp edges, doesn't cover the corner area, and has a weird single corner cut".The cause:
cornerButtonruns inside the place's content clip, the card inset by its padding (8 pt). The resting piece and its morph into the button were drawn under that clip, so their top and right 8 pt were cut off. The piece sat inset from the card's edge, and its outer curve, the card's own, never showed. The ring beside it already drew under the card's rect (clipSet(rs.r)) for the same reason. #555's screenshot showed the cut, and it was misread as the shape.The corner is now what the user asked for after seeing the options: a small round bubble that "moves behind/under the region's rounded corner, peeking out".
CornerPiece.hit). The finger's target is unchanged: 44 pt, centred on the card's outer corner.Prototype by the session working on the history transport (it measured the clip), taken over, checked and finished here.
SDK impact
sdk/src/version.zig,sdk_versionuntouched, PR labelledsdksdk_version, lists thesdkPRs since the lastsdk-v*tagVerified
scripts/check-fmt.sh,zig build,zig build check-weball pass.zig build test: 107/107 steps.zig build test-integration: 54/54 steps, 605/605 tests.--profile, captured):corner_roundness = 0: the bubble whole, centred on the square corner at the window's edge;restingis false there); and the 44 pt touch target.check-webonlyFollow-ups
dvui.pointerKind()once core: tabs show the hand, and a tapped item is left unlit #563 merges (it already has a follow-up note on layout: a place's corner is glass, and turns into its button #555).🤖 Generated with Claude Code