NotePlan / NotePlan/plugins

Occasional loss of a requiredFile in HTMLView

Abierto
#522 2 comentarios 0 reacciones 1 asignado Ver en GitHub

@EduardMe ya está trabajando en esto.

Desde el 27/1/2024.

bug P-5
Lenguaje dominante
JavaScript
Estrellas
204
Forks
82
Merge medio
22 h 27 min
PR fusionados (30 d)
3

Descripción

For some months I've had occasional examples of this behaviour: the Dashboard is open and an onSave trigger on the daily note correctly asks for an update to this display.

The right-hand part here is what is displayed. All the text is correct, and most but not all of the formatting is right.

As you may remember after generating the HTML and sending it to the API, I then persist a copy of it to a local file. The left-hand part here is what happens when I render that in Safari (my usual way of debugging complex HTML). This shows it completely as expected.
image
This happens I reckon about 1 refresh in 60, but I can't find more of a pattern than that. When I refresh the Dashboard it always corrects itself.
There are no errors or warnings in the log. Specifically this is happening on b1085 on my main machine; I'm keeping that on the 3.9.5 release to avoid the other major bug.

I've reverse engineered what is happening. There are two sources of CSS:

  1. contained in the main HTML that's generated.
  2. comes from a static dashboard.css file which is one of the "plugin.requiredFiles" defined for the plugin.

If I manually disable all uses of that file in the Safari debugger/inspector, it then looks exactly like the wrong image above. Therefore, I'm 99% sure that occasionally when an existing HTML window is being re-used, a requiredFile is somehow not read or applied.

Originally discussed in Discord thread

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.