plotly / plotly/dash

clarify "soft" reloading of CSS during hot reload events requires that hard = TRUE

Aperta
#977 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

documentation P3
Lingua principale
Python
Stelle
24.4k
Fork
2.3k
Merge medio
2g 7h
PR unite (30g)
13

Descrizione

In the current implementation of hot reloading, a JSON response containing four keys is provided by the backend whenever asset changes are detected and a reload event is in progress:

https://github.com/plotly/dash/blob/74b4c2e86bdfa7832914567c40e368fc5f5532a8/dash/dash.py#L508-L514

The original intent of the "hard" key was to identify reload events in which only CSS files have been updated. In this situation, the page would refresh CSS without re-rendering the page layout. However, @alexcjohnson and I observed that CSS (soft) reloading does not appear to work properly unless "hard": true. It seems that "hard" may always be true, so that this flag has essentially no effect.

For the moment, it appears that "is_css" (a key nested within the "files" key) actually serves this purpose, and "hard" is unused. We may wish to remove references to "hard" from both Dash for Python and R .

@Marc-Andre-Rivet

Guida per i contributori

Apri la 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.

Direzione di ricerca

Leggi dash/dash.py alle righe collegate 508-514 e traccia come la chiave di risposta "hard" e files.is_css vengono utilizzate durante l'hot reload. Confronta i riferimenti Python e R per determinare se "hard" è inutilizzata o necessaria. Il lavoro è completato quando il comportamento del flag o la sua rimozione è coerente in entrambe le implementazioni e il comportamento del reload limitato al CSS è chiarito.

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

Valutazione

Stack tecnologico
python, r
Ambito
backend, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.