Skip to content

Ballot question 2024 data#55

Merged
LexaMichaelides merged 38 commits intofeat/ballot-questionsfrom
ballot-questions-2024-fix
Apr 23, 2026
Merged

Ballot question 2024 data#55
LexaMichaelides merged 38 commits intofeat/ballot-questionsfrom
ballot-questions-2024-fix

Conversation

@tripledoublev
Copy link
Copy Markdown
Member

@tripledoublev tripledoublev commented Apr 20, 2026

Summary

  • Add 2024 ballot-question synthesis data and the new Synthesis & Insights tab
  • Populate vote-effect and fiscal-consequence content from the 2024 voter guide
  • Add 2024 campaign-finance data and render a Campaign Financials tab
  • Correct Question 2 petition ID to 23-36

YAML shape

Each 2024 ballot-question fixture now includes these phase-1 fields:

  • description
  • atAGlance
  • fullSummary
  • voteEffectYes
  • voteEffectNo
  • fiscalConsequences
  • inFavor
  • against
  • campaignFinancials with support and oppose committee arrays

Validation

  • yarn check-types
  • yarn check-formatting
  • yarn lint

Notes

  • Local Firestore emulator was seeded for browser review

@tripledoublev tripledoublev changed the base branch from main to visual-system-search-pages April 20, 2026 18:09
@tripledoublev tripledoublev changed the title Ballot question synthesis v1 Ballot question synthesis and campaign-finance v1 Apr 20, 2026
@tripledoublev tripledoublev force-pushed the ballot-questions-2024-fix branch from b660a13 to 2c4016a Compare April 20, 2026 20:38
@LexaMichaelides
Copy link
Copy Markdown
Member

LexaMichaelides commented Apr 22, 2026

Requests:

  • Move the vote effects and statement of fiscal consequences to the Overview tab
  • Add a "For and Against" tab containing the inFavor and Against content
  • Add components to identify the authors of the inFavor and Against content
  • Add tooltip disclaimer for the "For and Against" tab:

As provided by law, the 150-word arguments are written by proponents and opponents of each question, and reflect their opinions. The Commonwealth of Massachusetts does not endorse these arguments, and does not certify the truth or accuracy of any statement made in these arguments. The names of the individuals and organizations who wrote each argument, and any written comments by others about each argument, are on file in the Office of the Secretary of the Commonwealth.

  • Add some explanatory text on the Campaign Financials tab
    • Cash raised: monetary contributions made directly to the campaign
    • Spent: cash spent by the campaign to support its objectives
    • In-kind: cash value of contributions to the campaign made in goods, services, or commodities
    • Total: value of cash and in-kind expenditures made by the campaign

@tripledoublev
Copy link
Copy Markdown
Member Author

tripledoublev commented Apr 22, 2026

  • Moved vote effects and fiscal consequences to Overview: added to OverviewTab, removed Synthesis tab
  • Added For & Against tab: created ForAndAgainstTab with inFavor and against arguments
  • Added author identification: committee names from campaign financials displayed above each argument
  • Added disclaimer for For & Against tab: full legal disclaimer displayed as descriptive text below Arguments heading
  • Added explanatory text on Campaign Financials tab: tooltips added to all four metrics with descriptions for cash raised, cash spent, non-cash donations raised, and total cash value

@tripledoublev tripledoublev changed the title Ballot question synthesis and campaign-finance v1 Ballot question 2024 data Apr 22, 2026
@LexaMichaelides
Copy link
Copy Markdown
Member

LexaMichaelides commented Apr 23, 2026

Campaign Financials

Sorry for the back and forth on this. Per MV's confirmation, let's change our headers and tooltips to:

  • Receipts: contributions made in cash to the campaign
  • Expenditures: cash spent by the campaign to support its objectives
  • Inkinds: cash value of contributions to the campaign made in goods, services, or commodities
  • Total: value of cash and in-kind expenditures made by the campaign

And introduce some visual separation between 'receipts' (which is the only category that is about raising money) and all the others (which are about spending money). Maybe just a vertical line, between receipts and everything else? There is a complicated thing we're trying to communicate where 'receipts' is inflow, 'expenditures' is outflow, and 'inkind' is somehow both, but the 'total' is only reflecting the total outflows.

General YAMLs

For the 2024 ballot question fields we've added, I'd like them to always be present but null if the information is not available yet so that the admin has an easier time just filling in fields instead of creating them, and the tabs still show up but don't contain any info yet. This is most important for identifying the support/oppose committees right off the bat on the for/against tab.

Currently, I can't populate those fields with null for the 2026 questions.

@tripledoublev
Copy link
Copy Markdown
Member Author

Does "the tabs still show up" mean the tab sections in the YAML file are present (so you can fill them in), or do you mean the UI tabs on the ballot question page are visible even before the fields are populated?

@LexaMichaelides
Copy link
Copy Markdown
Member

Does "the tabs still show up" mean the tab sections in the YAML file are present (so you can fill them in), or do you mean the UI tabs on the ballot question page are visible even before the fields are populated?

I think we have some YAML fields to adjust as well based on my response 🤔
supportCommittee and opposeCommittee should be their own top-level fields since that info is relevant both for the financials and the for/against tab.

Then we would expect that the admin fills out the supportCommittee and opposeCommittee info quite early on (info is available even now for 2026).

Then my response is:

  • UI tabs are still visible
  • If 'inFavor' and 'against' are null, the tab only identifies the relevant committees and says that no official statements have been made.
  • If all of the campaign financial fields are null, the tab says the information is not yet available.

@tripledoublev
Copy link
Copy Markdown
Member Author

tripledoublev commented Apr 23, 2026

  • renamed campaign financials metrics to Receipts, Expenditures, Inkinds, Total with updated tooltips text
  • grouped Expenditures/Inkinds/Total with a distinct background color to communicate they are a separate category from Receipts (inflow vs. outflow)
  • added supportCommittee and opposeCommittee as top-level fields on the BallotQuestion type and YAMLs - backfilled supportCommittee/opposeCommittee on 2024 YAMLs from existing campaign finance data
  • added all ballot question fields as null placeholders to all 11 2026 YAMLs so admins can fill them in without needing to create new keys
  • Campaign Financials tab now always visible; shows "not yet available" message when campaignFinancials is null

Question: the For/Against tab will only show committee names and "No official statement has been made" once supportCommittee/opposeCommittee are filled in. Should I add a statement that mentions the information is not yet available?

Edit: See comments below for full list of changes.

@LexaMichaelides
Copy link
Copy Markdown
Member

Changes:

  • On the 2026 questions, Campaign Finance tab, the text still refers to 2024 ballot questions: "Committee receipts and expenditures from the 2024 ballot question filings. View source reports"
    • Let's make sure that the year updates dynamically for questions in new years.
    • Change "View source reports" to "Reports for all ballot questions available here" because I think that OCPF page link is going to always reflect the most recent year that has reports available. So theoretically in 2028, someone might be looking at a 2024 question, click the link, and end up looking at the list of 2028 reports.
  • In the Overview tab, the component that reads "Voting YES means" should just say "Voting YES" since the text lifted directly from the voter guide always beings with "A YES VOTE would..."
  • De-duplicate the committee field in BQ YAMLs. We have both a top-level supportCommittee and a nested campaignFinancials > support > committee field that hold the same info. The admin should just have to put it in once in the top-level supportCommittee field.
  • committee fields should be just string | null, not string[] | null.

@tripledoublev tripledoublev changed the base branch from visual-system-search-pages to feat/ballot-questions April 23, 2026 20:07
tripledoublev and others added 17 commits April 23, 2026 16:16
Per focus group feedback, the vote effects and fiscal consequences sections are important but don't warrant their own tabs. Moved them to the Overview tab and removed the Synthesis tab entirely.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Create new ForAndAgainstTab component to display official proponent/opponent arguments from the voter guide
- Enable for_against tab in navigation when ballot question has inFavor or against arguments
- Update Campaign Financials metric labels for clarity: "Spent" → "Cash spent", "In-kind" → "Non-cash donations raised", "Total" → "Total cash value of campaign"
- Add tooltip explaining total calculation (cash raised + non-cash donations)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add proponent committee names from campaign financials above each argument section in the For & Against tab.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add disclaimer tooltip to For & Against tab explaining that arguments are written by proponents/opponents and reflect opinions, not Commonwealth endorsement
- Add full explanatory tooltips to Campaign Financials metric labels:
  - Cash raised: monetary contributions made directly to the campaign
  - Cash spent: cash spent by the campaign to support its objectives
  - Non-cash donations raised: cash value of contributions in goods, services, or commodities
  - Total cash value: value of cash and in-kind expenditures made by the campaign

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Move the legal disclaimer from a tooltip on the Arguments heading to the paragraph below for better readability and visibility. The disclaimer explains that arguments are written by proponents/opponents and reflect opinions, not Commonwealth endorsement.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
tripledoublev and others added 15 commits April 23, 2026 16:16
The section headings are self-explanatory, so remove the redundant tooltips.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Adds voteEffectYes, voteEffectNo, fiscalConsequences, inFavor, against,
supportCommittee, opposeCommittee, and campaignFinancials as null so
admins can fill them in without creating new keys.
Campaign financials:
- Rename metrics to Receipts, Expenditures, Inkinds, Total with updated tooltips
- Fix Total to reflect spent + inKind (outflows only)
- Group Expenditures/Inkinds/Total in a distinct muted surface to
  communicate they are a separate category from Receipts

For & Against tab:
- Show support/oppose committee names from new top-level fields
- Always show the tab; display 'No official statement has been made'
  when inFavor/against are null but a committee is identified
- Campaign financials tab always shown; empty state when data unavailable
…el fields

- supportCommittee/opposeCommittee changed from string[] to string
- Remove committee field from CampaignFinanceEntry; CampaignFinancialsTab
  now reads committee name from top-level supportCommittee/opposeCommittee
- ForAndAgainstTab updated for string type
@tripledoublev tripledoublev force-pushed the ballot-questions-2024-fix branch from 87545f1 to 2657618 Compare April 23, 2026 20:17
@tripledoublev
Copy link
Copy Markdown
Member Author

Follow-up on the above:

  • Added supportCommittee and opposeCommittee as top-level string fields on BallotQuestion type and all
    YAMLs 8e67cc1
  • Backfilled supportCommittee/opposeCommittee on 2024 YAMLs from existing financial data 60304eb
  • Removed committee from campaignFinancials entries — committee name now read from top-level fields
    6c7f89a
  • Added all ballot question fields as null placeholders to 11 2026 YAMLs f6dcabd
  • For/Against tab: shows both cards when any committee is known; "Committee information is not yet
    available" when neither is 03124f4
  • Campaign Financials tab always visible; "not yet available" message when campaignFinancials is null
    2b0411b
  • Renamed metrics to Receipts / Expenditures / Inkinds / Total; fixed Total to outflows only; grouped
    spending metrics visually 2b0411b
  • Election year in Campaign Financials description now dynamic 3013df5
  • Removed "means" from Voting YES / Voting NO headings 091f8e1
  • Updated OCPF link text to clarify it lists reports across all years 4f8ffd0

@LexaMichaelides
Copy link
Copy Markdown
Member

yeet, looks great

@LexaMichaelides LexaMichaelides merged commit 4724996 into feat/ballot-questions Apr 23, 2026
8 checks passed
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.

2 participants