brackt/app/components/scoring
Chris Parsons 4f111820ec
Fix standings table bugs and polish across all three scoring patterns (#415)
* Fix standings table bugs and polish across all three scoring patterns

- Fix isLastBeforePointsLine/PlayoffLine: was incorrectly suppressing the
  bottom border on the last row of a section when no divider followed
  (nextStanding === undefined case). Now correctly requires nextStanding
  to exist and exceed the cutoff rank.
- Fix totalCols colSpan overcounting: hidden sm:table-cell columns
  (Drafted By / Mgr) don't occupy column slots on mobile, so counting
  them caused the divider rows to span one too many. Replaced with
  colSpan={100} (browser caps to actual column count).
- Move pointsLinePushed mutation out of render in SeasonStandings and
  QualifyingPointsStandings: replaced let+mutation+array-push pattern
  with pre-computed firstOver8Idx and React.Fragment per row.
- Replace array-returning .map() with keyed React.Fragment in both files.
- Remove unused description prop from SeasonStandingsProps.
- Use useId() for Switch id props in all three components to prevent
  id collisions when mounted multiple times.
- Fix formatQP NaN fallback from "0" to "—".
- Add comment noting canFinalize guards the admin-only finalize UI.
- Drop dead description prop pass-through in SportSeasonDisplay.

Fixes #408

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix RegularSeasonStandings tests broken by showStats toggle

- STK/streak tests: click the Details switch before asserting on stats
  columns, which are now hidden behind the toggle by default
- Ownership badge test: use getAllByText since the badge renders in both
  the mobile inline slot and the hidden-sm desktop Mgr cell
- Division label test: remove expectation for inline per-row division
  labels, which were intentionally removed to fix mobile scroll

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:39:25 -07:00
..
__tests__ Fix NBA play-in elimination display and consolidate bracket reprocessing (#299) 2026-04-15 14:56:33 -07:00
BracketTreePaginated.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
BracketTreeView.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
GroupStageDisplay.tsx User/chris/bracket UI redesign (#95) 2026-03-09 22:44:33 -07:00
NbaBracketLayout.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
PlayoffBracket.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
QualifyingPointsStandings.tsx Fix standings table bugs and polish across all three scoring patterns (#415) 2026-05-12 10:39:25 -07:00
RankingsRow.stories.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
RankingsRow.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
ScoringRulesEditor.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
SeasonStandings.tsx Fix standings table bugs and polish across all three scoring patterns (#415) 2026-05-12 10:39:25 -07:00
SportSeasonDisplay.tsx Fix standings table bugs and polish across all three scoring patterns (#415) 2026-05-12 10:39:25 -07:00
TabbedBracketLayout.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00