rework email settings for true progressive enhancement
All checks were successful
deploy / deploy (push) Successful in 1m19s
All checks were successful
deploy / deploy (push) Successful in 1m19s
Render all adapter field sections in the form with CSS :has(:checked) controlling visibility. Selecting a provider instantly shows its config fields — no JS, no page reload, no server round-trip needed. - Render all 6 adapter configs with data-adapter attribute - CSS :has(:checked) show/hide rules per adapter in admin stylesheet - Namespace field names per adapter (email[brevo][api_key] etc) - Drop 4 transactional-only providers (Resend, Postmark, Mailgun, MailPace) - Remove noscript "Switch provider" button and controller redirect workaround - Remove configured_adapter hidden input tracking - Hide JS-only test email button for no-JS users via noscript style - LiveView progressively enhances with async save and test email Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1492,7 +1492,7 @@
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
&.card-radio-card-selected {
|
||||
&:has(:checked) {
|
||||
border-color: var(--t-text-primary, #171717);
|
||||
background: var(--t-surface-sunken, #e5e5e5);
|
||||
}
|
||||
@@ -4379,6 +4379,20 @@
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
/* Show only the adapter config matching the checked radio */
|
||||
.admin-adapter-config[data-adapter] { display: none; }
|
||||
|
||||
.admin-content-medium:has(#email-adapter-brevo:checked) [data-adapter="brevo"],
|
||||
.admin-content-medium:has(#email-adapter-sendgrid:checked) [data-adapter="sendgrid"],
|
||||
.admin-content-medium:has(#email-adapter-mailjet:checked) [data-adapter="mailjet"],
|
||||
.admin-content-medium:has(#email-adapter-mailersend:checked) [data-adapter="mailersend"],
|
||||
.admin-content-medium:has(#email-adapter-smtp:checked) [data-adapter="smtp"],
|
||||
.admin-content-medium:has(#email-adapter-postal:checked) [data-adapter="postal"] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
/* ── Campaign form ── */
|
||||
|
||||
.admin-campaign-actions {
|
||||
|
||||
Reference in New Issue
Block a user