Skip to content

Commit 7bc2e1d

Browse files
committed
fix(platform): align tablet panel controls with the shell inset
1 parent 351b716 commit 7bc2e1d

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎apps/sim/platform/checks/panels.spec.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ test('a chat panel preserves its file, tabs and focus across resize, collapse an
2424
page.getByRole('heading', { level: 1, name: 'Review the renewal brief' })
2525
).toBeVisible()
2626
await page.setViewportSize({ width: 673, height: 823 })
27+
const opener = await page.getByRole('button', { name: 'Expand sidebar' }).boundingBox()
28+
const add = await panel.getByRole('button', { name: 'New panel tab' }).boundingBox()
29+
if (!opener || !add) throw new Error('Both mobile navigation controls must be visible')
30+
expect(add.x).toBeGreaterThanOrEqual(opener.x + opener.width)
2731
await expect(
2832
page.getByRole('heading', { level: 1, name: 'Review the renewal brief' })
2933
).toBeHidden()

‎apps/sim/platform/design-system/styles/shell-roles.css‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
--ui-navigation-inset: var(--spacing-52);
1313
}
1414
}
15+
@media (40rem <= width <= 48rem) {
16+
[data-platform-ui],
17+
[data-platform-ui] [data-sidebar-collapsed] {
18+
--ui-navigation-inset: var(--spacing-60);
19+
}
20+
}
1521
[data-platform-ui] [data-desktop] {
1622
--ui-navigation-inset: 0px;
1723
}

0 commit comments

Comments
 (0)