Skip to content

Make the login button blink obviously (#9123) - #9143

Open
jeffreypalermo wants to merge 1 commit into
masterfrom
cursor/9123-development
Open

Make the login button blink obviously (#9123)#9143
jeffreypalermo wants to merge 1 commit into
masterfrom
cursor/9123-development

Conversation

@jeffreypalermo

Copy link
Copy Markdown
Contributor

Summary

Make the unauthenticated header Login link blink with an obvious high-contrast pulse so visitors notice it. Respects prefers-reduced-motion with a static high-contrast fallback.

Files

  • src/UI.Shared/Components/LoginLink.razor — add login-link-blink class
  • src/UI.Shared/Components/LoginLink.razor.css — continuous pulse + reduced-motion static treatment
  • src/UnitTests/UI.Shared/MainLayoutTests.cs — assert blink class when anonymous; LoginLink absent when authenticated
  • src/AcceptanceTests/Authentication/LoginTests.cs — Playwright: blinking class when anonymous; LoginLink gone after login

Testing

  • PrivateBuild green (unit + integration)
  • Integration: N/A (UI-only; no API/DB seam)
  • Acceptance: LoginTests blink + post-login absence coverage

Closes #9123

Add scoped high-contrast pulse on LoginLink with reduced-motion fallback;
cover with bUnit and Playwright per Test Design.

Co-authored-by: Jeffrey Palermo <jeffrey@clear-measure.com>
Copilot AI lite review requested due to automatic review settings August 26, 2026 04:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an unauthenticated-only “blink/pulse” attention treatment to the header Login link in UI.Shared, plus unit and acceptance coverage to ensure the link blinks when anonymous and disappears after login.

Changes:

  • Adds login-link-blink CSS class to LoginLink anchor.
  • Introduces scoped CSS animation + reduced-motion fallback styling.
  • Extends bUnit and Playwright tests for anonymous blink and post-login absence.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/UI.Shared/Components/LoginLink.razor Adds login-link-blink class to the Login anchor.
src/UI.Shared/Components/LoginLink.razor.css Adds scoped pulse animation and reduced-motion fallback styling.
src/UnitTests/UI.Shared/MainLayoutTests.cs Adds assertions/tests for blink class when anonymous.
src/AcceptanceTests/Authentication/LoginTests.cs Adds acceptance coverage for blink class when anonymous; asserts Login link absent after login.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1 to +9
a.login-link-blink {
animation: login-link-blink-pulse 0.7s steps(2, end) infinite;
background-color: #f6e05e !important;
color: #1a202c !important;
font-weight: 700 !important;
transition: none !important;
outline: 3px solid #c53030;
outline-offset: 2px;
}
Comment on lines +147 to 160
[Test]
public async Task ShouldRenderLoginLink_WithBlinkClass_WhenUserIsNotAuthenticated()
{
await using var ctx = CreateContext();

var component = ctx.Render<CascadingAuthenticationState>(p => p.AddChildContent<MainLayout>());
var layout = component.FindComponent<MainLayout>();

var loginAnchor = layout.Find($"a[data-testid='{nameof(LoginLink.Elements.LoginLink)}']");
loginAnchor.ClassList.ShouldContain("login-link-blink");
loginAnchor.GetAttribute("href").ShouldBe("/login");
loginAnchor.GetAttribute("data-testid").ShouldBe(nameof(LoginLink.Elements.LoginLink));
loginAnchor.TextContent.Trim().ShouldBe("Login");
}
Comment on lines +61 to +79
[Test, Retry(2)]
public async Task Should_ShowBlinkingLoginLink_WhenAnonymous()
{
await Page.GotoAsync("/");
await Page.WaitForLoadStateAsync(LoadState.NetworkIdle);

var logoutLink = Page.GetByTestId(nameof(Logout.Elements.LogoutLink));
if (await logoutLink.CountAsync() > 0)
{
await logoutLink.ClickAsync();
await Page.WaitForURLAsync("**/");
}

var loginLink = Page.GetByTestId(nameof(LoginLink.Elements.LoginLink));
await Expect(loginLink).ToBeVisibleAsync();
await Expect(loginLink).ToHaveClassAsync(new Regex("login-link-blink"));
await Expect(loginLink).ToHaveAttributeAsync("href", "/login");
await Expect(loginLink).ToHaveTextAsync("Login");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the login button blink obviously

3 participants