fix: anchor CMDK dialog to top edge#373
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8cf74652f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adjusts the dashboard command palette (CMDK) dialog positioning so it’s anchored near the top of the viewport (instead of vertically centered), preventing vertical “jumping” as the results list grows/shrinks while keeping the shared DialogContent centering behavior unchanged.
Changes:
- Overrides
DialogContentpositioning forCommandDialogto use a fixedtopoffset and remove vertical centering translate.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
CommandDialog; sharedDialogContentmodals remain centered.Why
The CMDK menu was inheriting the shared dialog centering styles (
top: 50%plus vertical translate). As search results changed the menu height, the center point stayed fixed, causing the whole menu to jump vertically. The command menu now overrides that vertical placement with a fixed upper-center top edge so only the bottom edge expands or contracts.Before / After