evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
4.1k stars 193 forks source link

Page loads twice #2216

Closed hughess closed 3 weeks ago

hughess commented 1 month ago

Describe the bug

Page will load, then reload itself automatically. Example from this great project from Motherduck: https://duckdbstats.com/

Steps to Reproduce

Navigate to the URL and watch the page load. Wait 0-3 seconds and see it load again (the charts will animate twice).

Logs

No response

System Info

Happens on Mac with Chrome, Firefox, and Safari

Severity

serious, but I can work around it

Additional Information, or Workarounds

No response

zachstence commented 1 month ago

Seems like the chart re-animation is happening once all of the parquet files are loaded

https://github.com/user-attachments/assets/e2dad642-34f5-49a4-86cf-8df33fb33333

zachstence commented 1 month ago

This is not reproducible when running the dev server

Presumably, the first chart render is from SSR, then when the parquet loads we are reloading/re-animating it.

Looking for a fix now

zachstence commented 1 month ago

Likely related to not having column info available during prerendering