* Start refactoring, supporting jsonurl
* WIP: Listing of applied filters works
* WIP: Remove some unneeded hackery
* WIP: Handle country labels better
* WIP: Handle multiple filters better
* WIP: Serializing filters for API queries
* Split modal code into 3
* Merge code paths for prop and other filter modals
* Get suggestions working again
* Display prop filters properly
* Handle re-opening a props modal properly
* Better label handling
* Better linking to filter modals
* Remove unneeded component
* Standardize how we update query more
* Use updatedQuery to remove more usecases of URLSearchParams
* Dont export toFilterQuery
* Custom toString for PlausibleSearchParams
* Fix props suggestions/filtering
* Refactor isFilteringOnFixedValue
* Improved encoding - goals now work again
* fix a typo
* Handle more cases where query.filters[ is used
* Fix locations tab changing behavior
* Fix for `setQuery` not to double up ?
* Handle goal filters properly now
* Delete dead code
* Update special goals handling
* Update <ListReport /> linking
* Show labeled values in list of filters
* Updae Props component handling of storage keys
* re-add special case handling in devices view
* Fix modal-related typo
* Get updatedQuery callsites working
* Update location modals linking
* Update props details model linking logic
* Switch back tab from props when removing goal filter
* Remove query.filters usage from within <Referrers /> component
* Private escapeFilterValue
* Fix sources/index.js
* Legacy redirect logic
* Update comment
* Disabled options in props modal
* Update escaping and is_not operator
* Restore `false` search property handling meaning unset
* changelog
* Fix filtering after clicking on a map
* FilterOperatorSelector
* replaceFilterByPrefix
* Improve naming for filter modals/groups
* Give a more semantic name to a function
* Make the LineGraph component thinner
* Move LineGraph into a separate file
* Move interval logic into interval-picker.js
This commit also fixes a bug where the interval name displayed inside
the picker component flickers the default interval when the graph is
loading.
The problem was that we were counting on graphData for returning us the
current interval: `let currentInterval = graphData?.interval`
We should always know the default interval before making the main-graph
request. Sending graphData to IntervalPicker component does not make
sense anyway.
* extract data fetching functions out of VisitorGraph component
* Return graph_metric key from Top Stats API
This commit introduces no behavioral changes - only starts returning an
additional field, allowing us to avoid the following logic in React:
1. Finding the metric names, given a stat display name. E.g.
`Unique visitors (last 30 min) -> visitors`
2. Checking if a metric is graphable or not
* Move metric state into localStorage
This commit gets rid of the internal `metric` state in the VisitorGraph
component and starts using localStorage for that instead.
This commit also chains the main-graph request into the top-stats request
callback - meaning that we'll always fetch new graph data after top stats
are updated. And we do it all in a single function.
Doing so simplifies the loading state significantly, and also helps to
make it clear, that at all times, existing top stats are required before
we can fetch the graph. That's because the metric is determined by which
Top stats are returned (for example, we can't be sure whether revenue
metrics will be returned or not).
* Make sure graph tooltip says "Converted Visitors"
* Extract a StatsExport function component
Again, instead of relying on `graphData?.interval` we can read it from
localStorage, or default to the largest interval available. The export
should not be dependant on the graph.
* Extract SamplingNotice function component
* Extract WithImportedSwitch function component
* Stop "lazy-loading" the graph and top stats
Since the container is always on top on the page, it will be visible on
the first render in any case - no matter the screen size.
* Turn VisitorGraph into a function component
* Display empty container until everything has loaded
* Do not display loading spinner on realtime ticks
* Turn Top Stats into a fn component
* fetch top stats and graph async
* Make sure revenue metrics can remain on the graph
* Add an extra check to canMetricBeGraphed
* fix typo
* remove redundant double negation
* Display premium features tabs on the dashboard
This commit makes the funnels and props tab on the dashboard visible
even when the site owner's plan does not have access to that feature.
This is to raise awareness of those features, and if the site owner does
not want to see that tab, they can still click "Hide this report" to
hide it.
Previously, when the plan did not support a feature, the feature module
`enabled/1` function returned `false`, regardless of the
`sites.feature_enabled` toggle. This commit creates a new function
called `opted_out/1` to differentiate access from explicitly opting out
a feature.
* Remove unused data-conversions-enabled attribute
* DRY Plausible.Billing.Feature.check_availability/1 function
* Allow opting out features the user doesn't have access to
* add upgrade CTA to FeatureSetupNotice
* fix JS linting errors
* simplify notice.js
* fix behaviour when deleting funnels saved to localstorage
In case some other funnel exists, we will use that as the default
selected one. If not, a feature setup notice will be displayed again.
---------
Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>