Update CHANGELOG with mobile Reports fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
adamp 2026-02-09 21:50:58 -06:00
parent de7156583b
commit eddbbbc5c0

View File

@ -4,6 +4,28 @@ All notable changes to the Cookie Tracker are documented in this file.
--- ---
## 2026-02-09 (Mobile Reports Fix)
### Bugfix: Reports Page Mobile Layout
**Commit:** `de71565` — *Fix Reports page mobile layout*
**Problem**: On mobile (iPhone 13 Pro Max portrait, and any screen < 640px), the Reports page tables were squished and unreadable. The existing CSS converts `.table-wrap` tables to a stacked card layout on small screens by hiding `<thead>` and showing `data-label` attributes on each `<td>`, but the Reports tables were missing those attributes entirely. This meant cells rendered without labels and the 45 column tables were crammed into the narrow viewport.
**Fix**:
- `client/src/pages/Reports.jsx` — Added `data-label` attributes to every `<td>` across all 5 report tables:
- **Sales by Product**: Product, Units sold, Revenue (including `<tfoot>` total row)
- **Top Customers**: Customer, Orders, Total spent
- **Revenue Over Time**: Date, Orders, Revenue
- **Order Status Breakdown**: Status, Count
- **Inventory Summary**: Product, Current stock, Total restocked, Total sold, Restock count
- `client/src/pages/Reports.jsx` — Added `className="bar-cell"` to the Revenue Over Time inline bar chart column.
- `client/src/index.css` — Added `display: block` for `tbody` and `tfoot` inside `.table-wrap` at the `max-width: 639px` breakpoint so `<tfoot>` rows also get the mobile card treatment.
- `client/src/index.css` — Added `.table-wrap td.bar-cell { display: none }` at the mobile breakpoint to hide the bar chart column (doesn't translate well to stacked layout).
---
## 2026-02-09 ## 2026-02-09
### Feature: Restock History Tracking ### Feature: Restock History Tracking