Mobile-responsive table view with card list fallback #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The table view is unusable on mobile. It's a wide
<table>with 11 columns (Slot, Device, Model, Serial, WWN, FW, Capacity, Pool, Temp, Hours, Health) that overflows horizontally, requiring awkward side-scrolling. Mono-spaced serials and WWNs make it even wider. The grid view works fine on mobile since the cells naturally reflow, but switching to table view on a phone is painful.This matters because the whole point of a drive health dashboard is quick glances — often from your phone while standing in front of the rack.
Proposed Solution
Responsive table redesign with three tiers: desktop (full table), tablet (condensed table), and phone (card list). No separate mobile components — pure CSS breakpoints with progressive disclosure.
Implementation Details
1. Breakpoint Strategy
2. Desktop (≥1024px) — No Changes
Current table layout works perfectly on wide screens. Keep as-is.
3. Tablet (768–1023px) — Condensed Table
Hide lower-priority columns to fit without horizontal scroll:
text-overflow: ellipsis,max-width: 140pxWWNFWHoursThis brings it down to 7 visible columns which fits comfortably at 768px.
4. Mobile (<768px) — Drive Cards
Replace the table entirely with a vertical card list. Each drive renders as a compact card:
Design notes:
user-select: allso a tap selects the full string for copyinggap: 8pxbetween them for thumb-friendly scrolling5. Implementation Approach
Use a
useMediaQueryhook orwindow.matchMediato detect breakpoint and conditionally render:Then in
TableView:6. Grid View Mobile Adjustments
The grid view already works reasonably well on mobile since the cells resize, but make these tweaks:
useResizeScalehook7. Header / Controls Mobile Layout
Acceptance Criteria