Repository navigation
feat(web): name the open page in the tab title, and tint text selection with the primary #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { describe, expect, test } from "vitest" | ||
| import { documentTitleOf } from "./chrome" | ||
|
|
||
| describe("documentTitleOf", () => { | ||
| test("leads with the page's own name, then its parent", () => { | ||
| expect(documentTitleOf([{ label: "Services", href: "/services" }, { label: "checkout-api" }])).toBe( | ||
| "checkout-api · Services · Maple", | ||
| ) | ||
| }) | ||
|
|
||
| test("a name that is still loading leaves the tab on its parent", () => { | ||
| expect(documentTitleOf([{ label: "Traces", href: "/traces" }, { label: "Loading…" }])).toBe( | ||
| "Traces · Maple", | ||
| ) | ||
| }) | ||
|
|
||
| test("a deep trail keeps its last two names", () => { | ||
| expect( | ||
| documentTitleOf([ | ||
| { label: "Alerts", href: "/alerts" }, | ||
| { label: "Rules", href: "/alerts/rules" }, | ||
| { label: "High error rate" }, | ||
| ]), | ||
| ).toBe("High error rate · Rules · Maple") | ||
| }) | ||
|
|
||
| test("no trail is the app's name alone", () => { | ||
| expect(documentTitleOf([])).toBe("Maple") | ||
| }) | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -812,6 +812,12 @@ | |
| * { | ||
| @apply border-border outline-ring/50; | ||
| } | ||
| /* Selected text takes the primary's strong wash instead of the system blue, and reads in | ||
| `foreground`: a muted or toned run would fall under 4.5:1 on the wash. */ | ||
| ::selection { | ||
| background-color: var(--color-primary-a4); | ||
| color: var(--color-foreground); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning Selected text inside a F1 · Warning · correctness Forcing 🤖 Prompt to fix with an AI agent |
||
| } | ||
|
Check warning on line 820 in packages/ui/src/styles/tokens.css
|
||
| body { | ||
| @apply font-sans bg-background text-foreground; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.