Repository navigation
core: toasts are drawn on the window's material - #664
Merged
Merged
Conversation
Every toast fizzy raised went through `dvui.toast`, whose default display is dvui's own label: a plain theme fill whatever the window material (#621, #632) said. The demo's "save or close your changes first" prompt is one of them. `core.dialogs.toast` now raises every toast with `core.dialogs.toastDisplay`, which lays the message on `toastSurface`: the same glass a tooltip or a dialog is (`dialogFrost`: Liquid Glass, frost, blur), or with the blur off (`transparent`, `none`) the plain `dialogFill`, with the floating surfaces' shadow. The update toasts draw on the same surface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
force-pushed
the
core/dialogs-material
branch
from
October 19, 2026 19:59
0de7e02 to
b2edd79
Compare
foxnne
marked this pull request as ready for review
October 19, 2026 19:59
foxnne
enabled auto-merge
October 19, 2026 19:59
foxnne
added a commit
that referenced
this pull request
Oct 19, 2026
This was referenced Oct 19, 2026
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.
What changes
Toasts now use the window material, the same way dialogs, tooltips and menus do. Before this, they ignored the material setting.
Every toast fizzy raised went through
dvui.toast. Its default display is dvui's own label: a capsule in the theme's fill, whatever the material (#621, #632) was set to. The maintainer saw this on the "Save or close your changes first" prompt that opening a tape over unsaved work raises. The same applies to every otherdvui.toastin the app (18 call sites). The two update toasts (app/update/update_notify.zig) painted their own plain capsule as well.core.dialogs.toast(src, opts): raises a toast with fizzy's display in place of dvui's default. A toast that names its owndisplayFnkeeps it. All 18 callers insrc/editor/(Demo, TapeTabs, DocumentIo, Editor, FileTypeSettings, KeptDocuments) andapp/updatenow call it, and none calldvui.toastdirectly.core.dialogs.toastDisplay: draws the message ontoastSurface. It was already in core but unused.core.dialogs.toastSurface(wd, fade)+toastOptions: the surface a toast sits on. It reuses the tooltip's glass routine:dialogFrost(Liquid Glass / frost / blur at the dialog style), or with the blur off (transparent,none) the plaindialogFill, with the floating surfaces' shadow ring. The frost uses the toast's own fade animation as its form, so it fades in with the text. The update toasts draw on it too.This PR does not decide whether the demo's unsaved-work prompt should exist (that is
automation/tape-own-stage). It only changes how the prompt is drawn.SDK impact
core.dialogsfunctions, no boundary change)Verified
macOS: two new tests in
core/dialogs.zig(rooted fromcore/sizing_tests.zig):toastDisplay, and a toast's own display is kept;toastSurfacequeues a frost with the blur on and none with it off.I also ran one quiet sandbox, with an unsaved untitled document, and called
fizzy.demo.tour. The toast appeared as Liquid Glass withwindowMaterial liquid, with the panel header showing blurred through it. Withnoneit was the plain dialog fill with the surface shadow.Windows:
Linux: CI
Gates run locally: check-fmt, build, test, test-integration (81/81 steps), check-web, test-sdk-version, check-tests-reached.
check-webonlyReview (code-review, medium)
Fixed: the toast box now deinits before the animator gives back its size, so a dismissed toast frees its row the same frame. The margin now leaves room for the shadow ring, since dvui's toast window is cut to its content. Left as is: a dylib toast frosts through its own copy of the backdrop, as dylib tooltips already do.
dvui.toastitself still draws dvui's label for any new caller that bypassescore.dialogs.toast. Changing dvui's default display belongs in the fork if we want it.Follow-ups
core.dialogs.saveCompleteToastDisplayandEditor.drawSaveToastshave no caller that adds a toast tosave_toast_subwindow_id, so they are dead code. Left for a separate cleanup.🤖 Generated with Claude Code