Skip to content

Widen registrants list and slim states card on event dashboard#1586

Open
maebeale wants to merge 1 commit into
mainfrom
maebeale/dashboard-registrants-width
Open

Widen registrants list and slim states card on event dashboard#1586
maebeale wants to merge 1 commit into
mainfrom
maebeale/dashboard-registrants-width

Conversation

@maebeale
Copy link
Copy Markdown
Collaborator

@maebeale maebeale commented Jun 7, 2026

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

  • The four headcount cards on the event dashboard (Registrants, Organizations, Sectors, States) were equal width.
  • The registrants list — the longest, most-read list — was cramped and truncated names early, while the short States list had width to spare.

How did you approach the change?

  • Switched the card row to a 12-column grid on lg and reallocated widths: Registrants col-span-4 (wider), Organizations/Sectors col-span-3 (unchanged), States col-span-2 (thinner).
  • Added each registrant's organization name(s) in muted parens next to their name, truncated to fit.
  • The full "Name (Org)" string is preserved in the link title, so hovering still surfaces both the registrant name and organization name even when the line is truncated.
  • Added EventDashboard#organization_names_by_registrant (deduped, sorted, multi-org aware) to back the labels, with a spec.

Anything else to add?

  • Org names reuse the existing snapshot + active-affiliation data already computed for the Organizations card, so no extra queries beyond the org lookup.
  • Mobile layout (2-up grid) is unchanged.

🤖 Generated with Claude Code

@maebeale maebeale marked this pull request as ready for review June 7, 2026 03:03
<ul class="space-y-1 text-xs text-gray-700 max-h-64 overflow-y-auto">
<% @dashboard.registrants.each do |registrant| %>
<% org_names = @dashboard.organization_names_by_registrant[registrant.id] %>
<li>
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: The full "Name (Org)" string is kept in the link title so hovering still reveals both even when the visible line truncates.

next unless name
person_ids.each { |person_id| map[person_id] << name }
end.transform_values { |names| names.uniq.sort }
end
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: Reuses the snapshot + active-affiliation map already built for the Organizations card, so labeling registrants adds no queries beyond the org-name lookup. transform_values returns a plain hash (no default block), so a registrant with no org reads as nil and is simply skipped.

The four headcount cards were equal width, leaving the registrants
list cramped while the short states list had room to spare. Give
registrants more horizontal room (and slim states) so longer names
fit, and annotate each registrant with their organization names so
affiliation is visible at a glance without opening each profile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/dashboard-registrants-width branch from 3d22c11 to 17bfc81 Compare June 7, 2026 03:42
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