Skip to content

test(storybook): the Popover Anchor Ref story's edit buttons sit above the table - #13060

Merged
cixzhang merged 1 commit into
mainfrom
test/popover-anchor-ref-buttons-above-table
Nov 20, 2026
Merged

cixzhang merged 1 commit into
mainfrom
test/popover-anchor-ref-buttons-above-table

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Maintainer impact

Main is red: PopoverAnchor.interaction.browser.spec.ts › "the popover sits on the cell the ref holds, and moves on the next show()" times out in Chromium. Its click on "Edit row C" lands on the open popover. Since #11121 the popover in PopoverAnchorRef.stories.tsx also holds a "Delete value B" button, so it is taller (92 px on the phone profile). It opens below row A's value cell and now covers the edit buttons of rows B and C, which sat in the column next to the cells.

Intended invariant

The story is the fixture for PopoverAnchor.interaction.browser.spec.ts: one usePopover popover moves between three table rows through anchorRef. A button that moves the popover must stay pressable while the popover is open.

Change

  • apps/storybook/stories/PopoverAnchorRef.stories.tsx: the three edit buttons move from a column in each row to a bar above the table. The popover opens below a value cell, so it never covers a button that moves it. Each button still sets anchorRef to its row's value cell and calls show().
  • The spec and its assertions are unchanged. The value cells, the remove/restore button below the table and the popover's content are unchanged.

Evidence

Chromium, phone profile (402 × 714), the spec's own harness, on a Storybook built at each commit:

main this change
Popover box after "Edit row A" x 16–265, y 80–172 x 16–265, y 104–196
"Edit row C" button x 200–301, y 136–168 (covered) x 250–350, y 32–64 (clear)
Element at the button's center the popover the button
PopoverAnchor.interaction.browser.spec.ts 1 failed, 2 passed (the click times out) 30 passed (--repeat-each=10)

Scope

Components: storybook (Popover Anchor Ref story)

  • This PR has one primary intent.
  • Independently removable API, visual, layout, behavior, cleanup, and policy changes were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm storybook:build, then pnpm test:interaction --project=chromium --repeat-each=10 PopoverAnchor.interaction.browser.spec.ts: 30 passed. Before this change: 1 failed, 2 passed.
  • pnpm preflight --quick: review:pre, typecheck, lint, knowledge and changesets pass.
  • Story-only: no package changes, so no Changeset.

…e the table

The popover in the story opens below a value cell. Since it gained a
"Delete value B" button it covers the edit buttons of the rows below,
so PopoverAnchor.interaction.browser.spec.ts could not click "Edit row C"
while it was open. The edit buttons now sit in a bar above the table,
where the open popover never covers them. The spec is unchanged.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 20, 2026 5:22am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 20, 2026
@astracat-bot

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 20, 2026, 5:52 AM UTC

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · d99e9ef

Storybook · Sandbox · built from this PR's head

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI is still running on this head.

The story change unblocks the popover-anchor interaction proof without touching the spec or its assertions: on the base branch the open popover covers "Edit row C" and the first proof times out, while on this head the proof passes every run. There is nothing to change.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim: main fails the first proof because its press on "Edit row C" lands on the open popover — verified: on the base the spec times out at line 58, with the popover intercepting the click.
  • Claim: the popover grew when an earlier change added a "Delete value B" button, to 92 px on the phone profile — verified: that commit adds the button to the story, and the base popover measures y 80–172.
  • Claim: it opens below row A's value cell and covers the edit buttons of rows B and C — verified: a hit test at each button's centre returns the popover on the base.
  • Claim: the three edit buttons move to a bar above the table, and each still sets the anchor ref to its row's value cell and calls show() — verified: story lines 49–62.
  • Claim: the spec, its assertions, the value cells, the remove/restore button and the popover content are unchanged — verified: the story is the only changed file, and its diff touches only the header, the new bar and the removed button cell.
  • Claim: the measured boxes in the description (popover x 16–265, y 80–172 on main and y 104–196 here; "Edit row C" x 200–301, y 136–168 covered on main and x 250–350, y 32–64 clear here) — verified: the same numbers measured on both trees.
  • Claim: main gives 1 failed and 2 passed, this change 30 passed with 10 repeats — verified: both runs reproduced.
  • Claim: the quick preflight checks pass — verified for this change: ESLint and Prettier are clean, the type check reports no error in the story, the pre-review report has no finding, and the knowledge and changeset checks pass.
  • Claim: story-only, so no changeset — verified: no package file changes.
  • Claim: one primary intent, with nothing separable mixed in — verified: the bar and the matching header line are the whole diff.
  • File: apps/storybook/stories/PopoverAnchorRef.stories.tsx — clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 20, 2026 05:45
@cixzhang
cixzhang merged commit 5fbc4e3 into main Nov 20, 2026
140 checks passed
@cixzhang
cixzhang deleted the test/popover-anchor-ref-buttons-above-table branch November 20, 2026 06:25

This branch was successfully deployed

1 active deployment
Preview — d99e9ef3 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant