Skip to content

Add "Event" to all chapter pages - #2721

Merged
mroderick merged 1 commit into
codebar:masterfrom
Agboolafeyikemi:feature/add-all-chapters-to-events
Jul 28, 2026
Merged

Add "Event" to all chapter pages#2721
mroderick merged 1 commit into
codebar:masterfrom
Agboolafeyikemi:feature/add-all-chapters-to-events

Conversation

@Agboolafeyikemi

Copy link
Copy Markdown
Contributor

Description

Adds an "Add to all" option at the top of the Chapters dropdown on the admin event form, so organisers can invite every chapter with one click instead of ticking each chapter individually.

This implements option 2 from the discussion on the issue (the in-dropdown "Add to all" entry), which @KimberleyCook preferred.

Closes #2490

Changes

  • New add-all-chapters.js: injects a bold "Add to all" row at the top of the Chosen dropdown for the chapters field. Clicking it selects every chapter, refreshes the widget, and closes the dropdown.
  • Small style block in main.scss for the new row (bold, pointer cursor, hover highlight).
  • Playwright feature spec covering the flow end-to-end: open the dropdown, click "Add to all", verify the dropdown closes, save, and assert the event is linked to every chapter.

How to test

  1. Sign in as an admin and open /admin/events/new (or edit an existing event).
  2. Scroll to Invitation details → Chapters and click into the field.
  3. Click the bold Add to all entry at the top of the dropdown.
  4. All chapters are selected and the dropdown closes.

Or run the spec:

bundle exec rspec spec/features/admin/manage_event_spec.rb

@mroderick

Copy link
Copy Markdown
Collaborator

Thank you for this PR!

During the local verification, I came across an existing blocking issue in the codebase. I've created a fix in #2723, which should be merged first. I imagine we'll get that reviewed soon, after which I'll merge this one 🚀

@mroderick
mroderick force-pushed the feature/add-all-chapters-to-events branch from a756d65 to bb2fc29 Compare July 28, 2026 12:34
Adds an "Add to all" option at the top of the chapters dropdown on the
admin event form so organisers can invite every chapter with one click
instead of selecting each chapter by hand. Includes a Playwright
feature spec covering the new behaviour.

Closes codebar#2490.
@mroderick
mroderick force-pushed the feature/add-all-chapters-to-events branch from bb2fc29 to e7019db Compare July 28, 2026 12:35

@mroderick mroderick left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have verified this locally 👍

@mroderick
mroderick merged commit 3363602 into codebar:master Jul 28, 2026
10 checks passed
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.

Add "Event" to all chapter pages

2 participants