Skip to content

Commit 1e875be

Browse files
committed
refactor(branding): trim Google icon tests and correct the SVG wrapper
Drop the GoogleIcon and SocialLoginButtons snapshot tests: they pinned exact attribute strings, the asset byte length, and the absence of markup the component never contained, so they broke on any legitimate tweak without catching real regressions. Correct the wrapper's viewBox to 0 0 200 204 so it matches the artwork, which bleeds to all four edges. The previous 204-wide box pinned four units of dead space to the right via xMinYMin, offsetting the mark within its box. Rewrite the TSDoc: it described avoiding a WebKit foreignObject gradient bug, but this file never used foreignObject and already ships 106 linearGradient definitions. Document the real reason instead - Google publishes the current G only as a raster. Align the auth button icon on shrink-0 with its sibling callsite.
1 parent 705ecd7 commit 1e875be

5 files changed

Lines changed: 13 additions & 168 deletions

File tree

apps/docs/components/icons.tsx

Lines changed: 6 additions & 13 deletions
Large diffs are not rendered by default.

apps/sim/app/(auth)/components/social-login-buttons.test.tsx

Lines changed: 0 additions & 81 deletions
This file was deleted.

apps/sim/app/(auth)/components/social-login-buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function SocialLoginButtons({
8585
const googleButton = (
8686
<Chip
8787
fullWidth
88-
leftAdornment={<GoogleIcon className='size-[20px] flex-shrink-0' />}
88+
leftAdornment={<GoogleIcon className='size-[20px] shrink-0' />}
8989
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
9090
disabled={!googleAvailable || isGoogleLoading}
9191
onClick={signInWithGoogle}

apps/sim/components/icons.test.tsx

Lines changed: 0 additions & 60 deletions
This file was deleted.

apps/sim/components/icons.tsx

Lines changed: 6 additions & 13 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)