feat(sort): give SortControl the FilterSelect pill look with a footer direction segment
Rebuilds SortControl's internals (API unchanged, so all five consumers — feed, Plex, playlists, and the two table/card ColumnSortControl sites — get it for free) as a labeled "Label: key ↓ ▾" pill on the AnchoredPopover platform, matching FilterSelect. The listbox lists the sort keys; an asc/desc segment sits in the panel footer (with the trailing slot — feed reshuffle, playlists dirty-first — beside it). Two-dimensional key+direction, so it stays its own component rather than reusing FilterSelect: the trigger is a single plain button (no nested button), picking a key keeps the panel open so key AND direction can be set in one visit, and picking "no sort" (tables' defaultLabel) closes it. Directionless keys (shuffle) hide the segment and drop the trigger arrow. Drops the now-redundant external "Sort" label spans in Feed and PlexBrowse (the trigger carries the label now). Rewrites SortControl.dom.test for the popover UI.
This commit is contained in:
@@ -626,7 +626,6 @@ export default function Feed({
|
||||
: " "}
|
||||
</span>
|
||||
<div className="ml-auto flex items-center gap-2">
|
||||
<span className="text-xs text-muted">{t("feed.sortLabel")}</span>
|
||||
<SortControl
|
||||
options={sortOptions}
|
||||
sort={{ key: sortKey, dir: sortDir }}
|
||||
|
||||
Reference in New Issue
Block a user