Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions e2e/sign-in-button.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { expect, test } from '@playwright/test';

test.describe('Sign in button', () => {
test('renders without issue', async ({ page }) => {
await page.goto('/');

const signIn = page.getByRole('link', { name: /^sign in$/i });
await expect(signIn).toBeVisible();
});

test('matches header snapshot', async ({ page }) => {
await page.goto('/');

const header = page.locator('header').first();
await expect(header).toBeVisible();
await expect(header).toHaveScreenshot('header-sign-in.png');
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions src/components/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useSession } from "next-auth/react";
import { useState, useEffect } from "react";

import { Button } from "@/components/ui/button";
import { RFDS } from "@/components/rfds";
import { MobileMenu } from "@/components/layout/mobile-menu";
import { UserAvatar } from "@/components/ui/user-avatar";
import { ThemeToggleWrapper } from "@/components/ui/theme-toggle-wrapper";
Expand Down Expand Up @@ -150,12 +151,9 @@ export function Header() {
className="transition hover:border-primary/50 hover:shadow-lg hover:shadow-primary/20"
/>
) : (
<Link
href="/api/auth/signin"
className="rounded-full border border-border bg-primary px-4 py-2 text-xs font-semibold uppercase tracking-[0.2em] text-primary-foreground transition hover:bg-primary/90"
>
<RFDS.ButtonLink href="/api/auth/signin" size="sm">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This swap does fix the contrast token, but it also changes the sign-in CTA typography/spacing/shadow (text-xs uppercase tracking -> default ButtonLink sm). Please either preserve the previous shape more narrowly or document/test the broader visual restyle so the scope matches the PR description.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visually, it makes sense to use a consistent style for the primary button, so that "Get involved" and "Sign in" buttons now look more unified.

Sign in
</Link>
</RFDS.ButtonLink>
)}
</div>

Expand Down
Loading