fix(ui): stable shelf-card menu triggers, a named Button by type, true layout comments

- Home's rail handed each card a fresh `() => menu.triggerProps(c)` per
  render, defeating memo(VideoCard) on every tile whenever the menu's own
  state changed. `useItemTriggers` (ui/useContextMenu) keeps one trigger per
  item, index-aligned; tested for identity across renders.
- The Button accessible-name union had one hole: `<Button icon={…} />` with
  no children and no size typechecked into a nameless button. A textful
  button now needs children or a name; pinned with @ts-expect-error.
- comfortPin's header said the pin belongs "on every card and row", which
  the code never meant (an episode, a season, a person are not pin kinds).
  It now says what is pinnable — and the show page's Related strip, whose
  shows ARE pinnable, gets the pin menu it was missing (and a rem width).
- gridColumns / feedView / VirtualGrid claimed layouts 1024–2560 are
  "byte-identical" under the column cap; the small cards are capped at 2560
  with the filter rail collapsed. The comments say so.
This commit is contained in:
2026-09-19 07:40:48 +02:00
parent 7ae5c57b6b
commit 29875b7367
11 changed files with 79 additions and 20 deletions
+5 -1
View File
@@ -412,9 +412,12 @@ export function CastStrip({
export function RelatedStrip({
related,
onOpen,
menuProps,
}: {
related: PlexCard[];
onOpen: (id: string) => void;
/** The comfort-pin context menu's trigger (a related show is pinnable like any poster). */
menuProps?: (c: PlexCard) => Record<string, unknown>;
}) {
const { t } = useTranslation();
return (
@@ -428,8 +431,9 @@ export function RelatedStrip({
<button
key={r.id}
{...navItemAttrs(i)}
{...menuProps?.(r)}
onClick={() => onOpen(r.id)}
className="group w-[130px] shrink-0 text-left"
className="group w-32.5 shrink-0 text-left"
>
<div className="glass-card glass-hover relative aspect-2/3 rounded-xl overflow-hidden transition-all duration-200">
<img