Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Prima dropdown sites page (#6063)

Uku Taht4cc4fb213ced
diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.ex
index 63c0e9917f..6e2f54fefa 100644
--- a/lib/plausible_web/components/generic.ex
+++ b/lib/plausible_web/components/generic.ex
@@ -43,7 +43,8 @@ defmodule PlausibleWeb.Components.Generic do
"danger" =>
"border border-gray-300 dark:border-gray-800 text-red-600 bg-white dark:bg-gray-800 hover:text-red-700 dark:hover:text-red-400 dark:text-red-500 active:text-red-800 disabled:text-red-700/40 disabled:hover:shadow-none dark:disabled:text-red-500/35 dark:disabled:bg-gray-800",
"ghost" =>
- "text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-800 disabled:text-gray-500 disabled:dark:text-gray-600 disabled:hover:bg-transparent"
+ "text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-800 disabled:text-gray-500 disabled:dark:text-gray-600 disabled:hover:bg-transparent",
+ "icon" => "text-gray-400 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"
}
@button_base_class "whitespace-nowrap truncate inline-flex items-center justify-center gap-x-2 text-sm font-medium rounded-md cursor-pointer disabled:cursor-not-allowed"
diff --git a/lib/plausible_web/components/prima_dropdown.ex b/lib/plausible_web/components/prima_dropdown.ex
index 16e136acec..763bd40385 100644
--- a/lib/plausible_web/components/prima_dropdown.ex
+++ b/lib/plausible_web/components/prima_dropdown.ex
@@ -8,6 +8,7 @@ defmodule PlausibleWeb.Components.PrimaDropdown do
defdelegate dropdown(assigns), to: Prima.Dropdown
defdelegate dropdown_trigger(assigns), to: Prima.Dropdown
+ attr(:id, :string, required: true)
slot(:inner_block, required: true)
# placement: bottom-end should probably be default in prima. Feels more natural
@@ -15,6 +16,7 @@ defmodule PlausibleWeb.Components.PrimaDropdown do
def dropdown_menu(assigns) do
~H"""
<Dropdown.dropdown_menu
+ id={@id}
placement="bottom-end"
class="bg-white rounded-md shadow-lg ring-1 ring-black/5 focus:outline-none p-1.5 dark:bg-gray-800"
>
@@ -24,6 +26,7 @@ defmodule PlausibleWeb.Components.PrimaDropdown do
end
attr(:as, :any, default: nil)
+ attr(:id, :string, required: true)
attr(:disabled, :boolean, default: false)
attr(:rest, :global, include: ~w(navigate patch href))
slot(:inner_block, required: true)
@@ -32,6 +35,7 @@ defmodule PlausibleWeb.Components.PrimaDropdown do
~H"""
<Dropdown.dropdown_item
as={@as}
+ id={@id}
disabled={@disabled}
class="group/item z-50 flex items-center gap-x-2 min-w-max w-full rounded-md pl-3 pr-5 py-2 text-gray-700 text-sm dark:text-gray-300 data-focus:bg-gray-100 dark:data-focus:bg-gray-700 data-focus:text-gray-900 dark:data-focus:text-gray-100"
{@rest}
diff --git a/lib/plausible_web/live/components/modal.ex b/lib/plausible_web/live/components/modal.ex
index d71011aa06..51f473183b 100644
--- a/lib/plausible_web/live/components/modal.ex
+++ b/lib/plausible_web/live/components/modal.ex
@@ -161,6 +161,7 @@ defmodule PlausibleWeb.Live.Components.Modal do
attr :preload?, :boolean, default: true
slot :inner_block, required: true
+ @impl true
def render(assigns) do
class = [
"md:w-1/2 w-full max-w-md mx-auto bg-white dark:bg-gray-900 shadow-2xl rounded-lg px-8 pt-6 pb-8 top-24",
diff --git a/lib/plausible_web/live/goal_settings/list.ex b/lib/plausible_web/live/goal_settings/list.ex
index d8084e81b0..2720b1ccc1 100644
--- a/lib/plausible_web/live/goal_settings/list.ex
+++ b/lib/plausible_web/live/goal_settings/list.ex
@@ -24,12 +24,13 @@ defmodule PlausibleWeb.Live.GoalSettings.List do
<%= if @searching? or Enum.count(@goals) > 0 do %>
<.filter_bar filter_text={@filter_text} placeholder="Search Goals">
<PrimaDropdown.dropdown id="add-goal-dropdown">
- <PrimaDropdown.dropdown_trigger as={&button/1} mt?={false}>
+ <PrimaDropdown.dropdown_trigger as={&button/1} id="add-goal-dropdown-trigger" mt?={false}>
Add goal <Heroicons.chevron_down mini class="size-4 mt-0.5" />
</PrimaDropdown.dropdown_trigger>
- <PrimaDropdown.dropdown_menu>
+ <PrimaDropdown.dropdown_menu id="add-goal-dropdown-menu">
<PrimaDropdown.dropdown_item
+ id="add-goal-dropdown-menuitem-1"
phx-click="add-goal"
phx-value-goal-type="pageviews"
x-data
@@ -38,6 +39,7 @@ defmodule PlausibleWeb.Live.GoalSettings.List do
<Heroicons.plus class={PrimaDropdown.dropdown_item_icon_class()} /> Pageview
</PrimaDropdown.dropdown_item>
<PrimaDropdown.dropdown_item
+ id="add-goal-dropdown-menuitem-2"
phx-click="add-goal"
phx-value-goal-type="custom_events"
x-data
@@ -46,6 +48,7 @@ defmodule PlausibleWeb.Live.GoalSettings.List do
<Heroicons.plus class={PrimaDropdown.dropdown_item_icon_class()} /> Custom event
</PrimaDropdown.dropdown_item>
<PrimaDropdown.dropdown_item
+ id="add-goal-dropdown-menuitem-3"
phx-click="add-goal"
phx-value-goal-type="scroll"
x-data
@@ -165,12 +168,17 @@ defmodule PlausibleWeb.Live.GoalSettings.List do
</.styled_link>
</p>
<PrimaDropdown.dropdown id="add-goal-dropdown-empty" class="mt-4">
- <PrimaDropdown.dropdown_trigger as={&button/1} mt?={false}>
+ <PrimaDropdown.dropdown_trigger
+ as={&button/1}
+ id="add-goal-dropdown-empty-trigger"
+ mt?={false}
+ >
Add goal <Heroicons.chevron_down mini class="size-4 mt-0.5" />
</PrimaDropdown.dropdown_trigger>
- <PrimaDropdown.dropdown_menu>
+ <PrimaDropdown.dropdown_menu id="add-goal-dropdown-empty-menu">
<PrimaDropdown.dropdown_item
+ id="add-goal-dropdown-empty-menuitem-1"
phx-click="add-goal"
phx-value-goal-type="pageviews"
x-data
@@ -179,6 +187,7 @@ defmodule PlausibleWeb.Live.GoalSettings.List do
<Heroicons.plus class={PrimaDropdown.dropdown_item_icon_class()} /> Pageview
</PrimaDropdown.dropdown_item>
<PrimaDropdown.dropdown_item
+ id="add-goal-dropdown-empty-menuitem-2"
phx-click="add-goal"
phx-value-goal-type="custom_events"
x-data
@@ -187,6 +196,7 @@ defmodule PlausibleWeb.Live.GoalSettings.List do
<Heroicons.plus class={PrimaDropdown.dropdown_item_icon_class()} /> Custom event
</PrimaDropdown.dropdown_item>
<PrimaDropdown.dropdown_item
+ id="add-goal-dropdown-empty-menuitem-3"
phx-click="add-goal"
phx-value-goal-type="scroll"
x-data
diff --git a/lib/plausible_web/live/sites.ex b/lib/plausible_web/live/sites.ex
index fed8d8af5f..9942005d7c 100644
--- a/lib/plausible_web/live/sites.ex
+++ b/lib/plausible_web/live/sites.ex
@@ -117,19 +117,23 @@ defmodule PlausibleWeb.Live.Sites do
:if={@consolidated_view_cta_dismissed?}
id="add-site-dropdown"
>
- <PrimaDropdown.dropdown_trigger as={&button/1} mt?={false}>
+ <PrimaDropdown.dropdown_trigger as={&button/1} id="add-site-dropdown-trigger" mt?={false}>
<Heroicons.plus class="size-4" /> Add
<Heroicons.chevron_down mini class="size-4 mt-0.5" />
</PrimaDropdown.dropdown_trigger>
- <PrimaDropdown.dropdown_menu>
+ <PrimaDropdown.dropdown_menu id="add-site-dropdown-menu">
<PrimaDropdown.dropdown_item
as={&link/1}
+ id="add-site-dropdown-menuitem-1"
href={Routes.site_path(@socket, :new, %{flow: PlausibleWeb.Flows.provisioning()})}
>
<Heroicons.plus class={PrimaDropdown.dropdown_item_icon_class()} /> Add website
</PrimaDropdown.dropdown_item>
- <PrimaDropdown.dropdown_item phx-click="consolidated-view-cta-restore">
+ <PrimaDropdown.dropdown_item
+ id="add-site-dropdown-menuitem-2"
+ phx-click="consolidated-view-cta-restore"
+ >
<Heroicons.plus class={PrimaDropdown.dropdown_item_icon_class()} />
Add consolidated view
</PrimaDropdown.dropdown_item>
@@ -522,26 +526,32 @@ defmodule PlausibleWeb.Live.Sites do
end
def ellipsis_menu(assigns) do
+ assigns = assign(assigns, %{dropdown_id: "site-#{assigns[:site].domain}-dropdown"})
+
~H"""
- <.dropdown>
- <:button class="size-10 rounded-md hover:cursor-pointer text-gray-400 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100">
- <Heroicons.ellipsis_vertical class="absolute top-3 right-3 size-5 transition-colors duration-150" />
- </:button>
- <:menu class="!mt-0 mr-4 min-w-40">
- <!-- adjust position because click area is much bigger than icon. Default positioning from click area looks weird -->
- <.dropdown_item
+ <PrimaDropdown.dropdown id={@dropdown_id}>
+ <PrimaDropdown.dropdown_trigger
+ id={"#{@dropdown_id}-trigger"}
+ as={&button/1}
+ mt?={false}
+ theme="icon"
+ >
+ <Heroicons.ellipsis_vertical class="size-5" />
+ </PrimaDropdown.dropdown_trigger>
+
+ <PrimaDropdown.dropdown_menu id={"#{@dropdown_id}-menu"}>
+ <PrimaDropdown.dropdown_item
:if={@can_manage?}
- href={"/#{URI.encode_www_form(@site.domain)}/settings/general"}
- class="group/item !flex items-center gap-x-2"
+ id={"#{@dropdown_id}-item-1"}
+ as={&link/1}
+ href={Routes.site_path(PlausibleWeb.Endpoint, :settings_general, @site.domain)}
>
- <Heroicons.cog_6_tooth class="size-5 text-gray-600 dark:text-gray-400 group-hover/item:text-gray-900 dark:group-hover/item:text-gray-100" />
- <span>Settings</span>
- </.dropdown_item>
+ <Heroicons.cog_6_tooth class={PrimaDropdown.dropdown_item_icon_class()} /> Settings
+ </PrimaDropdown.dropdown_item>
- <.dropdown_item
+ <PrimaDropdown.dropdown_item
:if={Sites.regular?(@site)}
- href="#"
- x-on:click.prevent
+ id={"#{@dropdown_id}-item-2"}
phx-click={
JS.hide(
transition: {"duration-500", "opacity-100", "opacity-0"},
@@ -551,32 +561,29 @@ defmodule PlausibleWeb.Live.Sites do
|> JS.push("pin-toggle")
}
phx-value-domain={@site.domain}
- class="group/item !flex items-center gap-x-2"
>
<.icon_pin
:if={@site.pinned_at}
filled={true}
- class="size-[1.15rem] text-indigo-600 dark:text-indigo-500 group-hover/item:text-indigo-700 dark:group-hover/item:text-indigo-400"
+ class={PrimaDropdown.dropdown_item_icon_class()}
/>
- <span :if={@site.pinned_at}>Unpin site</span>
-
<.icon_pin
- class="size-5 text-gray-600 dark:text-gray-400 group-hover/item:text-gray-900 dark:group-hover/item:text-gray-100"
+ class={PrimaDropdown.dropdown_item_icon_class()}
/>
- <span :if={[email protected]_at}>Pin site</span>
- </.dropdown_item>
- <.dropdown_item
+ {if @site.pinned_at, do: "Unpin site", else: "Pin site"}
+ </PrimaDropdown.dropdown_item>
+
+ <PrimaDropdown.dropdown_item
:if={Application.get_env(:plausible, :environment) == "dev" and Sites.regular?(@site)}
- href={Routes.site_path(PlausibleWeb.Endpoint, :delete_site, @site.domain)}
- method="delete"
- class="group/item !flex items-center gap-x-2"
+ id={"#{@dropdown_id}-item-3"}
+ phx-click="delete-site"
+ phx-value-domain={@site.domain}
>
- <Heroicons.trash class="size-5 text-red-500" />
- <span class="text-red-500">[DEV ONLY] Quick delete</span>
- </.dropdown_item>
- </:menu>
- </.dropdown>
+ <Heroicons.trash class="size-4 text-red-600" /> [DEV ONLY] Quick delete
+ </PrimaDropdown.dropdown_item>
+ </PrimaDropdown.dropdown_menu>
+ </PrimaDropdown.dropdown>
"""
end
diff --git a/mix.exs b/mix.exs
index 3d3b42b120..97db6e1069 100644
--- a/mix.exs
+++ b/mix.exs
@@ -126,7 +126,7 @@ defmodule Plausible.MixProject do
{:phoenix_live_view, "~> 1.1.17"},
{:php_serializer, "~> 2.0"},
{:plug, "~> 1.13", override: true},
- {:prima, "~> 0.2.1"},
+ {:prima, "~> 0.2.5"},
{:plug_cowboy, "~> 2.3"},
{:polymorphic_embed, "~> 5.0"},
{:postgrex, "~> 0.21.1"},
diff --git a/mix.lock b/mix.lock
index e8e6e4c546..932a4c0129 100644
--- a/mix.lock
+++ b/mix.lock
@@ -75,7 +75,7 @@
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"joken": {:hex, :joken, "2.6.2", "5daaf82259ca603af4f0b065475099ada1b2b849ff140ccd37f4b6828ca6892a", [:mix], [{:jose, "~> 1.11.10", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "5134b5b0a6e37494e46dbf9e4dad53808e5e787904b7c73972651b51cce3d72b"},
"jose": {:hex, :jose, "1.11.12", "06e62b467b61d3726cbc19e9b5489f7549c37993de846dfb3ee8259f9ed208b3", [:mix, :rebar3], [], "hexpm", "31e92b653e9210b696765cdd885437457de1add2a9011d92f8cf63e4641bab7b"},
- "lazy_html": {:hex, :lazy_html, "0.1.8", "677a8642e644eef8de98f3040e2520d42d0f0f8bd6c5cd49db36504e34dffe91", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.9.0", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:fine, "~> 0.1.0", [hex: :fine, repo: "hexpm", optional: false]}], "hexpm", "0d8167d930b704feb94b41414ca7f5779dff9bca7fcf619fcef18de138f08736"},
+ "lazy_html": {:hex, :lazy_html, "0.1.10", "ffe42a0b4e70859cf21a33e12a251e0c76c1dff76391609bd56702a0ef5bc429", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.9.0", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:fine, "~> 0.1.0", [hex: :fine, repo: "hexpm", optional: false]}], "hexpm", "50f67e5faa09d45a99c1ddf3fac004f051997877dc8974c5797bb5ccd8e27058"},
"libcluster": {:hex, :libcluster, "3.5.0", "5ee4cfde4bdf32b2fef271e33ce3241e89509f4344f6c6a8d4069937484866ba", [:mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.3", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ebf6561fcedd765a4cd43b4b8c04b1c87f4177b5fb3cbdfe40a780499d72f743"},
"location": {:git, "https://github.com/plausible/location.git", "a89bf79985c3c3d0830477ae587001156a646ce8", []},
"locus": {:hex, :locus, "2.3.12", "aa3992023363a523e5c6d0d104da1cd1026626d16b32a480903083201057f281", [:rebar3], [{:tls_certificate_check, "~> 1.9", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "e9bacd644127c5aaac478461e8b4bcd49479e7bb9f665b48ab4ebac2b7adc1ec"},
@@ -121,13 +121,13 @@
"parent": {:hex, :parent, "0.12.1", "495c4386f06de0df492e0a7a7199c10323a55e9e933b27222060dd86dccd6d62", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2ab589ef1f37bfcedbfb5ecfbab93354972fb7391201b8907a866dadd20b39d1"},
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
"peep": {:hex, :peep, "3.4.2", "49d4ca116d994779351959dfee971fb2c7d6506f1821374f3cc4fd39a3d3fadb", [:mix], [{:nimble_options, "~> 1.1", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:plug, "~> 1.16", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry_metrics, "~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "cae224b09e224bf5584f5375108becf71e2288572a099a122e66735289cd33f4"},
- "phoenix": {:hex, :phoenix, "1.8.2", "75aba5b90081d88a54f2fc6a26453d4e76762ab095ff89be5a3e7cb28bff9300", [:mix], [{:bandit, "~> 1.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "19ea65b4064f17b1ab0515595e4d0ea65742ab068259608d5d7b139a73f47611"},
+ "phoenix": {:hex, :phoenix, "1.8.3", "49ac5e485083cb1495a905e47eb554277bdd9c65ccb4fc5100306b350151aa95", [:mix], [{:bandit, "~> 1.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "36169f95cc2e155b78be93d9590acc3f462f1e5438db06e6248613f27c80caec"},
"phoenix_bakery": {:hex, :phoenix_bakery, "0.1.2", "ca57673caea1a98f1cc763f94032796a015774d27eaa3ce5feef172195470452", [:mix], [{:brotli, "~> 0.3.0", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "45cc8cecc5c3002b922447c16389761718c07c360432328b04680034e893ea5b"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.7.0", "75c4b9dfb3efdc42aec2bd5f8bccd978aca0651dbcbc7a3f362ea5d9d43153c6", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.16 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "1d75011e4254cb4ddf823e81823a9629559a1be93b4321a6a5f11a5306fbf4cc"},
"phoenix_html": {:hex, :phoenix_html, "4.3.0", "d3577a5df4b6954cd7890c84d955c470b5310bb49647f0a114a6eeecc850f7ad", [:mix], [], "hexpm", "3eaa290a78bab0f075f791a46a981bbe769d94bc776869f4f3063a14f30497ad"},
"phoenix_html_helpers": {:hex, :phoenix_html_helpers, "1.0.1", "7eed85c52eff80a179391036931791ee5d2f713d76a81d0d2c6ebafe1e11e5ec", [:mix], [{:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "cffd2385d1fa4f78b04432df69ab8da63dc5cf63e07b713a4dcf36a3740e3090"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.6.1", "05df733a09887a005ed0d69a7fc619d376aea2730bf64ce52ac51ce716cc1ef0", [:mix], [{:file_system, "~> 0.2.10 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "74273843d5a6e4fef0bbc17599f33e3ec63f08e69215623a0cd91eea4288e5a0"},
- "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.20", "4f20850ee700b309b21906a0e510af1b916b454b4f810fb8581ada016eb42dfc", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c16abd605a21f778165cb0079946351ef20ef84eb1ef467a862fb9a173b1d27d"},
+ "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.22", "9b3c985bfe38e82668594a8ce90008548f30b9f23b718ebaea4701710ce9006f", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e1395d5622d8bf02113cb58183589b3da6f1751af235768816e90cc3ec5f1188"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.2.0", "ff3a5616e1bed6804de7773b92cbccfc0b0f473faf1f63d7daf1206c7aeaaa6f", [:mix], [], "hexpm", "adc313a5bf7136039f63cfd9668fde73bba0765e0614cba80c06ac9460ff3e96"},
"phoenix_storybook": {:hex, :phoenix_storybook, "0.9.3", "4f94e731d4c40d4dd7d1eddf7d5c6914366da7d78552dc565b222e4036d0d76f", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: true]}, {:makeup_eex, "~> 2.0.2", [hex: :makeup_eex, repo: "hexpm", optional: false]}, {:makeup_html, "~> 0.2.0", [hex: :makeup_html, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.8.1", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html_helpers, "~> 1.0", [hex: :phoenix_html_helpers, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}], "hexpm", "4c8658b756fd8238f7e8e4343a0f12bdb91d4eba592b1c4e8118b37b6fd43e4b"},
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
@@ -138,7 +138,7 @@
"plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"},
"polymorphic_embed": {:hex, :polymorphic_embed, "5.0.3", "37444e0af941026a2c29b0539b6471bdd6737a6492a19264bf2bb0118e3ac242", [:mix], [{:attrs, "~> 0.6", [hex: :attrs, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.1", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_html_helpers, "~> 1.0", [hex: :phoenix_html_helpers, repo: "hexpm", optional: true]}, {:phoenix_live_view, "~> 0.20 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}], "hexpm", "2fed44f57abf0a0fc7642e0eb0807a55b65de1562712cc0620772cbbb80e49c1"},
"postgrex": {:hex, :postgrex, "0.21.1", "2c5cc830ec11e7a0067dd4d623c049b3ef807e9507a424985b8dcf921224cd88", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "27d8d21c103c3cc68851b533ff99eef353e6a0ff98dc444ea751de43eb48bdac"},
- "prima": {:hex, :prima, "0.2.1", "337d9ee0cc3a09115ba9969d4bb592c0c4b56a6826a039ad890b4dc3c03ffb80", [:mix], [{:esbuild, "~> 0.7", [hex: :esbuild, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.2", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "bc5e2b34986d66206720c5a14fa148f77c8c2dc1fec60260923053568e91d634"},
+ "prima": {:hex, :prima, "0.2.5", "4e7eb4ce13d87d476f52a297955cc2eeeeaa1f59fa703c5d7c77357e0689fa6c", [:mix], [{:esbuild, "~> 0.7", [hex: :esbuild, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 4.2", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "b9426774f91501e853b314acc8b0cc4a76b92c370d6fbd79abe98d7cb4d91b4d"},
"prom_ex": {:hex, :prom_ex, "1.11.0", "1f6d67f2dead92224cb4f59beb3e4d319257c5728d9638b4a5e8ceb51a4f9c7e", [:mix], [{:absinthe, ">= 1.7.0", [hex: :absinthe, repo: "hexpm", optional: true]}, {:broadway, ">= 1.1.0", [hex: :broadway, repo: "hexpm", optional: true]}, {:ecto, ">= 3.11.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:finch, "~> 0.18", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:oban, ">= 2.10.0", [hex: :oban, repo: "hexpm", optional: true]}, {:octo_fetch, "~> 0.4", [hex: :octo_fetch, repo: "hexpm", optional: false]}, {:peep, "~> 3.0", [hex: :peep, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.7.0", [hex: :phoenix, repo: "hexpm", optional: true]}, {:phoenix_live_view, ">= 0.20.0", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}, {:plug, ">= 1.16.0", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 2.6.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, ">= 1.0.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}, {:telemetry_metrics_prometheus_core, "~> 1.2", [hex: :telemetry_metrics_prometheus_core, repo: "hexpm", optional: false]}, {:telemetry_poller, "~> 1.1", [hex: :telemetry_poller, repo: "hexpm", optional: false]}], "hexpm", "76b074bc3730f0802978a7eb5c7091a65473eaaf07e99ec9e933138dcc327805"},
"public_suffix": {:git, "https://github.com/axelson/publicsuffix-elixir", "fa40c243d4b5d8598b90cff268bc4e33f3bb63f1", []},
"ranch": {:hex, :ranch, "1.8.1", "208169e65292ac5d333d6cdbad49388c1ae198136e4697ae2f474697140f201c", [:make, :rebar3], [], "hexpm", "aed58910f4e21deea992a67bf51632b6d60114895eb03bb392bb733064594dd0"},
diff --git a/test/plausible_web/live/sites_test.exs b/test/plausible_web/live/sites_test.exs
index 364e75b4d9..526d2bcf94 100644
--- a/test/plausible_web/live/sites_test.exs
+++ b/test/plausible_web/live/sites_test.exs
@@ -579,7 +579,7 @@ defmodule PlausibleWeb.Live.SitesTest do
assert text_of_element(
html,
- ~s/li[data-domain="#{site.domain}"] a[phx-value-domain]/
+ ~s/li[data-domain="#{site.domain}"] button[phx-value-domain]/
) == "Pin site"
end
@@ -588,7 +588,7 @@ defmodule PlausibleWeb.Live.SitesTest do
{:ok, lv, _html} = live(conn, "/sites")
- button_selector = ~s/li[data-domain="#{site.domain}"] a[phx-value-domain]/
+ button_selector = ~s/li[data-domain="#{site.domain}"] button[phx-value-domain]/
html =
lv
@@ -619,7 +619,7 @@ defmodule PlausibleWeb.Live.SitesTest do
{:ok, lv, _html} = live(conn, "/sites")
- button_selector = ~s/li[data-domain="#{site.domain}"] a[phx-value-domain]/
+ button_selector = ~s/li[data-domain="#{site.domain}"] button[phx-value-domain]/
html =
lv