Skip to content

Fix calendar issue and add admin-authored short description for "Add to calendar" links#1876

Merged
maebeale merged 3 commits into
mainfrom
maebeale/calendar-links-html
Jun 22, 2026
Merged

Fix calendar issue and add admin-authored short description for "Add to calendar" links#1876
maebeale merged 3 commits into
mainfrom
maebeale/calendar-links-html

Conversation

@maebeale

@maebeale maebeale commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 PR, suggested 👤 review level: 📖 Read — light-logic: small, contained logic changes with low blast radius

Calendar "Add to calendar" links were feeding the full rich show-page description (rhino_description) into each calendar entry, flattened with .to_plain_text. Calendars don't render that markup — ICS DESCRIPTION is plain text per RFC 5545, and the Google/Outlook/Yahoo URL params render HTML inconsistently — so admins had no real control over the calendar blurb.

Why: give admins a dedicated, plain-text short description, while keeping existing events unaffected.

  • New nullable events.short_description text column.
  • Decorator uses it when present, falls back to the flattened rhino_description when blank.
  • Field added to the videoconference section of the event admin form (full width, below the paired label/passcode row).
  • Permitted in EventPolicy.

Calendar entries (ICS DESCRIPTION is plain text per RFC 5545; the URL-based
providers render HTML inconsistently at best) were getting an auto-flattened
dump of the full rich show-page description. Give admins a dedicated plain-text
blurb instead, falling back to the flattened rhino_description when blank so
existing events are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread app/decorators/event_decorator.rb Outdated
event_description = object.rhino_description.to_plain_text
# Prefer the admin-authored, calendar-specific blurb; fall back to a
# flattened version of the rich show-page description when it's blank.
event_description = object.calendar_description.presence || object.rhino_description.to_plain_text

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: .presence is the fallback hinge — blank calendar_description (nil or empty) falls back to the flattened rich description, so every pre-existing event keeps its current calendar text unchanged.

maebeale and others added 2 commits June 22, 2026 11:50
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale changed the title Add admin-authored calendar description for "Add to calendar" links Add admin-authored short description for "Add to calendar" links Jun 22, 2026
@maebeale
maebeale marked this pull request as ready for review June 22, 2026 15:56
@maebeale maebeale changed the title Add admin-authored short description for "Add to calendar" links Fix calendar issue and add admin-authored short description for "Add to calendar" links Jun 22, 2026
@maebeale
maebeale merged commit 17932bf into main Jun 22, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/calendar-links-html branch June 22, 2026 16:07
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