Klimatbyran / klimatkollen

https://www.klimatkollen.se
MIT License
36 stars 44 forks source link

Refactor and bugfixes: Improve routing, state management and caching for dataViews #544

Closed Greenheart closed 2 weeks ago

Greenheart commented 3 weeks ago

High level overview

This PR improves the perceived performance when navigating between data groups (companies vs municipalities), among other bugfixes and improvements related to the routing and data loading. Thanks to improved server side caching, data loads faster too, while using less RAM due to reduced duplication in the cache.

Most important changes

Remaining tasks

To solve in a future PR:

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
klimatkollen ✅ Ready (Inspect) Visit Preview May 13, 2024 9:49am
Greenheart commented 2 weeks ago

Good catch! The PillSwitch is now only responsible for rendering the links, which allows the parent component to update link href based on the selected dataset and dataView.

For companies, we don't need dynamic links yet as we only have one view.

Ready for final testing and review :)