analytics/test/plausible_web
Karl-Aksel Puulmann aec0318c3b
Dashboard: show comparison for breakdowns (#4692)
* Comparisons: Move code to LegacyQueryBuilder

* WIP: Return comparison results to frontend

* refactor: remove useless param

* Different result format

* Pass object to metric.renderValue

* remove dead code

* Fixup response format

* Comparison in a tooltip

Not perfect at all, but a good start. Problems arise with money etc.

* Simple change arrow

* Extract metric entry to ts

* popper attempt WIP

* Slightly nicer content

* Solve warning

* Unified changeArrow in app

* Remove needless spanning

* Always set `graph_metric` in top stats.

FE already has business logic around whether a given metric is graphable

* Remove dead code

* Move Money module under dashboard utils, keep in build

* change <Metric /> definition to take in a `formatter` and store default formatters in another (typed) const

* Use standard system for formatting numbers

* Arrows only in table

* remove dead import

* Inline renderValue

* Render metric name in tooltip

* numberFormatter -> numberShortFormatter

* numberShortFormatter update

* Separate long/short formatters

* Use long vs short formatters

* Put column name into tooltip

* Slightly improved label handling for percentages, conversion rate

* Improved boundary handling in tooltip.js

* Iterate tooltips, no tooltip for - revenue

* Update top stats tests after graph_metric change

* Change revenue metrics stats API return structure

Conversion now happens earlier in query pipeline, we return float for comparison purposes

* useQueryContext in a component

* graph_metric for current visitors to fix realtime view

* No tooltips if fully - row

* renderValue as a proper function

* Simplify MetricEntry

* Use common const

* tooltip to typescript

* More explicit return structure

* metric-entry -> metric-value

* Restore some files

* ChangeArrow

* Restore MoreLink

* Fix typing in MoreLink

* <MetricValue />

* Tests for MetricValue and ChangeArrow

* details modal fixups

* re-add space between arrow and percentage

* Solve stylelint issues

* Update test

* Format

* Add flag `breakdown_comparisons_ui`

* reformat

* Remove no change icon, better alignment

* Revert "Remove no change icon, better alignment"

This reverts commit a8d62b6383.

* number-formatter.ts

* numberLongFormatter refactor

* useMemo dependency

* Handle nulls/undefined in top stats

---------

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2024-10-22 09:02:13 +00:00
..
components Onboarding improvements (#4459) 2024-09-02 12:49:54 +02:00
controllers Dashboard: show comparison for breakdowns (#4692) 2024-10-22 09:02:13 +00:00
live Rework settings UI (#4626) 2024-10-02 09:05:21 +00:00
plugins/api Add listing sites, goals and custom props to Sites API (#4302) 2024-07-19 10:05:54 +02:00
plugs Allow configuring AuthorizeSiteAccess plug site param (#4597) 2024-09-26 09:52:45 +00:00
views Fix HTML-in-JSON in ErrorView (#4500) 2024-09-03 13:35:07 +02:00
captcha_test.exs Google APIs integration improvements (#2358) 2022-10-24 09:34:02 +02:00
email_test.exs Reduce Phoenix.HTML usage (#4675) 2024-10-15 03:55:14 +00:00
user_auth_test.exs Implement listing user sessions in user settings (#4588) 2024-09-30 11:03:08 +00:00