Skip to content

fix(results): name and link Bloc STAR on the results page - #1475

Draft
masiarek wants to merge 2 commits into
Equal-Vote:mainfrom
masiarek:fix/results-bloc-star-name-and-link
Draft

fix(results): name and link Bloc STAR on the results page#1475
masiarek wants to merge 2 commits into
Equal-Vote:mainfrom
masiarek:fix/results-bloc-star-name-and-link

Conversation

@masiarek

@masiarek masiarek commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Draft — depends on #1474. The learn_link added here points at docs.bettervoting.com/help/bloc_star.html, which is the page #1474 adds. Merging this first would ship a 404. Ready to un-draft the moment #1474 lands (or immediately, if you'd rather point it somewhere else — see below).

The results-page half of #1086. A STAR race with more than one seat is Bloc STAR, but the method is stored as plain "STAR" with the seat count in a separate field (num_winners), so Results.tsx had no way to know and:

  • Location 1 — the label under the winner announcement read "Voting Method: STAR Voting".
  • Location 2 — the help link read "How STAR Voting works" and pointed at methods.star.learn_link, the single-winner explainer.

Both come from the same two lines, so both are fixed by deriving the bloc case once:

const isBlocStar = votingMethodBase === 'STAR' && race.num_winners > 1;
const methodKey = isBlocStar ? 'star_bloc' : methodValueToTextKey[votingMethodBase];

plus a methods.star_bloc block (full_name: Bloc STAR Voting, short_name: Bloc STAR, learn_link) alongside the existing star / star_pr entries.

Scope — deliberately narrow, three things left alone:

  1. The stored value is untouched. votingMethod: "STAR" + num_winners is arguably correct — the field names the ballot/tabulation family and the seat count names the seats, making "Bloc STAR" a derived label. This PR treats it that way and derives it at the display layer only. (Reasoning and the exact export lines: BV129 note.)
  2. The "Edit Race" modal (UI displays 'STAR Voting' instead of 'Bloc STAR' and has incorrect help link #1086 problem area 1) is not fixed here. It has its own composition path (edit_race.bloc_multi_winner_adj), and doing it properly means deciding how the adjective composes for every method — Bloc Approval, Bloc Ranked Robin, multi-winner Plurality — which is a naming decision for maintainers, not a drive-by. Same reason Method name is incorrect - BV18 - Basic - Plurality - 5 candidates - 2 seats #912 and BV1820 - method names - STAR - STAR Bloc - STAR PR #904 exist.
  3. useSubstitutedTranslation's methodKey (line ~450) is untouched — it feeds term substitution across many strings, and widening it is a separate blast radius.

So #1086 shouldn't be auto-closed by this; it should lose one of its three problem areas.

Translations: en-only. es / pl / pt-BR each carry a methods: block, so a missing star_bloc falls back to English rather than rendering a key — same behaviour as any newly added string.

Alternative if you don't want #1474: point methods.star_bloc.learn_link at https://electowiki.org/wiki/Bloc_STAR_Voting, as #1086 originally suggested, and this becomes independent and mergeable today.

Screenshots / Videos (frontend only)

Text-only change to an existing label and an existing anchor — no layout, no new elements. On a 2-seat STAR race the label reads "Voting Method: Bloc STAR Voting" and the link reads "How Bloc STAR Voting works".

Related Issues

Part of #1086 (results-page half only — see scope above). Follows #1474.

🤖 Generated with Claude Code

masiarek and others added 2 commits August 4, 2026 08:28
A STAR race with more than one seat is Bloc STAR, but the method is stored
as plain "STAR" with the seat count in a separate field, so the results page
labelled it "STAR Voting" and pointed "How STAR Voting works" at the
single-winner explainer. Derive the bloc case where the page names the method.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A STAR race with more than one seat is Bloc STAR, but the method is stored
as plain "STAR" with the seat count in a separate field, so the results page
labelled it "STAR Voting" and pointed "How STAR Voting works" at the
single-winner explainer. Derive the bloc case where the page names the method.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy Preview for bettervoting ready!

Name Link
🔨 Latest commit 63db016
🔍 Latest deploy log https://app.netlify.com/projects/bettervoting/deploys/6a71db15917f5a00082415c0
😎 Deploy Preview https://deploy-preview-1475--bettervoting.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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