Skip to content

Fix virtual scrolling MenuList font family dropdowns shrinking when wider content is unmounted#3987

Merged
Keavon merged 5 commits intomasterfrom
font-dropdown-consistent-width
Apr 3, 2026
Merged

Fix virtual scrolling MenuList font family dropdowns shrinking when wider content is unmounted#3987
Keavon merged 5 commits intomasterfrom
font-dropdown-consistent-width

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented Apr 2, 2026

Fixes #3592

@Keavon Keavon changed the title Fix virtual scrolling MenuList font dropdowns shrinking when wider content goes away Fix virtual scrolling MenuList font family dropdowns shrinking when wider content goes away Apr 2, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a ResizeObserver to the MenuList component to ensure that virtual scrolling menus only grow and do not shrink while open. The implementation includes logic to track the maximum scroll width and apply it as a min-width to the menu content. Feedback was provided regarding a potential race condition in the asynchronous startMenuWidthObserver function, which could lead to observers being created after a component is closed, and a potential resource leak if existing observers are not disconnected before new ones are initialized.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) April 2, 2026 14:20 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) April 2, 2026 14:25 Inactive
@Keavon Keavon changed the title Fix virtual scrolling MenuList font family dropdowns shrinking when wider content goes away Fix virtual scrolling MenuList font family dropdowns shrinking when wider content in unmounted Apr 3, 2026
@Keavon Keavon changed the title Fix virtual scrolling MenuList font family dropdowns shrinking when wider content in unmounted Fix virtual scrolling MenuList font family dropdowns shrinking when wider content is unmounted Apr 3, 2026
@Keavon Keavon force-pushed the font-dropdown-consistent-width branch from 95fbb87 to c7ec00e Compare April 3, 2026 01:18
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) April 3, 2026 01:46 Inactive
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/build.yml">

<violation number="1" location=".github/workflows/build.yml:165">
P2: Preview/manual deployments can be recorded against the wrong ref because `inputs.checkout_ref` is no longer considered when setting `REF`.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Keavon Keavon merged commit 5edb00b into master Apr 3, 2026
10 checks passed
@Keavon Keavon deleted the font-dropdown-consistent-width branch April 3, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font catalog shouldn't change width while scrolling through it

1 participant