feat(management): add responsive mobile card view for tables in stok, pembelian, and penjualan #179
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/178-mobile-cards"
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?
Closes #178.
What changed
apps/management/components/ui/data-table.tsx: add optionalrenderMobileCardrender slot rendering accessible button cards on<smviewports (sm:hidden) and hiding the table (hidden sm:block).apps/management/app/(dashboard)/stok/inventory-table.tsx: implementInventoryMobileCardwith product name, stock status, category metadata, and buy/sell prices.apps/management/app/(dashboard)/pembelian/purchase-table.tsx: implementPurchaseMobileCardwith supplier, date, total amount, item count, receipt indicators, and item preview.apps/management/app/(dashboard)/penjualan/penjualan-table.tsx: implementPenjualanMobileCardwith order number, status badge, grand total, date, receipt dot, and line items preview.Verified
pnpm --filter garage typecheck: passed with 0 errors.pnpm --filter garage test: 27 test files, 516 tests passed.pnpm biome check: passed with 0 errors on modified files.pnpm --filter garage build: Next.js production build succeeded.Deviations
None.
VERDICT: request-changes
apps/management/components/ui/data-table.tsx:L103: should: When a keyboard user tabs to a mobile card,
focus-visible:outline-noneremoves the browser's focus outline and replaces it only withbg-zinc-50against the white card background, leaving no discernible focus indicator. Add a high-contrast focus ring (such asfocus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-inset) so keyboard users can clearly see which card Enter or Space will activate.Round 1 addressed:
focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-insetto mobile card button inapps/management/components/ui/data-table.tsxfor high-contrast keyboard focus indicators.VERDICT: request-changes
apps/management/components/ui/data-table.tsx:L103: should: Use a higher-contrast ring color like
focus-visible:ring-zinc-900orfocus-visible:ring-orange-700to guarantee high contrast (>3:1) against the white card background.apps/management/components/ui/data-table.tsx:L96: should: Add a compact mobile sort bar at the top of the mobile card list linked to TanStack table's sorting state, so mobile users can still sort records (by stock, price, date, total) without table headers.
VERDICT: approve
Reviewed the full four-file diff at
0a6cac4. The optional mobile render slot, all three card layouts, responsive table visibility, card-to-detail-sheet clicks, and shared filtering/pagination flow satisfy #178. The new orange inset focus-visible ring addresses the Round 1 keyboard-focus finding. No patch-introduced regressions or scope creep found. Forgejo CI reports success for garage tests, management typecheck, and Biome lint; I did not rerun these commands locally.Round 2 addressed:
focus-visible:ring-orange-500to high-contrastfocus-visible:ring-zinc-900.VERDICT: approve-with-nits
apps/management/components/ui/data-table.tsx:L131: nit: Add
focus-visible:ring-2 focus-visible:ring-zinc-900to the mobile sort<select>so keyboard focus is visibly indicated.apps/management/components/ui/data-table.tsx:L154: nit: Update the sort direction button's
aria-labelto announce the next action (currentSort.desc ? "Urutkan menaik" : "Urutkan menurun").§7 Pre-Merge Verification Summary
VERDICT: approve-with-nits(Review #143).<select>and updated sort buttonaria-labelto announce next action (commit8eaae60).pr.mergeable == trueat8eaae6072539da5e02551ef07da481c09c6dc8fd.8eaae60:pnpm biome check: 4 files checked, 0 errors.pnpm --filter garage typecheck: 0 errors.pnpm --filter garage test: 27 files passed, 516 tests passed.pnpm --filter garage build: Production build succeeded.maindeploys the production image via.forgejo/workflows/build-publish.yml.