Skip to content

Show "Other" service-area answers as additional sectors on the profile#1700

Merged
maebeale merged 1 commit into
mainfrom
maebeale/additional-sectors-profile
Jun 16, 2026
Merged

Show "Other" service-area answers as additional sectors on the profile#1700
maebeale merged 1 commit into
mainfrom
maebeale/additional-sectors-profile

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

A registrant's free-text "Other" service area isn't a concrete sector, so it shouldn't sit under the single Primary sector; it now displays alongside the Additional sectors on the person profile, which reads more accurately. This complements #1684, which removed "Other" from the live primary service-area dropdown.

How did you approach the change?

Moved the read-only "Other" chips from the Primary sector column to the Additional sectors column in people/show, and excluded the catch-all "Other" sector from the seeded service-area tags (via the Sector.excluding_other scope) so dev data never lists "Other" as a real service area. Updated the request spec to assert the chip renders in the Additional sectors section.

UI Testing Checklist

  • On a person profile with a free-text "Other" service-area answer, the chip appears under Additional sectors (not Primary sector).
  • A profile with only an "Other" answer and no additional sector tags still shows the chip under Additional sectors, while Primary sector reads "None selected."

Anything else to add?

Seeds now use main's Sector.excluding_other scope for consistency; Amy's seeded "Other: Equine-assisted therapy" demo answer still exercises the chip display.

A respondent's free-text Other service area isn't a concrete sector, so it
belongs alongside the additional sectors rather than under the single primary
sector. Seed data follows suit: the catch-all Other sector is the free-text
fallback, not a selectable service area, so exclude it from the seeded tags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
display_leader: true,
is_leader: si.is_leader %>
<% end %>
<%= render "people/other_responses", responses: other_service_areas %>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Moved the read-only "Other" chips here from the Primary sector column — a free-text "Other" answer isn't a concrete sector, so it reads as an additional sector. The section's guard now also fires on other_service_areas.any? so a profile with only an "Other" answer still renders.

# Exclude the catch-all "Other" sector: it's the free-text fallback registrants
# type into (surfaced via Person#other_service_area_responses), not a selectable
# service area. Seeding it as a sector tag would list "Other" as a real service area.
service_area_sectors = Sector.published.excluding_other.order(:name).to_a

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Excludes the catch-all "Other" sector from seeded service-area tags using main's new Sector.excluding_other scope, so dev data never lists "Other" as a real service area — it should only appear as a free-text answer (Amy's seeded demo).

@maebeale maebeale merged commit 7daefb1 into main Jun 16, 2026
4 of 5 checks passed
@maebeale maebeale deleted the maebeale/additional-sectors-profile branch June 16, 2026 21:36
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