improvement(feed): give the compact row's title the room back
Three from UAT: the row's cap goes 1280 -> 1472 (+15%), since with the rail and filters hidden there was a lot of page left over and the fixed columns mean the extra width can only go to the title; the views column drops the word and keeps it in the tooltip (a table doesn't repeat its unit every line), taking that column 144 -> 64; and the view switcher names the current mode where the toolbar has room, falling back to the icon alone below xl. Title: 431 -> 511 at 1440, 706 at 1900.
This commit is contained in:
@@ -96,12 +96,17 @@ export default function ViewSwitcher<T extends string>({
|
||||
onClick={() => (open ? close() : openMenu())}
|
||||
aria-haspopup="menu"
|
||||
aria-expanded={open}
|
||||
// The aria-label carries the mode's name at every size — the visible text below is a
|
||||
// nicety for wide windows, not the accessible name.
|
||||
aria-label={`${label}: ${current.label}`}
|
||||
title={`${label}: ${current.label}`}
|
||||
className="shrink-0 inline-flex items-center gap-1 pl-1.5 pr-1 py-1.5 rounded-lg border border-border bg-card text-fg hover:border-accent hover:text-accent active:translate-y-px transition"
|
||||
className="shrink-0 inline-flex items-center gap-1 pl-2 pr-1 py-1.5 rounded-lg border border-border bg-card text-fg hover:border-accent hover:text-accent active:translate-y-px transition"
|
||||
>
|
||||
<CurrentIcon className="w-4 h-4" />
|
||||
<ChevronDown className={`w-3 h-3 transition-transform ${open ? "rotate-180" : ""}`} />
|
||||
<CurrentIcon className="w-4 h-4 shrink-0" />
|
||||
{/* Name the current mode where the toolbar has room; below xl it's a busy row (show chips,
|
||||
content chips, source, count, sort) and the icon has to carry it alone. */}
|
||||
<span className="hidden xl:inline text-sm whitespace-nowrap">{current.label}</span>
|
||||
<ChevronDown className={`w-3 h-3 shrink-0 transition-transform ${open ? "rotate-180" : ""}`} />
|
||||
</button>
|
||||
{open && (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user