Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Load the print and worksheet code only when printing

Aperta
#2,546 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
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

Start in public/app/yjs/yjs-loader.js to see how group 3 pulls in exporters.bundle.js, then find where the print and worksheet modules are imported (the change from #2539). The work is to split those modules into a separate bundle that loads on first print-preview open, while the shared export code still runs under Node for the server and CLI. Done when editor start no longer loads parse5, css-tree or the worksheet code, every print path passes its unit and E2E tests (static mode included), and the start bundle is near its pre-#2539 size.

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

Descrizione

#2539 put the print and worksheet code in exporters.bundle.js, which the editor loads at every
start (public/app/yjs/yjs-loader.js, group 3). The bundle grew from about 320 KB to 681 KB
(+112 % in the Codecov bundle report), although few sessions print.

Part Minified size
parse5 166 KB
css-tree 65 KB
Worksheet adapters and renderer about 115 KB

Proposal

Move the print and worksheet modules to a separate bundle, loaded the first time the print
preview opens. exporters.bundle.js keeps what the editor needs at start.

Constraints:

  • The shared export code also runs on the server and in the CLI, so parse5 cannot simply be
    replaced by DOMParser. A browser-only parser would have to be injected.
  • Static mode and the desktop app must load the new bundle the same way.
  • The print preview, Print iDevices and the document's appendix must behave as they do now.

Done when

  • Starting the editor no longer loads parse5, css-tree or the worksheet code.
  • Opening the print preview loads them once, and every print path works as before (unit and
    E2E tests, static included).
  • The bundle loaded at editor start is back near its size before #2539.

Raised by @erseco in the review of #2539.

Lingua principale
JavaScript
Stelle
145
Fork
33
Merge medio
3g 14h
PR unite (30g)
93

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 exelearning/exelearning

Tutte le issue di exelearning/exelearning

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.