Show the primary service area consistently with a starred chip#1698
Merged
Conversation
maebeale
commented
Jun 16, 2026
| # registration form. Demote any other primary first to keep exactly one (a person | ||
| # registered for several events is enriched once per event). Idempotent. | ||
| primary_sector = sectors.first | ||
| if primary_sector |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: Demoting any other primary before setting this one keeps exactly one primary even when a person is enriched once per event they registered for — otherwise a multi-event registrant could end up with two starred sectors.
maebeale
commented
Jun 16, 2026
| <% display_leader ||= false %> | ||
|
|
||
| <% bg_color ||= DomainTheme.bg_class_for(:sectors) %> | ||
| <% is_primary ||= false %> |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: is_primary defaults to false, so the ~10 existing callers of this partial render unchanged; only the recipients page opts in.
The scholarship recipients page listed every sector identically, so a recipient's primary service area — the one they singled out on the registration form — was indistinguishable from the rest. Show it first with a gold star and a darker-green fill, mirroring the chip editor on the person edit page (minus the remove control). Seed the first submitted service area as the person's single primary SectorableItem so the demo data exercises this state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The person profile split sectors into "Primary sector" / "Additional sectors" columns; the people search table listed them flat. Both now render a single primary-first list reusing the recipients-page chip — the primary sector leads as a darker-green starred chip — so the primary reads the same way everywhere it appears. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Listing every sector made the search table noisy. Show just the primary sector as the darker-green starred chip — the same treatment used on the profile and recipients page — keeping the index scannable while the full set stays on the profile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Event staff cards listed sectors as plain compact badges with no primary distinction. Use the shared tagging_label chip — primary first, starred and darker — so the staff cards match the recipients page and the rest of the app. Also realign the people "Other" response spec with the profile's single combined Sectors list (the two-column layout is gone): assert the Other answer renders as a free-text "(other)" chip rather than the starred primary, instead of keying off the removed "Additional sectors" heading. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c17a2f7 to
1b24054
Compare
Collaborator
Author
The person profile's sectors block is now a single "Sectors" list instead of the "Primary sector" / "Additional sectors" columns, so the visibility spec keyed off the old heading. Point it at the new heading. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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?
How did you approach the change?
sectors/_tagging_label): added anis_primarylocal (defaults false). When set, the chip renders with a gold star (fa-star) + darker-green fill (bg-lime-200) and a "Primary service area" tooltip. All other callers are unaffected.sectorable_items_primary_first), with the primary starred — read-only.record_professional_answers): the first submitted service area becomes each registrant's single primarySectorableItem(demoting any other first), so demo data matches what they selected on the form.Rebase note
Rebased onto main, which now includes #1700 ("Show 'Other' service-area answers as additional sectors"). That's not a duplicate — it tweaked the old two-column profile layout to move the "Other" chip into the Additional column. Our single combined list already achieves that intent (the "Other" free-text chip renders after all sectors, never under/with the primary), so we kept our layout and realigned #1700's request spec to assert the Other chip renders as a free-text
(other)chip rather than keying off the now-removed "Additional sectors" heading. #1700's seed change (excluding_other) is complementary and preserved.Out of scope (follow-up PRs)
UI Testing Checklist
Anything else to add?