feat(web): pair scroll arrows beside section title; bleed scroller to viewport edge

Restructures HorizontalScrollRow so paired arrows sit in a flex header
beside an optional section title (instead of absolute-positioned at the
row's left/right edges). Adds margin-right: -1rem to the row so the
scroller's items extend to the viewport's right edge, escaping Shell's
p-4 padding. The header bar keeps its right gutter so titles align with
the rest of the page content.

Home page passes 'title' to the first row of each section; subsequent
rows in multi-row sections render arrow-only headers.
This commit is contained in:
2026-05-01 21:05:16 -04:00
parent 4412a4af0c
commit 4e47b2e7f5
3 changed files with 95 additions and 48 deletions
@@ -29,4 +29,14 @@ describe('HorizontalScrollRow', () => {
expect(spy).toHaveBeenCalledWith({ left: expect.any(Number), behavior: 'smooth' });
expect(spy.mock.calls[0][0].left).toBeGreaterThan(0);
});
test('renders title as a heading when prop is provided', () => {
render(HorizontalScrollRow, { props: { items: ['a'], title: 'My section' } });
expect(screen.getByRole('heading', { name: 'My section' })).toBeInTheDocument();
});
test('omits heading when title prop is absent', () => {
render(HorizontalScrollRow, { props: { items: ['a'] } });
expect(screen.queryByRole('heading')).not.toBeInTheDocument();
});
});