Skip to content

Commit f3950b2

Browse files
authored
Improve v2 mobile onboarding experience + fix margins between paragraphs (#5709)
* render tabs in a 2x2 grid on mobile * margins * fix test
1 parent 483f350 commit f3950b2

4 files changed

Lines changed: 16 additions & 15 deletions

File tree

lib/plausible_web/live/components/verification.ex

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ defmodule PlausibleWeb.Live.Components.Verification do
7979
<div class="mt-8">
8080
<.title>Success!</.title>
8181
<p class="text-sm mt-4">
82-
Your installation is working and visitors are being counted accurately
83-
</p>
84-
<p :if={@awaiting_first_pageview?} id="awaiting" class="text-sm mt-4 animate-pulse">
85-
Awaiting your first pageview
82+
Your installation is working and visitors are being counted accurately.
83+
<span :if={@awaiting_first_pageview?} id="awaiting" class="text-sm mt-4 animate-pulse">
84+
Awaiting your first pageview...
85+
</span>
8686
</p>
8787
</div>
8888
<.button_link
89-
mt?={false}
9089
href={"/#{URI.encode_www_form(@domain)}?skip_to_dashboard=true"}
9190
class="w-full font-bold mb-4"
9291
>

lib/plausible_web/live/installationv2.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ defmodule PlausibleWeb.Live.InstallationV2 do
123123
</div>
124124
</:loading>
125125
126-
<div class="flex flex-row gap-2 bg-gray-100 dark:bg-gray-900 rounded-md p-1">
126+
<div class="grid grid-cols-2 sm:flex sm:flex-row gap-2 bg-gray-100 dark:bg-gray-900 rounded-md p-1">
127127
<.tab
128128
patch={"?type=manual&flow=#{@flow}"}
129129
selected={@installation_type.result == "manual"}

lib/plausible_web/live/installationv2/instructions.ex

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule PlausibleWeb.Live.InstallationV2.Instructions do
1212
Script installation
1313
</.title>
1414
15-
<div class="text-sm mt-4 leading-6">
15+
<div class="text-sm my-4 leading-6">
1616
Paste this snippet into the <code>&lt;head&gt;</code>
1717
section of your site. See our
1818
<.styled_link href="https://plausible.io/docs/integration-guides" new_tab={true}>
@@ -98,12 +98,14 @@ defmodule PlausibleWeb.Live.InstallationV2.Instructions do
9898
WordPress installation
9999
</.title>
100100
<div class="text-sm mt-4 leading-6">
101-
<span :if={@recommended_installation_type == "wordpress"}>
102-
We've detected your website is using WordPress. Here's how to integrate Plausible:
103-
</span>
104-
<span :if={@recommended_installation_type != "wordpress"}>
105-
Using Wordpress? Here's how to integrate Plausible:
106-
</span>
101+
<div class="mb-4">
102+
<span :if={@recommended_installation_type == "wordpress"}>
103+
We've detected your website is using WordPress. Here's how to integrate Plausible:
104+
</span>
105+
<span :if={@recommended_installation_type != "wordpress"}>
106+
Using Wordpress? Here's how to integrate Plausible:
107+
</span>
108+
</div>
107109
<.focus_list>
108110
<:item>
109111
<.styled_link href="https://plausible.io/wordpress-analytics-plugin" new_tab={true}>
@@ -161,7 +163,7 @@ defmodule PlausibleWeb.Live.InstallationV2.Instructions do
161163

162164
def npm_instructions(assigns) do
163165
~H"""
164-
<.title class="mt-4">
166+
<.title class="my-4">
165167
NPM installation
166168
</.title>
167169
<.focus_list>

test/plausible_web/live/verification_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule PlausibleWeb.Live.VerificationTest do
1212
@retry_button ~s|a[phx-click="retry"]|
1313
# @go_to_dashboard_button ~s|a[href$="?skip_to_dashboard=true"]|
1414
@progress ~s|#verification-ui p#progress|
15-
@awaiting ~s|#verification-ui p#awaiting|
15+
@awaiting ~s|#verification-ui span#awaiting|
1616
@heading ~s|#verification-ui h2|
1717

1818
describe "GET /:domain" do

0 commit comments

Comments
 (0)