add transition to nav tree

user-agent detection is employed to ensure that the SSR renders the nav items by default for desktop (opposite for mobile). CSS media queries take over after the content loads on the device.

TODO: fix preview pane jump on desktop
This commit is contained in:
2024-10-12 14:37:07 -05:00
parent 890f8c6c17
commit 8ac0f6b931
6 changed files with 99 additions and 13 deletions

View File

@@ -1,6 +1,11 @@
import { expect, test } from '@playwright/test';
test.use({ viewport: { height: 2556, width: 1179 } });
import UserAgent from 'user-agents';
test.use({
viewport: { height: 2556, width: 1179 },
userAgent: new UserAgent({ deviceCategory: 'mobile' }).toString(),
});
test('mobile page has nav tree hidden by default', async ({ page }) => {
await page.goto('/');