Skip to content

Show sector names in their stored casing (filter + story-shares header)#1921

Merged
maebeale merged 2 commits into
mainfrom
maebeale/sector-dropdown-casing
Jun 26, 2026
Merged

Show sector names in their stored casing (filter + story-shares header)#1921
maebeale merged 2 commits into
mainfrom
maebeale/sector-dropdown-casing

Conversation

@maebeale

@maebeale maebeale commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

🤖 PR, suggested 👤 review level: 👀 Skim — view-only: removes a .humanize/.titleize on two sector labels, no logic or data changes

What & why

Two display sites distorted intentionally-cased sector names ("LGBTQIA+", "Child Abuse/Neglect", "Self-Care/Personal Growth"). Both now render the name as stored, matching the Sectors admin.

  • Workshops Sector filter (_dropdown_filter.html.erb) — dropped .humanize ("LGBTQIA+""Lgbtqia+"). The same shared partial feeds the Windows audience filter, whose labels ("Adult"/"Children"/"Combined") are already sentence case and unaffected.
  • Story shares sector header (story_shares/_sector_index.html.erb) — dropped .titleize; render the already-parsed @sector_names_all instead.

I audited every other sector display site (forms, tag chips, admin, dashboard, decorators) — all already render sector.name verbatim, no other offenders.

Tests

  • Request spec asserts the workshops filter keeps canonical casing (LGBTQIA+, not Lgbtqia+).

maebeale and others added 2 commits June 25, 2026 21:32
The sector filter dropdown ran every label through .humanize, which
flattened intentionally-cased sector names ("LGBTQIA+" → "Lgbtqia+",
"Child Abuse/Neglect" → "Child abuse/neglect"). Render the label as
stored so the dropdown matches the canonical name shown in the Sectors
admin. Windows audience labels ("Adult"/"Children"/"Combined") are
unaffected since they're already sentence case.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Same casing-distortion class as the workshops filter: .titleize flattened
canonical sector names ("LGBTQIA+" → "Lgbtqia+", "Self-Care/Personal
Growth" → "Self Care/Personal Growth") in the story-shares sector index
header. Render the already-parsed @sector_names_all as-is instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale changed the title Show workshop sector filter labels in their stored casing Show sector names in their stored casing (filter + story-shares header) Jun 26, 2026
@maebeale maebeale marked this pull request as ready for review June 26, 2026 01:41
@maebeale maebeale merged commit 76d5d19 into main Jun 26, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/sector-dropdown-casing branch June 26, 2026 01:48
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