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

オープン
#11,084 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@effect-bot がすでに取り組んでいます。

2026年11月29日 から。

  • #651 @effect-bot による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
playwright, typescript
領域
frontend, testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
16.7k
フォーク
808
平均マージ
21時間 22分
マージ済み PR(30日)
486

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Effect-TS/effect のほかの issue

Effect-TS/effect の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。