Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/web/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@
min-height: 2.75rem;
}
}
}

/* These platform reserves must share Tailwind's utilities layer. The
titlebar also uses px-* utilities, and a later cascade layer wins before
selector specificity is considered. Keeping these rules here ensures the
native window controls always take precedence over the normal padding. */
@layer utilities {
/* macOS traffic lights live at the top-left of the frameless window.
Reserve their inset; the desktop shell owns the real controls. */
[data-platform="darwin"] .titlebar-traffic-light-inset {
Comment thread
wolfiesch marked this conversation as resolved.
Outdated
Expand Down
10 changes: 10 additions & 0 deletions e2e/pwa-install.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ test.afterAll(async () => {
await web?.stop();
});

test("reserves the native macOS traffic-light area in the titlebar", async ({ page }) => {
await page.goto(`${web.url}fixture?platform=darwin&reset=1`, {
waitUntil: "domcontentloaded",
});

const titlebar = page.locator("header");
await expect(titlebar).toHaveCSS("padding-left", "76px");
await expect(titlebar.getByRole("button", { name: /session list/u })).toBeVisible();
});

test("installs from the hosted-client titlebar without overflowing a phone", async ({ page }) => {
await page.setViewportSize({ width: 320, height: 568 });
await page.goto(web.url, { waitUntil: "domcontentloaded" });
Expand Down
Loading