fix(canvas): give the Add card picker a backdrop scrim (#872) - #885
Merged
Conversation
cmdk puts Command.Dialog's className on the cmdk root, so nothing was styling the Radix overlay and the canvas behind the picker stayed at full contrast. Route the scrim through overlayClassName with the same bg-black/50 the command palette uses.
|
Deployment failed with the following error: Learn More: https://vercel.com/kaan94karaca-5848s-projects?upgradeToPro=build-rate-limit |
h4yfans
marked this pull request as ready for review
July 22, 2026 20:38
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Fixes #872 — the canvas Add card picker rendered without a dimmed backdrop, so the canvas behind it stayed at full contrast and the dialog read as floating rather than modal.
Root cause: cmdk 1.1.1's
Command.DialogspreadsclassNameonto the cmdk root (insideDialog.Content) and routes the Radix parts through separateoverlayClassName/contentClassNameprops — confirmed in the shipped bundle:So the overlay was rendering with an empty
classNameand nothing was styling it. The dialog was already functionally modal via Radix; this was purely visual.The fix routes the scrim through
overlayClassNamewith the samebg-black/50the command palette uses. Positioning and DOM structure are untouched — Radix renders Overlay before Content, so the panel still paints above it.Also on this branch:
[cmdk-overlay]carries the scrim class.apps/docs/src/user-guide/canvas/cards-and-links.md(the docs gate flagged the file): the picker opens over a dimmed canvas, Esc or outside-click dismisses. Both are existing Radix defaults, not new behavior.Release note
The canvas "Add card" picker now dims the canvas behind it, matching the search palette.
Test plan
vitest --project renderer canvas-add-card-dialog.test.tsx→ PASS 12 / FAIL 0 (new test failed first withexpected '' to contain 'bg-black/50')pnpm --filter @memry/desktop typecheck:web→ cleaneslinton both touched files → only pre-existingset-state-in-effectwarnings on the untouched effects (lines 49–53, 65–68)prettier --check→ cleanpnpm docs:impact --base origin/main --strict→coveredpnpm docs:build→ completeNot manually verified in the running app — the change is one Tailwind class on the Radix overlay, covered by the DOM assertion.