-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove custom_dimension_filter feature and views_per_visit_metric flags #2996
Conversation
BundleMonFiles updated (1)
Unchanged files (6)
Total files change -80B -0.01% Final result: ✅ View report in BundleMon website ➡️ |
@@ -326,7 +326,6 @@ defmodule PlausibleWeb.StatsController do | |||
|
|||
defp get_flags(user) do | |||
%{ | |||
custom_dimension_filter: FunWithFlags.enabled?(:custom_dimension_filter, for: user), | |||
views_per_visit_metric: FunWithFlags.enabled?(:views_per_visit_metric, for: user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can views_per_visit_metric
be enabled as well?
Request: #131 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can views_per_visit_metric be enabled as well?
@ruslandoga, the views_per_visit_metric
flag is actually redundant. It's a duplicate that can be safely deleted now.
We used a visits_metric
flag for both visits
and views_per_visits
metrics. And that flag was removed in #2898, so in the current master the views_per_visit
metric is enabled for everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR into this branch: #3001
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ruslandoga nice! I've approved :)
4d5f19d
to
79bcdf4
Compare
@RobertJoonas could you take a look? I think you're most familiar with this stuff |
@@ -83,10 +79,6 @@ function renderDropdownFilter(site, history, [key, value], query) { | |||
) | |||
} | |||
|
|||
function shouldLinkToFilterModal(site, key) { | |||
return key !== 'props' || site.flags.custom_dimension_filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lack context here but sanity check -- shouldn't we retain the key !== 'props'
condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lack context here too (and I was uncertain if I should even open this PR).
My thinking was, if custom_dimension_filter
is enabled for all, then it's always true
, so even if key !== 'props'
returns false
, the end result is still true
because of ||
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key !== 'props'
check makes sure that if key
is anything other than 'props' (e.g. 'page') then it should return true
, no matter the flag status. We can remove that too as we don't need any special handling for props anymore, all of the options should be links.
@ruslandoga could you resolve the CHANGELOG conflict please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
60801b8
to
a246875
Compare
assets/js/dashboard/filters.js
Outdated
<span className="inline-block w-full truncate">{filterText(key, value, query)}</span> | ||
<PencilSquareIcon className="w-4 h-4 ml-1 cursor-pointer group-hover:text-indigo-700 dark:group-hover:text-indigo-500" /> | ||
</Link> | ||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, this shouldn't be included, since it was using a !shouldLinkToFilterModal(site, key)
check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in bc7a616
Changes
This PR enables custom dimension filter for self-hosters.
Relevant discussion: #2984
This PR is based on #2898
Tests
Changelog
Documentation
Dark mode