fix(march-madness): stop the final-game date landing inside the score - #407
Open
ChuckBuilds wants to merge 1 commit into
Open
fix(march-madness): stop the final-game date landing inside the score#407ChuckBuilds wants to merge 1 commit into
ChuckBuilds wants to merge 1 commit into
Conversation
A finished game drew its date at height - 6 with a 6px font, while the 10px score started at height - 13. The score therefore occupied rows height-13 to height-3 and the date rows height-6 to height: three shared rows, with the date sitting inside the score digits. Both are offsets from height, so this happened at every panel size rather than only on short ones, and the safety harness cannot see it -- nothing overflows and nothing crashes. The score now lifts by six rows when a date is coming. Verified at 256x32 and 256x48, the two harness shapes where a final card fits. README: real rendered screenshots of the three game states, the show_seeds, show_round_logos and highlight_upsets toggles (each hash-compared to confirm it changes the render), and four panel sizes. All 17 settings were already documented and their defaults were correct. Two corrections. show_bracket_progress is marked not implemented -- it is assigned in __init__ and never read again, so nothing on the panel changes, and the README had described it as showing which teams are still alive (#406). The highlight_upsets wording said "higher seed beating lower seed", which is ambiguous; it now says a bigger seed number beating a smaller one. Also drops three unused imports (datetime.timedelta, datetime.timezone and numpy) that pyflakes flags -- the timezone work goes through pytz. check_plugin.py: 8/8 pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
A finished game draws its date under the score. The two were positioned independently:
Three shared rows, so the date sat inside the score digits. Because both are offsets from
height, it happened at every panel size, not just short ones — and the safety harness cannot catch it: nothing overflows, nothing crashes.74-71with a grey3/21overlapping the lower third of the digitsThe score now lifts by six rows when a date is coming. Verified at 256x32 and 256x48 — the two harness shapes where a final card fits on screen.
README
All 17 settings were already documented, and their defaults all check out against the schema. What it lacked was images, so this adds real renders of the three game states (live, an upset final, one not yet tipped off), the three visible toggles, and four panel sizes. Each toggle pair was hash-compared to confirm the setting actually changes the output:
Games are seeded onto the plugin instead of fetched from ESPN; teams, seeds and scores are invented. The team marks are the logo assets the plugin already ships — nothing is downloaded into the tree.
Two corrections
show_bracket_progressis not implemented. It is assigned in__init__and never read again — no reference in the render path — yet the README described it as showing which teams are still alive in each region. Marked as not implemented and filed as march-madness: show_bracket_progress is read and never used #406; whether to build it or drop it is your call, so I have not touched the schema.highlight_upsetssaid "higher seed beating lower seed", which is ambiguous in the direction that matters. The code testsaway_seed > home_seed > 0, so it now reads "a bigger seed number beating a smaller one — an 11 seed past a 1 seed".Also drops three unused imports (
datetime.timedelta,datetime.timezone,numpy) that pyflakes flags; the timezone work goes throughpytz.Checks
check_plugin.py: 8/8 passrender_docs_assets.py --check: all six images reproduceorigin/main, which now carriessports_sharedfrom LEDMatrix#5151.0.6 → 1.1.0.
🤖 Generated with Claude Code