Visitar URL original
fix(site): reopen product menus on opencode.ai instead of a clipped sliver by YousefSaad47 · Pull Request #63180 · anomalyco/opencode · GitHub
Skip to content

fix(site): reopen product menus on opencode.ai instead of a clipped sliver - #63180

Closed
YousefSaad47 wants to merge 2 commits into
anomalyco:devfrom
YousefSaad47:fix/place-menu-reopen
Closed

YousefSaad47 wants to merge 2 commits into
anomalyco:devfrom
YousefSaad47:fix/place-menu-reopen

Conversation

@YousefSaad47

@YousefSaad47 YousefSaad47 commented Nov 10, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #63179 — regression from #63060's static-HTML cutover.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes the reopen failure of the download menus on opencode.ai. When a menu closes, the hidden menu is still a :popover-open popover with placement styles inline; when placeMenu() re-measures it, UA popover rules (inset 0, margin auto) apply and the popover never re-enters the top layer, so the carousel clips it. The fix resets the menu's inline styles, popover state and data-side before measuring. The null-offsetParent guard is unchanged and still bails on hidden menus.

Scope: one file, services/site/src/component/site/place-menu.ts. No change to first open; reopen now lands at identical position/size as first open.

How did you verify your code works?

Production build (bun run build + perf/serve.ts --port 4300), Chrome: open → close → reopen for the hero chevron, the Download section chevron and "More mobile apps" — all reopen at identical geometry to the first open (same y, w, h, gap). bun run build passes (check-worker-start: 200). The same script against the live site fails all three (control).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr 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.

This fixes the reopen bug. In a production build (bun run build + perf/serve.ts) in headless Chromium, the four home-page product menus reopen as popovers at full size with this change. On the base they reopen clipped and outside the top layer (screenshots below).

One thing is still off. A reopened menu loses its 8px gap and sits flush against the button, and some menus come back a few pixels wider. On first open the gap is there. Details in the inline comment.

The public API is unchanged: this only touches the website's client code.

Before

After

@opencodejr opencodejr 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.

The leftover popover state from my earlier comment is fixed: reopened menus now land at the same position and size as on first open. I checked open → close → reopen on all four home-page product menus in a production build in headless Chromium, and closing with Escape and with a click outside on the first one. All of them reopen fully. On the base they reopen clipped (screenshots below).

The public API is unchanged: this only touches the website's client code.

No further concerns.

Before

After

@YousefSaad47

Copy link
Copy Markdown
Author

Closing: fixed in #63311.

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.

site: reopening the download menus shows a clipped sliver instead of the full menu

1 participant