☂️ Remove jQuery: convert the last legacy scripts to Stimulus

Ouverte
#7,301 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, jquery, rails
Domaine
frontend

Piste de recherche

This is a tracker, so pick one linked sub-issue (for example #7302 or #7305) and comment to get assigned rather than working on #7301 itself. Start from app/javascript/application.js and app/javascript/all_casa_admin.js to see which legacy files in app/javascript/src/ they still require, and read MIGRATION-MAP.md. Done means the sub-issue's file is removed or converted to a Stimulus controller in app/javascript/controllers/, with npm run test and bin/lint passing.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

🖥️ Frontend Help Wanted javascript

Goal

Remove jQuery (and the libraries that only exist for it: DataTables, the SweetAlert confirm shim) from the app. New JS is Stimulus (app/javascript/controllers/).

The Bootstrap → Tailwind page migration is already done: every page renders on a Tailwind layout, see MIGRATION-MAP.md. What's left is the legacy scripts in app/javascript/src/ that app/javascript/application.js and app/javascript/all_casa_admin.js still require. Several of them now target markup the redesign removed, so they're dead code.

Each sub-issue covers one file, one page, and one PR. Comment on a sub-issue to be assigned.

Sub-issues

Easy — dead code, delete it (Good First Issue)

  • #7302 emancipations.js
  • #7303 All-CASA tables.js + datatable.js
  • #7304 remove datatables.net-dt package (after #7302, #7303)
  • #7305 read_more.js
  • #7306 sweet-alert-confirm.js

Easy — small Stimulus swaps (Good First Issue)

  • #7308 volunteer edit: SMS reactivation button styling
  • #7309 case contacts filter → auto-submit
  • #7310 new case court-date toggle → reveal
  • #7311 reports export buttons

Intermediate

  • #7307 validated_form.js (delete + check one warning)
  • #7312 profile edit: password confirmation
  • #7313 profile edit: contact-method check
  • #7314 imports page

Advanced

  • #7315 emancipation checklist page
  • #7316 All-CASA patch notes page

Last

  • #7317 remove jQuery, notifier.js, type_checker.js (after all of the above)

Done when

  • No $( / jQuery left in app/javascript/
  • jquery, datatables.net-dt removed from package.json; app/javascript/jQueryGlobalizer.js deleted
  • This makes #6685 (jQuery 4 upgrade) and #7278 (DataTables 3 upgrade) moot. Close them when the removal lands.

Tips

  • Setup: bin/setup, then bin/dev. Logins are in the README.
  • JS tests: npm run test. Ruby/system tests: bundle exec rspec spec/system/...
  • Before pushing, run bin/lint.
  • See existing controllers such as auto_submit_controller.js, reveal_controller.js and disable_form_controller.js before writing a new one. One of them may already do what you need.
Langage dominant
Ruby
Étoiles
384
Forks
558
Merge moyen
1 j 7 h
PR mergées (30 j)
63

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de rubyforgood/casa

Toutes les issues de rubyforgood/casa

Issues similaires

Plus d'issues Ruby

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.