diff --git a/app/changelog.json b/app/changelog.json index 264bd74b..1074a909 100644 --- a/app/changelog.json +++ b/app/changelog.json @@ -1,4 +1,11 @@ [ + { + "id": "2026-10-29-tour-narrow-panel", + "date": "2026-10-29", + "where": "map", + "title": "The tour fits a narrow window", + "body": "Below tablet width the tour's notes sit in its panel, instead of floating over the top bar." + }, { "id": "2026-10-23-companion-link-stays", "date": "2026-10-23", diff --git a/changelog.d/2026-10-29-02-tour-narrow-panel.json b/changelog.d/2026-10-29-02-tour-narrow-panel.json new file mode 100644 index 00000000..2140cc75 --- /dev/null +++ b/changelog.d/2026-10-29-02-tour-narrow-panel.json @@ -0,0 +1,7 @@ +{ + "id": "2026-10-29-tour-narrow-panel", + "date": "2026-10-29", + "where": "map", + "title": "The tour fits a narrow window", + "body": "Below tablet width the tour's notes sit in its panel, instead of floating over the top bar." +} diff --git a/web/changelog.json b/web/changelog.json index 264bd74b..1074a909 100644 --- a/web/changelog.json +++ b/web/changelog.json @@ -1,4 +1,11 @@ [ + { + "id": "2026-10-29-tour-narrow-panel", + "date": "2026-10-29", + "where": "map", + "title": "The tour fits a narrow window", + "body": "Below tablet width the tour's notes sit in its panel, instead of floating over the top bar." + }, { "id": "2026-10-23-companion-link-stays", "date": "2026-10-23", diff --git a/web/e2e/onboarding.spec.js b/web/e2e/onboarding.spec.js index 027afde3..7d6c9c80 100644 --- a/web/e2e/onboarding.spec.js +++ b/web/e2e/onboarding.spec.js @@ -164,6 +164,23 @@ for (const [w, h] of [[760, 800], [800, 800], [900, 700], [1024, 700]]) { }) } +// #758: below 768 Start mapping and Log in live in the menu, so two callouts +// have nothing to point at. They used to be skipped, left at 0,0 over the bar +// and left out of the decision, which then hung on whether the third box fit +// below the panel: a question of font metrics. A tall window gives that box +// room on any font, so only the missing targets can send the copy inside. +test('a callout whose control is in the menu sends the copy into the panel', async ({ page }) => { + await page.setViewportSize({ width: 700, height: 1400 }) + await bootstrap(page, false) + await page.goto('/') + await expect(page.locator('#wb-onboarding')).toBeVisible() + await expect(page.locator('#auth-btn')).toBeHidden() + await expect(page.locator('#wb-inline')).toBeVisible() + for (const id of ['wb-co-filters', 'wb-co-mapping', 'wb-co-account']) { + await expect(page.locator(`#${id}`)).toBeHidden() + } +}) + test('a phone-width window drops the floating callouts into the panel', async ({ page }) => { // The centred panel is most of a narrow viewport, so three boxes beside the // toolbar would sit behind it — the copy moves inside instead. diff --git a/web/onboarding.js b/web/onboarding.js index dab67e2e..3588b239 100644 --- a/web/onboarding.js +++ b/web/onboarding.js @@ -140,7 +140,10 @@ export function positionCallouts() { .filter((elm) => elm && elm.getBoundingClientRect) .map((elm) => elm.getBoundingClientRect()) .filter((r) => r.width > 0 || r.height > 0) - if (!rects.length) continue + // No visible target (#758): below 768 Start mapping and Log in are in the + // menu. A box with nothing to point at cannot be placed either, so the copy + // goes into the panel, where it describes the menu entries just as well. + if (!rects.length) { spotlight = false; continue } const size = box.getBoundingClientRect() const anchored = calloutPosition(unionRect(rects), viewport, size, co) const { top, left } = avoidOverlap(