From 808eaecc85e8fd4b90e9835985d5c8a84757dec4 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sat, 16 May 2026 19:10:08 +0200 Subject: [PATCH] feat(14-02): migrate auth_login.templ to AuthLayout with ui.FormField inputs - Replace Layout+Card pattern with AuthLayout("Sign in to Xtablo", csrfToken) - Wire GoogleButton and AuthDivider into LoginPage body - Replace raw elements with @ui.FormField/@ui.Input design system components - Add signup-copy nav link ("Don't have an account? Sign up") - Preserve HTMX swap: hx-post="/login" hx-target="#login-form" hx-swap="outerHTML" - Remove loginCardBody, AuthProviderButtonsBlock, AuthProviderButtonControl helpers - Update test assertions for new GoogleButton labels ("Sign in with Google" / disabled attr) --- backend/internal/web/handlers_auth_test.go | 14 +-- backend/templates/auth_login.templ | 106 +++++++++------------ 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/backend/internal/web/handlers_auth_test.go b/backend/internal/web/handlers_auth_test.go index 7e94997..27c638a 100644 --- a/backend/internal/web/handlers_auth_test.go +++ b/backend/internal/web/handlers_auth_test.go @@ -167,7 +167,7 @@ func TestSignupProviderButtonsConfigured(t *testing.T) { body := rec.Body.String() for _, want := range []string{ - "Continue with Google", + "Sign in with Google", `href="/auth/google/start"`, ">or<", `name="email"`, @@ -192,9 +192,10 @@ func TestSignupProviderButtonsDisabledWhenConfigMissing(t *testing.T) { router.ServeHTTP(rec, req) body := rec.Body.String() - for _, want := range []string{"Google sign-in not configured"} { + // GoogleButton renders a disabled - } -}