fix(plex): make the header Discover/Browse toggle clickable
The floating header wrapper is pointer-events-none (so clicks fall through its empty area to the content below); every interactive child must re-enable pointer events. PlexViewToggle rendered its SegmentedToggle without the pointer-events-auto wrapper the sibling PlexScopeToggle has, so the whole Discover/Browse switch was click-dead — the buttons rendered and were correctly wired, but no real mouse click ever reached them. Add `className="pointer-events-auto shrink-0"` to the toggle and a regression test that asserts the root re-enables pointer events (plus the render/onChange/hide-on-deeper-view contract). Verified live on localdev: real clicks now switch Discover⟷Browse (?v=browse) in both directions; a header-wide hit-test audit shows no other dead controls. Gate: tsc/lint/knip/prettier clean, 418 vitest.
This commit is contained in:
@@ -11,9 +11,13 @@ export default function PlexViewToggle() {
|
||||
// Only the two title-browse views host the Discover/Browse choice; deeper views (show/info/person/…)
|
||||
// and the playlists/collections browse surfaces hide it.
|
||||
if (!ctl || (ctl.kind !== "discover" && ctl.kind !== "grid")) return null;
|
||||
// The floating header wrapper is pointer-events-none (so clicks fall through its empty area to the
|
||||
// content below); every interactive child must re-enable pointer events or it is click-dead — the
|
||||
// sibling PlexScopeToggle does the same.
|
||||
return (
|
||||
<SegmentedToggle
|
||||
size="md"
|
||||
className="pointer-events-auto shrink-0"
|
||||
ariaLabel={t("plex.view.label")}
|
||||
options={[
|
||||
{ value: "discover", label: t("plex.discover.tab") },
|
||||
|
||||
Reference in New Issue
Block a user