fix(design): the saved-view chip on one line, one Escape per layer, the /watch action row (E28 S3d)
- SelectTrigger lays its toolbar value out as a row; the saved-view chip passes its glyph and modified dot through the icon/trailing slots (an <svg> is display:block and broke the chip in two). - One Escape in a dialog's open list closed the list AND the dialog: the list's close flushes synchronously and pops its layer before the dialog's window listener runs. takeEscape() is the one close-on-Escape test (topmost AND not yet taken); Modal, the Welcome lightbox and useLayer use it, and keymap.dispatch ignores a taken Escape. - /watch: the Download sits on the toolbar rung, level with the Repeat chip.
This commit is contained in:
@@ -49,3 +49,24 @@ describe("SavedViewsPopover · Manage views…", () => {
|
||||
await vi.waitFor(() => expect(openModal).toHaveBeenCalledTimes(1));
|
||||
});
|
||||
});
|
||||
|
||||
// E28: the toolbar chip's glyph sat INSIDE the value text, and an <svg> is display:block under the
|
||||
// preflight, so the chip broke onto two lines (the bookmark above "gaming ▾"). The glyph and the
|
||||
// modified dot ride in the trigger's own slots; the value is a row.
|
||||
describe("SavedViewsPopover · toolbar chip", () => {
|
||||
it("puts the glyph in the trigger's icon slot, not inside the value", () => {
|
||||
render(
|
||||
<FloatingTree>
|
||||
<SavedViewsPopover
|
||||
toolbar
|
||||
icon={<svg data-testid="glyph" />}
|
||||
trigger={<span>gaming</span>}
|
||||
ariaLabel="View chip"
|
||||
/>
|
||||
</FloatingTree>,
|
||||
);
|
||||
const button = screen.getByRole("button", { name: "View chip" });
|
||||
expect(screen.getByTestId("glyph").parentElement).toBe(button);
|
||||
expect(screen.getByText("gaming").parentElement!.className).toContain("flex");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user