From a9bfaed70f2067b44fd37ed029ac695ca526b3f5 Mon Sep 17 00:00:00 2001 From: hq1 Date: Wed, 13 Sep 2023 15:54:09 +0200 Subject: [PATCH] Get rid of the funnels flag completely (#3341) --- assets/js/dashboard/stats/behaviours/index.js | 4 ++-- lib/plausible/funnels.ex | 5 ----- test/test_helper.exs | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/assets/js/dashboard/stats/behaviours/index.js b/assets/js/dashboard/stats/behaviours/index.js index f5553f3cf..d50a6129d 100644 --- a/assets/js/dashboard/stats/behaviours/index.js +++ b/assets/js/dashboard/stats/behaviours/index.js @@ -24,7 +24,7 @@ export const sectionTitles = { } export default function Behaviours(props) { - const {site, query, currentUserRole} = props + const { site, query, currentUserRole } = props const adminAccess = ['owner', 'admin', 'super_admin'].includes(currentUserRole) const tabKey = `behavioursTab__${site.domain}` const funnelKey = `behavioursTabFunnel__${site.domain}` @@ -243,7 +243,7 @@ export default function Behaviours(props) { if (site.propsEnabled) { enabledModes.push(PROPS) } - if (site.funnelsEnabled && !isRealtime() && site.flags.funnels) { + if (site.funnelsEnabled && !isRealtime()) { enabledModes.push(FUNNELS) } return enabledModes diff --git a/lib/plausible/funnels.ex b/lib/plausible/funnels.ex index bf874fe36..80c18171f 100644 --- a/lib/plausible/funnels.ex +++ b/lib/plausible/funnels.ex @@ -13,11 +13,6 @@ defmodule Plausible.Funnels do import Ecto.Query - @spec enabled_for?(any()) :: boolean() - def enabled_for?(actor) do - FunWithFlags.enabled?(:funnels, for: actor) - end - @spec create(Plausible.Site.t(), String.t(), [map()]) :: {:ok, Funnel.t()} | {:error, Ecto.Changeset.t() | :invalid_funnel_size} diff --git a/test/test_helper.exs b/test/test_helper.exs index eac352c8d..24c338df2 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,6 +1,5 @@ {:ok, _} = Application.ensure_all_started(:ex_machina) Mox.defmock(Plausible.HTTPClient.Mock, for: Plausible.HTTPClient.Interface) Application.ensure_all_started(:double) -FunWithFlags.enable(:funnels) Ecto.Adapters.SQL.Sandbox.mode(Plausible.Repo, :manual) ExUnit.configure(exclude: [:slow])