Skip to content

Feature/organizer comment notification toggle#412

Open
zhouyijun111 wants to merge 32 commits intosnap-cloud:mainfrom
cs169:feature/organizer-comment-notification-toggle
Open

Feature/organizer comment notification toggle#412
zhouyijun111 wants to merge 32 commits intosnap-cloud:mainfrom
cs169:feature/organizer-comment-notification-toggle

Conversation

@zhouyijun111
Copy link
Copy Markdown
Contributor

What this PR does

This PR adds an organizer-level toggle to control whether “proposal comment” notification emails are sent to organizers.

Changes

  • Database: Added users_roles.email_notifications (default: enabled).
  • Admin UI: Added an “Email notifications” switch on the conference organizer users list (AJAX-backed).
  • Backend: Implemented Admin::RolesController#toggle_comment_notifications to persist the preference.
  • Authorization: Updated AdminAbility to allow the toggle action.
  • Email delivery: Updated the comment-notification recipient scope so organizer users only receive emails when email_notifications = true.
  • Frontend: Improved osem-switch.js handling to prevent incorrect auto-triggering during initialization/cache restore.

Test plan

  1. Go to the admin page for a conference and open the organizer user list.
  2. Toggle “Email notifications” to No.
  3. Create a new proposal comment.
  4. Verify in letter_opener that no email is sent to that organizer.
  5. Toggle “Email notifications” back to Yes.
  6. Create another proposal comment.
  7. Verify in letter_opener that an email is sent.

Screenshot

image

Ethan-Stone1 and others added 30 commits March 4, 2026 09:39
The sign-up form silently fails when validation errors occur (e.g.,
duplicate username, password too short, password mismatch) because
the Devise registration views never render resource.errors.

Add error message rendering to the _form_fields partial so users
see clear feedback when registration fails.

Fixes #61
Fix registration form not displaying validation errors
Implement a new feature (Issue #54) to duplicate events within a conference
Replace legacy Stripe Charges API with modern Checkout Sessions API. Users are redirected to Stripe-hosted payment page with itemized ticket breakdown, multi-currency support, and session-based payment confirmation. Also fixes registration form error display, payment button layout, and various linter offenses.
zhouyijun111 and others added 2 commits April 5, 2026 21:51
…ment-notification-toggle

Made-with: Cursor

# Conflicts:
#	db/schema.rb
@zhouyijun111
Copy link
Copy Markdown
Contributor Author

@cycomachead Could you review this PR from the cs169:main repo to the golden repo? Thanks!

@cycomachead
Copy link
Copy Markdown
Member

This PR has some conflicts and contains payments and a few other fixes.

It's probably hard to back out the other merges, but if we could resolve the conflicts and open a payments-only PR that would make this easier to review

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.

4 participants