2026-02-12 08:35:22 +00:00
|
|
|
<.header>
|
2026-02-15 10:53:15 +00:00
|
|
|
{if @live_action == :new,
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
do: "Connect to #{@provider.name}",
|
|
|
|
|
else: "#{@provider.name} settings"}
|
2026-02-12 08:35:22 +00:00
|
|
|
</.header>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-form-narrow">
|
2026-02-12 08:35:22 +00:00
|
|
|
<%= if @live_action == :new do %>
|
complete admin CSS refactor: delete utilities.css, add layout primitives
- Delete utilities.css (701 lines / 24 KB of Tailwind utility clones)
- Add layout.css with admin-stack, admin-row, admin-cluster, admin-grid
primitives and gap variants (sm, md, lg, xl)
- Add transitions.css import and layout.css import to admin.css entry point
- Replace all Tailwind utility classes across 26 admin templates with
semantic admin-*/theme-*/page-specific CSS classes
- Replace all non-dynamic inline styles with semantic classes
- Add ~100 new semantic classes to components.css (analytics, dashboard,
order detail, settings, theme editor, generic utilities)
- Fix stray text-error → admin-text-error in media.ex
- Add missing .truncate definition to admin CSS
- Only remaining inline styles are dynamic data values (progress bars,
chart dimensions) and one JS.toggle target
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 21:40:21 +00:00
|
|
|
<p class="admin-section-desc">
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
{@provider.name} is a print-on-demand service that prints and ships products for you.
|
|
|
|
|
Connect your account to automatically import your products into your shop.
|
|
|
|
|
</p>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-callout">
|
|
|
|
|
<p class="admin-callout-title">Get your API key from {@provider.name}:</p>
|
|
|
|
|
<ol class="admin-callout-list">
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
<li>
|
add external link UX: icons, rel attributes, screen reader labels
New external_link component in core_components handles target="_blank",
rel="noopener noreferrer", external-link icon, and sr-only "(opens in
new tab)" text. Migrated admin providers form, settings (Stripe),
order tracking, onboarding setup links to use it. Fixed rel="noopener"
to "noopener noreferrer" on remaining links (email settings, product
show, core_components card radio). Added sr-only text to shop social
link cards and aria-label to page renderer tracking link.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 00:55:09 +00:00
|
|
|
<.external_link href={@provider.login_url} class="admin-link">
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
Log in to {@provider.name}
|
add external link UX: icons, rel attributes, screen reader labels
New external_link component in core_components handles target="_blank",
rel="noopener noreferrer", external-link icon, and sr-only "(opens in
new tab)" text. Migrated admin providers form, settings (Stripe),
order tracking, onboarding setup links to use it. Fixed rel="noopener"
to "noopener noreferrer" on remaining links (email settings, product
show, core_components card radio). Added sr-only text to shop social
link cards and aria-label to page renderer tracking link.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 00:55:09 +00:00
|
|
|
</.external_link>
|
|
|
|
|
(or <.external_link href={@provider.signup_url} class="admin-link">create a free account</.external_link>)
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
</li>
|
|
|
|
|
<li :for={step <- @provider.setup_steps}>
|
|
|
|
|
{raw(step)}
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
2026-02-12 08:35:22 +00:00
|
|
|
<% end %>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
2026-02-12 08:35:22 +00:00
|
|
|
<.form for={@form} id="provider-form" phx-change="validate" phx-submit="save">
|
2026-02-15 10:53:15 +00:00
|
|
|
<input type="hidden" name="provider_connection[provider_type]" value={@provider_type} />
|
2026-01-31 22:08:34 +00:00
|
|
|
|
2026-02-12 08:35:22 +00:00
|
|
|
<.input
|
|
|
|
|
field={@form[:api_key]}
|
|
|
|
|
type="password"
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
label={"#{@provider.name} API key"}
|
2026-02-12 08:35:22 +00:00
|
|
|
placeholder={
|
|
|
|
|
if @live_action == :edit,
|
|
|
|
|
do: "Leave blank to keep current key",
|
|
|
|
|
else: "Paste your key here"
|
|
|
|
|
}
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-inline-group">
|
2026-02-12 08:35:22 +00:00
|
|
|
<button
|
|
|
|
|
type="button"
|
2026-02-17 23:05:01 +00:00
|
|
|
class="admin-btn admin-btn-outline admin-btn-sm"
|
2026-02-12 08:35:22 +00:00
|
|
|
phx-click="test_connection"
|
|
|
|
|
disabled={@testing}
|
|
|
|
|
>
|
|
|
|
|
<.icon
|
|
|
|
|
name={if @testing, do: "hero-arrow-path", else: "hero-signal"}
|
|
|
|
|
class={if @testing, do: "size-4 animate-spin", else: "size-4"}
|
|
|
|
|
/>
|
|
|
|
|
{if @testing, do: "Checking...", else: "Check connection"}
|
|
|
|
|
</button>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<%= if @test_result do %>
|
2026-02-12 08:35:22 +00:00
|
|
|
<%= case @test_result do %>
|
2026-02-15 10:53:15 +00:00
|
|
|
<% {:ok, _info} -> %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<span class="admin-status-success">
|
2026-02-15 10:53:15 +00:00
|
|
|
<.icon name="hero-check-circle" class="size-4" />
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
Connected to {connection_name(@test_result) || @provider.name}
|
2026-02-12 08:35:22 +00:00
|
|
|
</span>
|
|
|
|
|
<% {:error, reason} -> %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<span class="admin-status-error">
|
2026-02-12 08:35:22 +00:00
|
|
|
<.icon name="hero-x-circle" class="size-4" />
|
|
|
|
|
{format_error(reason)}
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<% end %>
|
2026-02-12 08:35:22 +00:00
|
|
|
</div>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
2026-02-12 08:35:22 +00:00
|
|
|
<%= if @live_action == :edit do %>
|
|
|
|
|
<.input field={@form[:enabled]} type="checkbox" label="Connection enabled" />
|
|
|
|
|
<% end %>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-form-actions">
|
2026-02-12 08:35:22 +00:00
|
|
|
<.button type="submit" disabled={@testing}>
|
2026-02-15 10:53:15 +00:00
|
|
|
{if @live_action == :new,
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
do: "Connect to #{@provider.name}",
|
2026-02-15 10:53:15 +00:00
|
|
|
else: "Save changes"}
|
2026-02-12 08:35:22 +00:00
|
|
|
</.button>
|
2026-02-17 23:05:01 +00:00
|
|
|
<.link navigate={~p"/admin/providers"} class="admin-btn admin-btn-ghost">
|
2026-02-12 08:35:22 +00:00
|
|
|
Cancel
|
|
|
|
|
</.link>
|
|
|
|
|
</div>
|
|
|
|
|
</.form>
|
|
|
|
|
</div>
|