analytics/test/plausible_web/controllers
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
..
api Dashboard: show comparison for breakdowns (#4692) 2024-10-22 09:02:13 +00:00
auth_controller Fix flaky auth rate limit tests and refactor auth rate limiting (#4401) 2024-08-09 14:58:34 +02:00
CSVs APIv2: TimeSeries using QueryBuilder, release experimental_session_count (#4305) 2024-07-09 14:25:02 +03:00
site Use :domain uniformly for all routes instead of :website (#4598) 2024-09-26 08:20:35 +00:00
admin_auth_controller_test.exs Rename internal build symbols (#3942) 2024-04-29 08:05:33 +02:00
admin_controller_test.exs Implement search in Details views (#4318) 2024-07-09 15:01:52 +03:00
auth_controller_test.exs Allow me deletions with enterprise plans test (#4685) 2024-10-16 09:01:38 +00:00
avatar_controller_test.exs Remove custom domains support + update build options (#3559) 2023-11-29 11:04:54 +01:00
billing_controller_test.exs Account settings w sidebar (#4654) 2024-10-08 08:30:01 +00:00
error_report_controller_test.exs Rename internal build symbols (#3942) 2024-04-29 08:05:33 +02:00
google_analytics_controller_test.exs Use :domain uniformly for all routes instead of :website (#4598) 2024-09-26 08:20:35 +00:00
help_scout_controller_test.exs Implement user notes in CRM and HelpScout integration (#4611) 2024-09-25 14:56:33 +00:00
invitation_controller_test.exs Use :domain uniformly for all routes instead of :website (#4598) 2024-09-26 08:20:35 +00:00
page_controller_test.exs Implement token-based sessions (#4463) 2024-09-03 11:34:37 +02:00
settings_controller_sync_test.exs Account settings w sidebar (#4654) 2024-10-08 08:30:01 +00:00
settings_controller_test.exs Account settings w sidebar (#4654) 2024-10-08 08:30:01 +00:00
site_controller_test.exs Reduce Phoenix.HTML usage (#4675) 2024-10-15 03:55:14 +00:00
stats_controller_test.exs Use :domain uniformly for all routes instead of :website (#4598) 2024-09-26 08:20:35 +00:00
unsubscribe_controller_test.exs Use :domain uniformly for all routes instead of :website (#4598) 2024-09-26 08:20:35 +00:00