Skip to content

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

Update trial notification button style (#6575)

Sanne de Vriesa34206677a70
diff --git a/lib/plausible_web/templates/layout/_header.html.heex b/lib/plausible_web/templates/layout/_header.html.heex
index d1a93f7a3f..666e0476a0 100644
--- a/lib/plausible_web/templates/layout/_header.html.heex
+++ b/lib/plausible_web/templates/layout/_header.html.heex
@@ -30,18 +30,18 @@
}
class="hidden sm:block"
>
- <div class="flex items-center p-1 rounded-lg bg-yellow-100 dark:bg-yellow-600/35 overflow-hidden">
- <span class="px-3 text-sm font-medium text-gray-900 dark:text-gray-100">
+ <div class="flex items-center gap-x-2 px-3.5 py-2 rounded-lg bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-600/35 dark:to-purple-600/35 overflow-hidden">
+ <span class="text-sm font-medium text-gray-900 dark:text-gray-100">
{trial_notification(@conn.assigns[:current_team])}
</span>
- <.button_link
+ <div class="w-px h-4 bg-indigo-500/30 dark:bg-indigo-200/30" aria-hidden="true">
+ </div>
+ <.styled_link
href={Routes.settings_path(@conn, :subscription)}
- theme="yellow"
- mt?={false}
- class="!px-3 !py-2"
+ class="plausible-event-name=Trial+Notification+Upgrade+Click text-sm font-medium dark:!text-indigo-400 dark:hover:!text-indigo-300"
>
- Upgrade
- </.button_link>
+ Choose a plan
+ </.styled_link>
</div>
</li>
<li class="w-full sm:w-auto">
diff --git a/test/plausible_web/controllers/site_controller_test.exs b/test/plausible_web/controllers/site_controller_test.exs
index 8c66b55e5e..2a6f7979c1 100644
--- a/test/plausible_web/controllers/site_controller_test.exs
+++ b/test/plausible_web/controllers/site_controller_test.exs
@@ -215,7 +215,7 @@ defmodule PlausibleWeb.SiteControllerTest do
end
@tag :ee_only
- test "shows upgrade button in header when user is on trial and team is not setup",
+ test "shows upgrade link in header when user is on trial and team is not setup",
%{conn: conn, user: user} do
new_site(owner: user)
@@ -230,11 +230,11 @@ defmodule PlausibleWeb.SiteControllerTest do
assert text_of_element(
resp,
~s|a[href="#{Routes.settings_path(conn, :subscription)}"]|
- ) =~ "Upgrade"
+ ) =~ "Choose a plan"
end
@tag :ee_only
- test "shows upgrade button in header when user is on trial and is owner of a setup team",
+ test "shows upgrade link in header when user is on trial and is owner of a setup team",
%{conn: conn, user: user} do
{:ok, team} = Plausible.Teams.get_or_create(user)
team = Plausible.Teams.complete_setup(team)
@@ -250,7 +250,7 @@ defmodule PlausibleWeb.SiteControllerTest do
end
@tag :ee_only
- test "shows upgrade button in header when user is on trial and has billing role in a setup team",
+ test "shows upgrade link in header when user is on trial and has billing role in a setup team",
%{conn: base_conn} do
member = new_user()
owner = new_user(trial_expiry_date: Date.add(Date.utc_today(), 30))
@@ -271,7 +271,7 @@ defmodule PlausibleWeb.SiteControllerTest do
end
@tag :ee_only
- test "does not show upgrade button in header when user is on trial but has non-billing role in a setup team",
+ test "does not show upgrade link in header when user is on trial but has non-billing role in a setup team",
%{conn: base_conn} do
for role <- [:admin, :editor, :viewer] do
member = new_user()
@@ -288,7 +288,7 @@ defmodule PlausibleWeb.SiteControllerTest do
resp,
~s|a[href="#{Routes.settings_path(conn, :subscription)}"]|
),
- "expected no Upgrade button for role #{role}"
+ "expected no upgrade link for role #{role}"
end
end