Make the UI work on a phone
The ☰ button lived in the player bar, which is hidden until something plays, so the feed list was unreachable on a phone. It moves to a bar that is always present, and the sidebar gets a scrim. The reading pane takes the whole screen over the list with a back button, the player stacks into two rows above it, and the page no longer scrolls sideways -- a grid column is min-content wide by default, so one long headline dragged everything off the right edge. Covered by a Playwright case at 390x844. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AdXho5tTkjFLeUXKbEjKBh
This commit is contained in:
@@ -207,3 +207,30 @@ test('marking an OPML subscription read covers the feeds inside it', async ({ pa
|
||||
await page.locator('#content .acts button', { hasText: 'Mark all read' }).click();
|
||||
await expect(folder.locator('.badge')).toHaveText('0');
|
||||
});
|
||||
|
||||
test.describe('on a phone', () => {
|
||||
test.use({ viewport: { width: 390, height: 844 } });
|
||||
|
||||
test('the feed list is reachable and an item reads full screen', async ({ page }) => {
|
||||
// The burger used to live in the player bar, which is hidden until something plays --
|
||||
// leaving no way to reach the feeds at all.
|
||||
await expect(page.locator('#burger')).toBeVisible();
|
||||
await expect(page.locator('#player')).not.toBeVisible();
|
||||
|
||||
await page.locator('#burger').click();
|
||||
await page.locator('.feed', { hasText: 'Test Show' }).first().click();
|
||||
await expect(page.locator('#sidebar')).not.toHaveClass(/open/);
|
||||
|
||||
// Nothing may push the page sideways at this width.
|
||||
const over = await page.evaluate(() =>
|
||||
document.documentElement.scrollWidth - window.innerWidth);
|
||||
expect(over).toBeLessThanOrEqual(0);
|
||||
|
||||
// One pane at a time: the list, then the item over it, then back.
|
||||
await expect(page.locator('#detail')).not.toBeVisible();
|
||||
await page.locator('.ep').first().click();
|
||||
await expect(page.locator('#detail')).toBeVisible();
|
||||
await page.locator('#dback').click();
|
||||
await expect(page.locator('#detail')).not.toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user