feat(AnchoredOverlay): add disable flip property#2288
feat(AnchoredOverlay): add disable flip property#2288
Conversation
8eaeba2 to
2419380
Compare
There was a problem hiding this comment.
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
disableFlipprop toAnchoredOverlayand 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.lockupdates), 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
disableFlipenabled,preventTopOverflowMiddlewarecan stillresetthe 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.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
2419380 to
1397407
Compare
Zidious
left a comment
There was a problem hiding this comment.
Had a question inline otherwise LGTM, I'll get other folks review.
Relates to https://github.com/dequelabs/launchpad/issues/1321
Adds a property to disable flipping (trying to keep element on screen by switching position).