fix: move std-dev info to accordion, remove broken tooltip (#19) #20

Merged
shcizo merged 4 commits from fix/std-dev-tooltip-positioning-and-discoverability-19 into main 2026-05-25 08:04:17 +02:00
Owner

Summary

  • Removed the broken .std-dev-tooltip (positioned wrong after the mobile redesign because .expandable-row carries position: relative) and the brief inline ±N indicator. Moved the spread + range into the expandable-row accordion (desktop) and the mobile card detail-grid, under "Gap to predicted".
  • Two new accordion rows: Round spread (±N) and Rating range (min–max). Rendered only when the player has both stdDev and rating (guarded with != null).
  • Net ~70 lines deleted: helpers stdDevTooltipText, updateStdDevInline, initRatingsTooltips, and the three refresh-path bindings (refreshPlayer, refreshRoundHistory, refreshHistoryThenCalculate) are all gone. tooltips.js is unchanged since it's still used by .chart-tooltip in the chart popup.

Closes #19

Test plan

  • Hover the big rating value — no tooltip (intended; removed).
  • Predicted column shows no inline ±N (intended; removed).
  • Click a player row with round history → accordion shows Round spread + Rating range rows below "Gap to predicted".
  • Click a player with no stdDev yet → the two rows are not rendered.
  • Refresh round history → re-open accordion → updated spread/range values displayed.
  • Mobile: tap a card → expanded detail-grid includes the two new rows.
## Summary - Removed the broken `.std-dev-tooltip` (positioned wrong after the mobile redesign because `.expandable-row` carries `position: relative`) and the brief inline `±N` indicator. Moved the spread + range into the expandable-row accordion (desktop) and the mobile card detail-grid, under "Gap to predicted". - Two new accordion rows: **Round spread** (`±N`) and **Rating range** (`min–max`). Rendered only when the player has both `stdDev` and `rating` (guarded with `!= null`). - Net ~70 lines deleted: helpers `stdDevTooltipText`, `updateStdDevInline`, `initRatingsTooltips`, and the three refresh-path bindings (`refreshPlayer`, `refreshRoundHistory`, `refreshHistoryThenCalculate`) are all gone. `tooltips.js` is unchanged since it's still used by `.chart-tooltip` in the chart popup. Closes #19 ## Test plan - [x] Hover the big rating value — no tooltip (intended; removed). - [x] Predicted column shows no inline `±N` (intended; removed). - [x] Click a player row with round history → accordion shows **Round spread** + **Rating range** rows below "Gap to predicted". - [x] Click a player with no `stdDev` yet → the two rows are not rendered. - [x] Refresh round history → re-open accordion → updated spread/range values displayed. - [x] Mobile: tap a card → expanded detail-grid includes the two new rows.
shcizo added 4 commits 2026-05-25 08:03:44 +02:00
- A: create inline span when missing in refreshRoundHistory (was silently dropped)
- B: updateStdDevInline also called from refreshHistoryThenCalculate
- C: extract stdDevTooltipText + updateStdDevInline helpers; replace 3 call sites
- D: remove margin-left: 4px and bump font-size to 12px on .std-dev-inline
- E: guard against stdDev === 0 in EJS (truthy → != null)
- Add "Round spread" row (±stdDev, range lo–hi) to desktop accordion
  (player-history.ejs) and mobile card expanded section (ratings-cards.ejs)
- Remove .std-dev-tooltip div and .std-dev-inline span from table partial
- Remove stdDevTooltipText, updateStdDevInline, initRatingsTooltips helpers
  and all call sites from players.js
- Remove .std-dev-tooltip and .std-dev-inline CSS rules; drop cursor:help
  from .rating-value
shcizo merged commit 27d1bef8dd into main 2026-05-25 08:04:17 +02:00
Sign in to join this conversation.