📌 Description
src/components/treasuryOverviewPage/StreamsTable.tsx renders a full data table that overflows horizontally on viewports narrower than ~768 px. On mobile, switch to a card-per-row layout (similar to RecipientStreams) where each stream's key fields stack vertically. Use the breakpoints.ts values from src/lib/breakpoints.ts and a CSS media query in StreamRow.css.
💡 Why it matters: Treasury managers on mobile cannot scan their streams without awkward horizontal scrolling, which is also a WCAG 1.4.10 (Reflow) violation.
🧩 Requirements and context
- Add a CSS media query in
src/components/treasuryOverviewPage/StreamRow.css that switches <tr> children to a stacked display: block layout at the mobile breakpoint from src/lib/breakpoints.ts.
- Hide the
<thead> on mobile and add data-label attributes to <td> elements used as pseudo-headers.
- Ensure the StreamRow action column remains accessible as a tap target (≥44 px).
- Verify the layout renders correctly in both light and dark themes.
- Add a
@media (max-width: ...) snapshot or accessibility note in StreamsTable test.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b feat/streams-table-mobile-layout
2. Implement changes
- Write/modify the relevant source:
src/components/treasuryOverviewPage/StreamRow.css, src/components/treasuryOverviewPage/StreamRow.tsx, src/components/treasuryOverviewPage/StreamsTable.tsx
- Write comprehensive tests:
src/components/treasuryOverviewPage/__tests__/StreamsTable.test.tsx
- Add documentation: comment in
StreamRow.css referencing the breakpoint token source
- Validate security assumptions:
data-label values must be static strings, not user data
3. Test and commit
- Cover edge cases: very narrow viewport (320 px), table with 0 rows, table with many rows
- Include test output and security notes in the PR description.
Example commit message
feat(ui): add responsive mobile card layout to StreamsTable eliminating horizontal scroll
✅ Acceptance criteria
🔒 Security notes
data-label attribute values are static strings from the component, not user content, so no XSS risk.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
src/components/treasuryOverviewPage/StreamsTable.tsxrenders a full data table that overflows horizontally on viewports narrower than ~768 px. On mobile, switch to a card-per-row layout (similar toRecipientStreams) where each stream's key fields stack vertically. Use thebreakpoints.tsvalues fromsrc/lib/breakpoints.tsand a CSS media query inStreamRow.css.🧩 Requirements and context
src/components/treasuryOverviewPage/StreamRow.cssthat switches<tr>children to a stackeddisplay: blocklayout at the mobile breakpoint fromsrc/lib/breakpoints.ts.<thead>on mobile and adddata-labelattributes to<td>elements used as pseudo-headers.@media (max-width: ...)snapshot or accessibility note inStreamsTabletest.Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
src/components/treasuryOverviewPage/StreamRow.css,src/components/treasuryOverviewPage/StreamRow.tsx,src/components/treasuryOverviewPage/StreamsTable.tsxsrc/components/treasuryOverviewPage/__tests__/StreamsTable.test.tsxStreamRow.cssreferencing the breakpoint token sourcedata-labelvalues must be static strings, not user data3. Test and commit
npm run testExample commit message
✅ Acceptance criteria
data-labelattributes provide context for each stacked cellStreamsTableunit tests pass without modification🔒 Security notes
data-labelattribute values are static strings from the component, not user content, so no XSS risk.📋 Guidelines