Skip to content

Delete dead sweet-alert-confirm.js (#7306) - #7335

Merged
compwron merged 1 commit into
rubyforgood:mainfrom
KoushikSagarr:7306-remove-sweet-alert-confirm-js
Nov 3, 2026
Merged

compwron merged 1 commit into
rubyforgood:mainfrom
KoushikSagarr:7306-remove-sweet-alert-confirm-js

Conversation

@KoushikSagarr

@KoushikSagarr KoushikSagarr commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What github issue is this PR for, if any?

Resolves [#7306]

What changed, and why?

  • Deleted the obsolete app/javascript/sweet-alert-confirm.js confirmation handler.
  • Removed its unused import from app/javascript/application.js.
  • Confirmed that application views, components, and helpers no longer use the legacy data-confirm-swal attributes.
  • Preserved the existing sweetalert2 dependency because other JavaScript modules still import and use Swal directly.
  • Kept changes strictly limited to the obsolete confirmation handler and its application entry point.

This is another small, independently reviewable contribution toward removing obsolete JavaScript code from CASA.

How is this tested? (please write rspec and jest tests!) 💖💪

  • Jest: 15 test suites passed, 124 tests passed, 0 failures.
  • Asset build: npm run build && npm run build:css passed.
  • RSpec: spec/system/volunteers/edit_spec.rb — 36 examples, 0 failures.
  • Confirmation behavior: Verified volunteer deactivation confirmation behavior and delete confirmation flows. Additional system specs passed — 4 examples, 0 failures.
  • Git diff: git diff --check passed with no whitespace errors.
  • The existing sweetalert2 dependency was left unchanged.

Screenshots please :)

Not applicable — the existing confirmation behavior is preserved; this PR only removes the obsolete confirmation handler.

Feelings gif (optional)

Goodbye, obsolete confirmation handler. The dialogs still work, and the codebase gets a little cleaner! 💪

@github-actions github-actions Bot added the javascript Touches JavaScript code label Nov 3, 2026
@compwron
compwron merged commit 7bb9fd0 into rubyforgood:main Nov 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Touches JavaScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants