Skip to content

fix(banlist): surface demo download in the player drawer - #26

Open
Rushaway wants to merge 1 commit into
mainfrom
fix/issue-1554
Open

fix(banlist): surface demo download in the player drawer#26
Rushaway wants to merge 1 commit into
mainfrom
fix/issue-1554

Conversation

@Rushaway

@Rushaway Rushaway commented Sep 3, 2026

Copy link
Copy Markdown
Member

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_detail returns demo_count, but renderOverviewPane() in
web/themes/default/js/theme.js never used it — the drawer Overview pane
had no demo affordance at all. getdemo.php?type=B&id=<bid> already
serves 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 to
getdemo.php?type=B&id=<bid>. New data-testid="drawer-demo-download".

Adds BanDrawerDemoDownloadTest pinning the wiring.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant