Skip to content

fix: anchor CMDK dialog to top edge#373

Merged
huv1k merged 2 commits into
mainfrom
cmdk-menu-should-anchor-to-top-edge-only-height-should-eng-4121
Jun 9, 2026
Merged

fix: anchor CMDK dialog to top edge#373
huv1k merged 2 commits into
mainfrom
cmdk-menu-should-anchor-to-top-edge-only-height-should-eng-4121

Conversation

@huv1k

@huv1k huv1k commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Anchors the dashboard CMDK dialog near the top of the viewport instead of vertically re-centering it.
  • Keeps the change scoped to CommandDialog; shared DialogContent modals 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

Before After
CleanShot 2026-06-09 at 18 50 54 CleanShot 2026-06-09 at 18 51 57

@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

ENG-4121

@cla-bot cla-bot Bot added the cla-signed label Jun 9, 2026
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 9, 2026 5:09pm
web-juliett Ready Ready Preview, Comment Jun 9, 2026 5:09pm

Request Review

@huv1k huv1k changed the title [codex] Fix CMDK dialog top anchoring fix: anchor CMDK dialog to top edge Jun 9, 2026
@huv1k huv1k marked this pull request as ready for review June 9, 2026 16:59
Copilot AI review requested due to automatic review settings June 9, 2026 16:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/ui/primitives/command.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DialogContent positioning for CommandDialog to use a fixed top offset and remove vertical centering translate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ui/primitives/command.tsx Outdated
@huv1k huv1k enabled auto-merge (squash) June 9, 2026 17:10
@huv1k huv1k merged commit cbdbb56 into main Jun 9, 2026
14 checks passed
@huv1k huv1k deleted the cmdk-menu-should-anchor-to-top-edge-only-height-should-eng-4121 branch June 9, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants