Show "Other" service-area answers as additional sectors on the profile#1700
Merged
Conversation
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>
maebeale
commented
Jun 16, 2026
| display_leader: true, | ||
| is_leader: si.is_leader %> | ||
| <% end %> | ||
| <%= render "people/other_responses", responses: other_service_areas %> |
Collaborator
Author
There was a problem hiding this comment.
🤖 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.
maebeale
commented
Jun 16, 2026
| # 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 |
Collaborator
Author
There was a problem hiding this comment.
🤖 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theSector.excluding_otherscope) 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
Anything else to add?
Seeds now use main's
Sector.excluding_otherscope for consistency; Amy's seeded "Other: Equine-assisted therapy" demo answer still exercises the chip display.