refactor(js): remove dead Chosen code from invitations.js - #2822
Merged
Conversation
mroderick
force-pushed
the
feature/remove-dead-invitations-js
branch
from
August 30, 2026 05:53
ba13a4f to
b101562
Compare
The ajax:success handler had two branches: - verify_attendance: still used for row replacement after attendance clicks - else: replaced entire #invitations and re-initialised Chosen on selects The else branch is dead: no <select> elements exist in #invitations anymore (workshops have no selects, meetings use TomSelect, events have a commented-out select). Also removed the dead change handler for #workshop_invitations, which was a Chosen dropdown removed from the view in commits bd9752b7 and 9d0eb97 (replaced with an RSVP page link).
mroderick
force-pushed
the
feature/remove-dead-invitations-js
branch
from
August 30, 2026 05:55
b101562 to
c9076c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Prunes dead Chosen-related code from
app/assets/javascripts/invitations.js.Why
The
ajax:successhandler had two branches:verify_attendance— still used for targeted row replacement after attendance verify/unverify clickselse— replaced entire#invitationscontainer and re-initialised Chosen on any<select>inside itThe
elsebranch is dead code: no<select>elements exist in any#invitationscontainer anymore:admin/workshops/_invitation_management— no selectsadmin/meetings/_invitation_management— uses TomSelect (class: 'tom-select')admin/events/_invitation_management— select is commented outAlso removed the dead
changehandler for#workshop_invitations, which has no matching element in the DOM.What stays
The
verify_attendancerow replacement and tooltip re-initialisation is still needed and untouched.Testing
bundle exec rspec spec/features/admin/manage_workshop_attendances_spec.rb— 7 scenarios, 0 failuresbundle exec rspec spec/features/managing_workshop_attendance_spec.rb— 28 scenarios, 0 failures