Skip to content

feat(AnchoredOverlay): add disable flip property#2288

Open
Bracciata wants to merge 4 commits intodevelopfrom
feat/add-disable-flip
Open

feat(AnchoredOverlay): add disable flip property#2288
Bracciata wants to merge 4 commits intodevelopfrom
feat/add-disable-flip

Conversation

@Bracciata
Copy link
Copy Markdown
Contributor

Relates to https://github.com/dequelabs/launchpad/issues/1321

Adds a property to disable flipping (trying to keep element on screen by switching position).

@Bracciata Bracciata requested a review from a team as a code owner March 26, 2026 18:11
Copilot AI review requested due to automatic review settings March 26, 2026 18:11
@Bracciata Bracciata requested a review from a team as a code owner March 26, 2026 18:11
@Bracciata Bracciata force-pushed the feat/add-disable-flip branch from 8eaeba2 to 2419380 Compare March 26, 2026 18:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a disableFlip option to the React AnchoredOverlay component to prevent automatic flip-based repositioning, and updates supporting docs/tests. The PR also includes Playwright/tooling dependency upgrades and related config/lockfile updates.

Changes:

  • Add disableFlip prop to AnchoredOverlay and wire it into Floating UI middleware selection.
  • Add documentation and a unit test covering the new prop.
  • Upgrade Playwright CT/test dependencies and adjust Playwright CT Vite/CommonJS config (with corresponding yarn.lock updates), plus a VPAT markdown reformat.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
yarn.lock Updates toolchain dependency graph (Playwright/Vite/esbuild/postcss, etc.).
vpats/2026-02-23-cauldron.md Markdown table formatting changes.
playwright-ct.config.ts Adjusts Vite/Rollup commonjs options for Playwright CT.
packages/react/src/components/AnchoredOverlay/index.tsx Introduces disableFlip prop and changes middleware selection behavior.
packages/react/src/components/AnchoredOverlay/AnchoredOverlay.test.tsx Adds a new test case for disableFlip.
package.json Bumps @playwright/* devDependencies.
docs/pages/components/AnchoredOverlay.mdx Documents disableFlip and adds an example + props entry.
Comments suppressed due to low confidence (1)

packages/react/src/components/AnchoredOverlay/index.tsx:139

  • Even with disableFlip enabled, preventTopOverflowMiddleware can still reset the placement (e.g., top -> bottom) when the overlay overflows the document top. That’s effectively a flip and contradicts the expectation that flipping is disabled. If the intent is truly “no flips,” gate this middleware behind !disableFlip (or clarify the prop/docs to state that top-overflow prevention can still change placement).
          crossAxis: false,
          boundary: 'clippingAncestors'
        }),
        preventTopOverflowMiddleware
      ].filter(Boolean),

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

Comment thread packages/react/src/components/AnchoredOverlay/AnchoredOverlay.test.tsx Outdated
Comment thread packages/react/src/components/AnchoredOverlay/index.tsx Outdated
@aws-amplify-us-east-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2288.d15792l1n26ww3.amplifyapp.com

@Bracciata Bracciata force-pushed the feat/add-disable-flip branch from 2419380 to 1397407 Compare March 26, 2026 18:18
@Bracciata Bracciata requested a review from a team March 29, 2026 21:52
Zidious
Zidious previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Contributor

@Zidious Zidious left a comment

Choose a reason for hiding this comment

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

Had a question inline otherwise LGTM, I'll get other folks review.

Comment thread docs/pages/components/AnchoredOverlay.mdx Outdated
Comment thread docs/pages/components/AnchoredOverlay.mdx
Comment thread docs/pages/components/AnchoredOverlay.mdx Outdated
Comment thread packages/react/src/components/AnchoredOverlay/index.tsx
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.

4 participants