Skip to content

[BUGFIX] Fix panel links menu not opening inside the overflow menu - #255

Open
melihgurlek wants to merge 2 commits into
perses:mainfrom
melihgurlek:fix/panel-link-menu-overflow
Open

[BUGFIX] Fix panel links menu not opening inside the overflow menu#255
melihgurlek wants to merge 2 commits into
perses:mainfrom
melihgurlek:fix/panel-link-menu-overflow

Conversation

@melihgurlek

Copy link
Copy Markdown

Description

Fixes #3654.

LinksDisplay's icon button opens its own MUI <Menu> on click, but the click
event bubbles up to the ancestor OverflowMenu's wrapping
<Stack onClick={handleClose}>. On narrow panels — where the links button
collapses into that overflow menu — this closes (and unmounts) the overflow
before the links menu can render, so it never opens at all. This is what
shows up as "rendered at an arbitrary position" in the original report: the
menu is mid-open/mid-teardown when the DOM settles.

Fix is a single event.stopPropagation() in LinksDisplay's click handler,
so opening its own nested menu no longer collapses the parent overflow menu.

OverflowMenu was changed from a module-private component to an exported one
(still not part of the package's public index.ts barrel) so it could be
covered by a regression test independent of the container-query breakpoint
logic, which jsdom can't evaluate.

AI assistance

Claude Code (Sonnet 5) was used to investigate the issue, build an isolated
reproduction confirming the root cause, and write the fix and regression
test. I reviewed the diff and the test and understand both.

Screenshots

N/A — not a visual/styling change; before this fix the menu never rendered
at all in the affected case.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.

LinksDisplay's icon button opens its own MUI Menu on click, but the
click event bubbles up to the ancestor OverflowMenu's wrapping
<Stack onClick={handleClose}>. On narrow panels, where the links
button collapses into that overflow menu, this closes (and unmounts)
the overflow before the links menu can render, so it never opens.

Fixes #3654

Signed-off-by: Melih Gürlek <melihgurlek@gmail.com>
@melihgurlek
melihgurlek requested a review from a team as a code owner August 25, 2026 16:43
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.

1 participant