feat(design): every button on its family, the chip primitive, the lint rule (E28 S3b2)
The second half of the button sweep: the remaining hand-rolled buttons in
feature components, the design lab and the components/ui composites now
stand on Button, IconButton, Pressable, Chip or DragHandle.
- Chip + DismissibleChip (filter / token / tag / suggest / ghost, 24px
floor, 44 on touch) replace five chip geometries; FilterChipGroup
renders Chips; overflow lanes measure a mirror painted by chipClass.
- The Plex control row is IconButton's player rung (36, 20px glyph,
round, overlay; 44 on touch); the YT modal bar is on the sm rung with
pressed cycle toggles and names that survive a folded label.
- New variants: IconButton ghost-accent, danger-soft; Button warn on a
new state-warn utility. The .btn-{tone} recipes and btnCls are gone.
- Fixed on the way: membership rows (collection editor, Plex playlist
add) announce checked/mixed; a one-letter tag chip was 21px wide;
descriptionLinks moved out of lib/ (it renders components).
- local/button-primitive: a raw <button>/<FocusSafeButton> outside the
control-primitive files is a lint error (contract-tested, seen red).
This commit is contained in:
@@ -4,7 +4,7 @@ import { usePlexCollectionTitles } from "../lib/usePlexCollectionTitles";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { plexLang } from "../i18n";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { ListMusic, Plus, SlidersHorizontal, X } from "lucide-react";
|
||||
import { ListMusic, Plus, SlidersHorizontal } from "lucide-react";
|
||||
import { api, plexFilterCount, type PlexFilters } from "../lib/api";
|
||||
import { notifyActionError } from "../lib/actionErrors";
|
||||
import { type PanelLayout } from "../lib/panelLayout";
|
||||
@@ -20,6 +20,7 @@ import PersonalViewsModal from "./PersonalViewsModal";
|
||||
import { useSavedViews } from "./savedViewsContext";
|
||||
import { usePlex, usePlexActions } from "./plexContext";
|
||||
import { useMe } from "../lib/useMe";
|
||||
import { DismissibleChip } from "./ui/Chip";
|
||||
|
||||
// The Plex module's left filter column — now the shared floating SidePanel with its filter groups
|
||||
// as reorderable "islands" (same system as the feed rail). Movie libraries get the full metadata
|
||||
@@ -498,16 +499,13 @@ function CollectionPicker({
|
||||
function RemovableChip({ label, onRemove }: { label: string; onRemove: () => void }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<span className="chip px-2 py-1 text-xs">
|
||||
<span className="truncate max-w-36">{label}</span>
|
||||
<button
|
||||
onClick={onRemove}
|
||||
className="hover:opacity-70"
|
||||
aria-label={t("common.removeNamed", { name: label })}
|
||||
>
|
||||
<X className="w-3 h-3" />
|
||||
</button>
|
||||
</span>
|
||||
<DismissibleChip
|
||||
onDismiss={onRemove}
|
||||
dismissLabel={t("common.removeNamed", { name: label })}
|
||||
className="max-w-40"
|
||||
>
|
||||
{label}
|
||||
</DismissibleChip>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user