refactor(ui): reuse the store, media-query and deleted-tag rules the review found rebuilt, and name a loading pick

E32 review round 1 (F3–F6).

- Channels' open-row store and the chat dock use lib/store's createStore instead of a hand-rolled
  listener set (the chat dock gets a test of its own).
- The Plex backdrop reads prefers-reduced-motion through useMediaQuery; the query string is one
  constant (REDUCED_MOTION) for the hook and the carousel's one-off read.
- A link-restored collection filter showed its raw rating_key in the picker while the titles
  loaded: usePlexCollectionTitles now says it is pending, the picker draws a placeholder
  (labelsPending, as the channel picker does) and so does the chip row.
- The "deleted tag" rule was written twice with two i18n keys and had drifted: the channel manager
  showed NO chip for a pick while the tag list loaded, or ever after a failed load, while the pick
  still narrowed the table. One rule now (lib/tagPicks), one key (common.deletedTag); the manager's
  row shows every pick, as a placeholder while loading and as its id after a failure.
This commit is contained in:
2026-10-04 02:29:03 +02:00
parent e09d613b04
commit e5b155ada9
24 changed files with 245 additions and 129 deletions
@@ -232,7 +232,7 @@ describe("backend ids have their names in both languages", () => {
expect(failDetails).toEqual(expect.arrayContaining(["facebook.login_wall"]));
expect(goneWhats).toEqual(expect.arrayContaining(["playlist", "download", "job"]));
expect(opaqueWhats).toEqual([]);
expect(youtubeReasons).toEqual(["quota", "reconnect", "unavailable"]);
expect(youtubeReasons).toEqual(["quota", "reconnect", "unavailable", "gone"]);
expect(crewJobs).toEqual(
expect.arrayContaining(["Director", "Creator", "Director of Photography"]),
);
@@ -57,7 +57,6 @@
"createFailed": "Couldn't create the tag",
"updateFailed": "Couldn't update the tag",
"noTag": "No tag",
"deleted": "Deleted tag",
"moreCount_one": "{{count}} more tag",
"moreCount_other": "{{count}} more tags",
"suggestedHint": "Suggested from your tagging pattern ({{pct}}% match) — click to add",
+1
View File
@@ -26,6 +26,7 @@
"retry": "Retry",
"retryWithEnter": "Press Enter to try again.",
"loadError": "Couldn't load this — check your connection and try again",
"deletedTag": "Deleted tag",
"seeAll": "See all",
"scrollLeft": "Scroll left",
"scrollRight": "Scroll right",
-1
View File
@@ -4,7 +4,6 @@
"remove": "Remove filter: {{name}}",
"contentNone": "No content types",
"untagged": "Untagged",
"deletedTag": "Deleted tag",
"count_one": "{{count}} filter",
"count_other": "{{count}} filters",
"moreCount_one": "{{count}} more filter",
@@ -57,7 +57,6 @@
"createFailed": "Nem sikerült létrehozni a címkét",
"updateFailed": "Nem sikerült frissíteni a címkét",
"noTag": "Nincs címke",
"deleted": "Törölt címke",
"moreCount_one": "még {{count}} címke",
"moreCount_other": "még {{count}} címke",
"suggestedHint": "A címkézési mintád alapján javasolt ({{pct}}% egyezés) — kattints a hozzáadáshoz",
+1
View File
@@ -26,6 +26,7 @@
"retry": "Újra",
"retryWithEnter": "Újrapróbáláshoz nyomd meg az Entert.",
"loadError": "Nem sikerült betölteni — ellenőrizd a kapcsolatot, és próbáld újra",
"deletedTag": "Törölt címke",
"seeAll": "Összes",
"scrollLeft": "Görgetés balra",
"scrollRight": "Görgetés jobbra",
-1
View File
@@ -4,7 +4,6 @@
"remove": "Szűrő eltávolítása: {{name}}",
"contentNone": "Nincs tartalomtípus",
"untagged": "Címkézetlen",
"deletedTag": "Törölt címke",
"count_one": "{{count}} szűrő",
"count_other": "{{count}} szűrő",
"moreCount_one": "még {{count}} szűrő",