plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
19k stars 1.02k forks source link

Fix with imported switch + warning bubble renders #4187

Closed RobertJoonas closed 1 month ago

RobertJoonas commented 1 month ago

Changes

The main goal of this PR was to fix some behaviour with the dashboard "with-imported" switch and move its logic into the backend, making its intent more clear and easily testable. I've also included some other changes that I saw necessary. Here's a summary:

Before (with imported switch still clickable when filters are unsupported, when clicked, also triggers an update):

https://github.com/plausible/analytics/assets/56999674/1e45e336-0583-4a21-8d12-6c89e57c022e

After (the icon is disabled when filters are unsupported):

https://github.com/plausible/analytics/assets/56999674/9d21f127-8f3b-440f-b99a-2092d0806c72

Before (notice how the bubble keeps hanging, and then disappears suddenly):

https://github.com/plausible/analytics/assets/56999674/9e981974-05fc-41be-a4c8-64fad13ed8d1

After: (bubble not displayed by default, fades in when the request finishes)

https://github.com/plausible/analytics/assets/56999674/7a31f3e4-624f-4540-a276-6d788ff1e009

Tests

Changelog

Documentation

Dark mode