mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
fix(insights): soften Coach FAB glyph to the on-accent token
Drop the pure-white Coach floating-action-button icon for the button's own text-background on-accent token, so the glyph reads as a calmer mark on the purple-to-pink gradient instead of a harsh white. Update the colocated assertion to pin the glyph token.
This commit is contained in:
1 parent
a5b3715a46
commit
979d1ced8d
2 files changed
+7
-6
No files matched your search
@@ -71,7 +71,7 @@ describe("<LayoutCoachFab>", () => {
|
||||
expect(html).not.toContain("lg:bottom-6");
|
||||
});
|
||||
|
||||
it("paints a white glyph + offset focus ring on the gradient", () => {
|
||||
it("paints the on-accent glyph + offset focus ring on the gradient", () => {
|
||||
mockPathname = "/";
|
||||
const html = render(
|
||||
<CoachLaunchProvider>
|
||||
@@ -79,10 +79,11 @@ describe("<LayoutCoachFab>", () => {
|
||||
</CoachLaunchProvider>,
|
||||
);
|
||||
// The glyph is decorative (aria-hidden) and the button carries its own
|
||||
// accessible name, so the text-contrast rule does not gate it; the
|
||||
// white glyph reads as a clean mark on the gradient. The button still
|
||||
// sets text-background for any non-glyph text it might hold.
|
||||
expect(html).toContain("text-white");
|
||||
// accessible name, so the text-contrast rule does not gate it; the glyph
|
||||
// shares the button's own on-accent token (text-background) rather than a
|
||||
// harsh pure white, so it reads as a softer mark on the gradient.
|
||||
expect(html).not.toContain("text-white");
|
||||
expect(html).toMatch(/lucide-sparkles[^"]*text-background/);
|
||||
// The offset ring draws a visible halo around the gradient circle and
|
||||
// provides the non-text UI-component contrast against the page.
|
||||
expect(html).toContain("focus-visible:ring-offset-2");
|
||||
|
||||
@@ -238,7 +238,7 @@ export function LayoutCoachFab() {
|
||||
"[body:has([data-testid=onboarding-tour])_&]:invisible",
|
||||
)}
|
||||
>
|
||||
<Sparkles className="size-6 text-white" aria-hidden="true" />
|
||||
<Sparkles className="text-background size-6" aria-hidden="true" />
|
||||
{unread ? (
|
||||
// v1.18.6 (CCH-03) — discreet "the Coach said something" dot.
|
||||
// Deliberately NOT an alarming red (the medication-card rule:
|
||||
|
||||
Reference in new issue
Block a user