Eliminate use of jQuery

Aperta
#2,764 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

The payload names the local jquery.min.js copy and the sticky and espy libraries, which appear to be local jQuery-based forks, as the places to start. Find where the core JavaScript calls jQuery and where sticky and espy are used, then check the commits already linked from the issue to see what was removed. Done means no core JS depends on jQuery and the remaining uses are either removed or imported explicitly, but the issue does not list the remaining files, so confirm scope with maintainers first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Quoting @ascholerChemeketa from the mailing list:

I would expect some, but not tons, of work to move to the latest version. That said, a better goal would be to excise it from PreTeXt's JS. At this point in web development, if you are not working with legacy code that is deeply invested in JQuery, or you do not have a clear plan for why you are going to rely on JQuery to do something way more cleanly than would be possible with vanilla JS, you probably shouldn't bother with it.

I would suggest ripping the uses out of core JS files. If WW wants/needs jquery or wants to leverage it, that code should import jquery directly. I'd be happy to help with that at some point (though not right now).

The advantage to having the local copy of jquery.min.js is presumably helping make HTML builds work offline. Other than that reason, it would be better to point to the correct version of JQuery from a CDN. (Assuming no one has modified the minified local version).

sticky and espy appear to be local forks of jquery based libraries (https://github.com/darsain/espy). I can't see where they are getting used.

Using this issue to keep track of progress. A first big step was done in https://github.com/PreTeXtBook/pretext/commits/master/

Lingua principale
XSLT
Stelle
466
Fork
251
Merge medio
4m
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PreTeXtBook/pretext

Tutte le issue di PreTeXtBook/pretext

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.