Verification to dashboard - #6516
Conversation
01949f3 to
511af2c
Compare
* Refine verification banner UI and copy - Simplify failure CTAs: keep "Check again" as primary, add ghost "Review installation" (or "Try another URL" when a custom URL retry is offered); remove installation-guide, change-method, and view-snippet expandable logic - Render inline "verify your installation manually" / "review your installation" links inside recommendation text (offer_custom_url_input scenarios) via safe HTML helpers, avoiding HEEx whitespace pitfalls - Tighten diagnostics title and body copy - Move the "Setup pending" pill in the sites list to replace the percentage indicator; use the generic pill component - Extend the notice component with title_class override and a spinner slot; swap success icon to solid check-circle * improve templating logic --------- Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
...and return the whole site struct. StatsController.stats action needs the whole site returned to known the "just updated" onboarding status when rendering the dashboard stats.html.
45547c4 to
3fd5593
Compare
There was a problem hiding this comment.
It was a lot to review so I don't feel like I could pay full attention to everything. Overall looks all good to me.
In general it doesn't feel great to me to have liveview running alongside React like this on the dashboard long-term but I also understand why it was done this way.
| const { queryParams } = (event as CustomEvent<VerificationFinishedDetail>) | ||
| .detail | ||
|
|
||
| navigate({ |
There was a problem hiding this comment.
Hmm I'm thinking using replace: true here would be more fitting so the path with URL params does not stay in the browser history.
There was a problem hiding this comment.
Agreed. Did that in 90342eb.
There's still one quirk where if you navigate in React (e.g. change period/filters) then the verification params will stay in those history entries. So for example:
- verification banner is visible (either loading or failed) and the params are in the URL
- open the page filter modal, then close it
- close the verification banner (params are stripped from the URL)
- hit back in browser history (page filter modal appears)
- Quirk: the verification params re-appear in the URL as well, refreshing the page now will bring verification back
In practice though, I think it's very unlikely to hurt the UX because:
- although some clicking-around on the dashboard to discover what it can do is expected, going back in browser history when there's nothing meaningful happening on the dashboard yet is probably rare.
- even though the query params might re-appear, the verification will only come back if 1) it didn't succeed before, and 2) the dashboard doesn't have any pageviews yet.
- the worst case scenario is: user has to dismiss the banner for a second time.
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
…t time) (#6571) * Revert "Use Blacksmith checkout with sticky-disk git mirror in Elixir CI (#6564)" This reverts commit fd528f2. * Fix inert service container health checks in Elixir CI The postgres and clickhouse health-check options were nested under env, so Docker never received a health check and jobs could start before ClickHouse was listening, failing ecto.create with Mint.TransportError{reason: :closed}. Move options to the service level and point the ClickHouse check at the real HTTP port (8123 /ping) instead of the unused 8124. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com> * Give ClickHouse a 2m health-check start period ClickHouse on these runners can take over 50s to start listening during load spikes (the same slowness behind the Aug 3+ ecto.create failures). Without a start period the health check flips to unhealthy after ~50s and the runner kills the job before the server is ready; probe failures during the start period no longer count toward --health-retries. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com> * Probe ClickHouse health check via 127.0.0.1, not localhost The server fails to bind [::] in these containers (IPv6 disabled) and falls back to 0.0.0.0 only, while busybox wget resolves localhost to ::1 and does not retry the next address, so the probe got connection refused forever and every service init failed. Reproduced against clickhouse/clickhouse-server:25.11.5.8-alpine: localhost fails, 127.0.0.1 succeeds and the container reports healthy within seconds. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com> --------- Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
350345a to
acab7c3
Compare
Adjust the global btn-base styling to make the button appear "disabled", when phx-click-loading is set on it.
Changes
Move verification (all flows:
provisioning,review, anddomain_change) to the dashboard (between the top bar and sources/pages reports). It will remain a LiveView, but will be teleported into the stats-react-container with the help of<.portal>. Various UI changes in this PR to make the UI feel more "banner-like".In addition to verification, we'll also move the email reports CTA from
stats.html.heexto React. The reason for that is positioning -- otherwise impossible to render it between top bar and stats reports.New db field and onboarding logic
This PR also includes a migration, adding a new
site.onboarding_statusfield which makes all of this possible. There are currently four different statuses possible::new_sitesite-switcher.js) should append?verify_installation=true&flow=provisioningto the URL to initiate a verification banner upon entering the dashboard.:verification_completedprovisioning/review/domain_change):first_pageviewsite.stats_start_dateis set for the very first time):verification_completed, we won't automatically trigger verification anymore:completedonboarding_statusfield -- running the migration will set the new field value to:completedfor every existing site./:domain/settings/email-reportslink) the email reports CTA banner.Migration
Tests
Changelog
Documentation
Dark mode