Skip to content

Add Event abbreviation and surface it in compact/event contexts#1995

Merged
maebeale merged 1 commit into
mainfrom
maebeale/event-abbreviation
Jul 15, 2026
Merged

Add Event abbreviation and surface it in compact/event contexts#1995
maebeale merged 1 commit into
mainfrom
maebeale/event-abbreviation

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 small additive change: a new column + a display helper applied in a few compact spots, with a fallback to the full title

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

  • Long event titles are noisy in tables and cross-event lists. This adds an admin-set abbreviation (e.g. TOS205) and uses it where a compact label reads better, falling back to the full title when none is set.
  • Split out from Remove program status from org-wide UI #1993 so the abbreviation field can land on its own.

How did you approach the change?

  • Event#abbreviation (string) + a form field + policy param.
  • EventDecorator#compact_labelabbreviation.presence || title. Applied to:
    • the revenue report's per-event rows,
    • the event dashboard and background header links (full title preserved as a title= tooltip).
  • The org profile's admin-only "Program status by event" chips label each event by its compact_label and classify the org as of that event's start_date.

Anything else to add?

  • Only events that actually have an abbreviation are affected anywhere; everything else still shows the full title.
  • Screenshots to follow.

Adds an admin-set short code (e.g. "TOS205") to events and uses it wherever a
full event title is too long or repeated across many events, falling back to the
title when no abbreviation is set.

- Event#abbreviation column + event-form field + policy param.
- EventDecorator#compact_label => abbreviation or title; used on the revenue
  report's per-event rows and the dashboard/background header links (full title
  kept as a tooltip).
- Org profile "Program status by event" chips: classify the org as of each
  event's start date and label the chip with the event's compact_label.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 15, 2026 05:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

maebeale added a commit that referenced this pull request Jul 15, 2026
New/Reinstate/Ongoing can only be determined relative to a specific event, so
showing it as a global org attribute was misleading. Per-event program status is
surfaced on the org profile in a separate PR (event abbreviations, #1995).

- Drop the admin-only "Program" column from the org index.
- Drop the now-orphaned Organization.program_statuses_by_id bulk classifier.
- Drop the "Program status" block from the org edit form's Affiliations section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
def compact_label
object.abbreviation.presence || object.title
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: Single source of truth for the abbreviation-or-title fallback. Callers pair it with title="<full title>" so an unfamiliar abbreviation is never ambiguous.

# already-loaded affiliations so a profile can classify many events without an
# N+1. No facilitator affiliation starting before the date => :new; an earlier
# one still active on the date => :ongoing; all earlier ones ended => :reinstated.
def facilitator_status_as_of(date)

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: Computed in-memory over the already-loaded affiliations (not the DB-backed Organization#facilitator_status_on) so classifying a page of ~9 events on the profile does not fire 2 queries per event.

@maebeale maebeale marked this pull request as ready for review July 15, 2026 05:12
@maebeale maebeale merged commit 0bee35a into main Jul 15, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/event-abbreviation branch July 15, 2026 05:21
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.

2 participants