Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions app/changelog.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 7 additions & 0 deletions changelog.d/2026-10-29-02-tour-narrow-panel.json
Original file line number Diff line number Diff line change
@@ -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."
}
7 changes: 7 additions & 0 deletions web/changelog.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
17 changes: 17 additions & 0 deletions web/e2e/onboarding.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion web/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading