brackt/app/components
Chris Parsons 08e93e955a
Fix MLB streak doubling bug, hide empty standings columns, improve mobile layout (#413)
* Fix MLB streak doubling bug, hide empty standings columns, improve mobile layout

- mlb.ts: use streakCode alone (the API already returns the full string like
  "W3"); appending streakNumber was doubling the digit, causing "L33" display
- Update mlb.test.ts mocks to match real API format (streakCode "W3" not "W")
- RegularSeasonStandings: conditionally hide GB/L10/STK columns when no rows
  have data, so pre-season or stats-free sports don't show blank columns
- Mobile two-row layout: GP/PCT/GB/L10 move to a secondary sub-row (sm:hidden)
  so all data stays visible without horizontal scroll on small screens; STK and
  W/L remain on the primary row; reduce min-w from 740px to 360px

https://claude.ai/code/session_01RADi3LhYMPbRDm5no1ZpdF

* Address code review: cleanup mlb streak type, fix soccer GP on mobile, hoist showSubRow

- mlb.ts: drop redundant `?? undefined` after optional chain; document that
  streakCode is the full string (e.g. "W3") and streakNumber is unused
- RegularSeasonStandings: hoist hasSecondaryStats → showSubRow to component
  level (it only depends on a prop, not on individual row data)
- Remove non-functional `truncate`/`min-w-0` from team name cell — truncation
  requires table-layout:fixed which we don't use; team names size naturally
- Soccer GP was hidden on mobile with no sub-row to surface it; GP now shows
  inline for soccer on all viewports, hidden only for non-soccer (which has
  the secondary sub-row)
- Add comment explaining totalCols counts hidden-on-mobile columns for colSpan
- Add missing test for GB column hiding when no rows have gamesBack data

https://claude.ai/code/session_01RADi3LhYMPbRDm5no1ZpdF

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-12 08:14:34 -07:00
..
__tests__ Add electric flash + fade animation for draft picks, fixes #381 (#407) 2026-05-10 23:17:29 -07:00
draft Add electric flash + fade animation for draft picks, fixes #381 (#407) 2026-05-10 23:17:29 -07:00
league Show commish-only leagues in a separate dashboard section, fixes #336 (#412) 2026-05-11 23:57:04 -07:00
marketing Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
scoring Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
sport-season Fix MLB streak doubling bug, hide empty standings columns, improve mobile layout (#413) 2026-05-12 08:14:34 -07:00
sports Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
standings Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
ui Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
user/settings Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
AutodraftSettings.tsx Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
BatchResultEntry.tsx Canonical tournament layer: 2026-05-01 21:04:48 -07:00
DraftGrid.tsx Fix mobile spacing for draft board and dashboard layout (#13, #329) (#404) 2026-05-10 19:51:34 -07:00
DraftSidebar.tsx New design (#309) 2026-04-23 13:14:55 -07:00
navbar.tsx Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
NavigationProgress.tsx Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
NotificationSettings.tsx New design (#309) 2026-04-23 13:14:55 -07:00
ParticipantSelector.tsx feat: Add ParticipantSelector component for improved participant selection in brackets 2025-11-08 21:36:29 -08:00
SportIcon.tsx Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
StandingsTable.tsx Show tied ranks with T prefix across standings and Discord (#239) 2026-03-27 20:45:15 -07:00
TeamAvatar.stories.tsx Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
TeamAvatar.tsx Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
UserMenu.tsx Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00