refactor: simplify series page — drop redundant versus/headline, blank out placeholder scores, make round badge the bracket link
CI / Lint (push) Successful in 10s
CI / Test (push) Successful in 16s
CI / Build & Push (push) Successful in 32s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 19:18:41 -04:00
parent dc3bfd13b3
commit 303db46cc3
3 changed files with 14 additions and 77 deletions
-18
View File
@@ -73,7 +73,6 @@ def build_series_view(series_id, payload):
"leader": leader_team,
"trailer": trailer_team,
"state": state,
"headline": _headline(state, leader_team, trailer_team, top_wins, bot_wins),
"games": normalized_games,
"played_games": played,
"next_game": next_game,
@@ -157,23 +156,6 @@ def _game_view(game):
}
def _headline(state, leader, trailer, top_wins, bot_wins):
if state["is_game7"]:
return "Win-or-go-home \u2014 Game 7 tonight."
if state["is_clincher"] and leader:
return f"{leader['full']} can close it out in Game {state['game_number']}."
if state["is_pivotal"]:
return f"Series tied 2\u20112 \u2014 pivotal Game {state['game_number']}."
if state["is_opener"]:
return "Series opener."
if leader and trailer:
return (
f"{leader['full']} leads {state['hi']}\u2011{state['lo']} "
f"\u2014 Game {state['game_number']} next."
)
return f"Series even {top_wins}\u2011{bot_wins}."
def _format_start(start_utc):
if not start_utc:
return "", ""