fix(banlist): surface demo download in the player drawer - #26
Open
Rushaway wants to merge 1 commit into
Open
Conversation
The SourceBans 1.x sliding ban panel rendered a "Review Demo" link when a ban had an uploaded demo. The 2.0 player drawer dropped it: `bans.detail` still returns `demo_count`, but `renderOverviewPane` in theme.js never turned it into a download affordance, so demos attached to bans were unreachable from the review surface. Add a "Download demo" button to the Overview pane (ban-focal only) linking to `getdemo.php?type=B&id=<bid>` when `demo_count > 0`. Ports sbpp#1554. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Problem
Upstream issue sbpp#1554: the button to download a banned
player's demo is missing. In SourceBans 1.x the sliding ban panel showed
a "Review Demo" link; the 2.0 player drawer never rendered one.
Root cause
api_bans_detailreturnsdemo_count, butrenderOverviewPane()inweb/themes/default/js/theme.jsnever used it — the drawer Overview panehad no demo affordance at all.
getdemo.php?type=B&id=<bid>alreadyserves ban demos; nothing linked to it from the review surface.
Fix
Add a "Download demo" button to the drawer Overview pane (ban-focal only,
comm-blocks have no demo column) when
demo_count > 0, linking togetdemo.php?type=B&id=<bid>. Newdata-testid="drawer-demo-download".Adds
BanDrawerDemoDownloadTestpinning the wiring.🤖 Generated with Claude Code