`@effect/ui-kit` (Effect-TS/ui): an open `Dialog` or `Drawer` reads as hidden to Playwright, because its portal box is 0×0

Abierto
#11,084 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@effect-bot ya está trabajando en esto.

Desde el 29/11/2026.

  • #651 de @effect-bot — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
playwright, typescript
Área
frontend, testing

Línea de trabajo

Start by reading packages/ui-kit/src/internal/topLayer.ts, where the issue identifies the portal box styling, and check the linked open pull request #651 for work already underway. Reproduce the visibility failure with a kit Dialog or Drawer in Playwright, then verify that the dialog role becomes visible while its contents remain usable. The issue proposes either giving the open portal a real box or documenting the test workaround.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What happens

An open Dialog or Drawer from @effect/ui-kit reads as hidden to Playwright. await page.getByRole("dialog").waitFor({ state: "visible" }) never resolves, and expect(page.getByRole("dialog")).toBeVisible() fails, while the sheet is on screen and the accessibility tree names the dialog.

Why

The portal is a <dialog popover> styled with portalBox (packages/ui-kit/src/internal/topLayer.ts):

export const portalBox = "position:fixed;inset:0;width:0;height:0;" + boxReset

The scrim and the popup overflow that 0×0 box, so people see them. Playwright, though, treats an element with an empty bounding box as not visible, and the dialog role sits on that box.

Repro

  1. Render any kit Dialog with props: { open: true } in a page served to Playwright (Chromium).
  2. await page.getByRole("dialog").waitFor({ state: "visible", timeout: 2000 }) times out.
  3. await page.getByRole("dialog").getByRole("heading").waitFor({ state: "visible" }) resolves.

Seen at Effect UI 4ac356c with Playwright's bundled Chromium.

Ask

Either give the portal a real box while it is open (for example width:100%; height:100% with pointer-events:none, leaving the popup to take events), or document that tests should wait for something inside the dialog. People hit this the first time they write a browser test against a kit dialog.

Lenguaje dominante
TypeScript
Estrellas
16.7k
Forks
808
Merge medio
21 h 22 min
PR fusionados (30 d)
486

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Effect-TS/effect

Todos los issues de Effect-TS/effect

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.