ConfBuddies icon indicating copy to clipboard operation
ConfBuddies copied to clipboard

Improve Event Attendees Index with event-specific title and hidden event column

Open Copilot opened this issue 5 months ago • 0 comments

This PR enhances the Event Attendees Index page to provide a more focused view when filtering by a specific event.

Changes Made

Controller Improvements

  • Added performance optimization by including profile data in the query when event_id is present
  • Set @event instance variable when event_id parameter is provided using a before_action callback
  • Maintained clean, readable code structure with proper separation of concerns

View Enhancements

When an event_id parameter is provided:

  • Title: Changes from "Event Attendees" to "#{event.name} Attendees" (e.g., "RubyConf 2024 Attendees")
  • Table: Hides the "Event" column since all attendees are for the same event

When no event_id is provided, the page maintains its original behavior showing all user's event attendances with both Profile and Event columns.

Testing

  • Added comprehensive feature tests in spec/features/event_attendees/index_spec.rb
  • Tests verify title changes and column visibility for both scenarios
  • All existing tests continue to pass

UI Impact

The changes provide a cleaner, more focused interface when viewing attendees for a specific event while maintaining full backward compatibility for the general attendees list.

Before (default view):

  • Title: "Event Attendees"
  • Columns: Profile | Event

After (with event_id):

  • Title: "RubyConf 2024 Attendees"
  • Columns: Profile only

Fixes #312.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Sep 12 '25 05:09 Copilot