feat(design): titles in click surfaces stay selectable (E28 S3e4b)
A button whose text is a title or a name is now `selectable` (FocusSafeButton, under Pressable and Button): Chrome selects inside a button once it is user-select: text (measured), and the click that ends a selection, or a press dragged past the slop, opens nothing. 23 surfaces carry it (cards, rows, people, channels, playlists, users, views, messages, log lines, description links); the Plex caption div gets the same guard. A contract test pins every plain Pressable with its reason, so a new one has to choose.
This commit is contained in:
@@ -190,6 +190,7 @@ function EpisodeRow({ ep, ctx, dense }: { ep: PlexCard; ctx: Ctx; dense: boolean
|
||||
{ep.episode_number}
|
||||
</span>
|
||||
<Pressable
|
||||
selectable
|
||||
onClick={() => ctx.onPlay(ep.id)}
|
||||
data-nav-open
|
||||
className="group/thumb flex min-w-0 flex-1 items-center gap-2.5"
|
||||
@@ -242,6 +243,7 @@ function MovieRow({ item, ctx }: { item: PlexCard; ctx: Ctx }) {
|
||||
{...listeners}
|
||||
/>
|
||||
<Pressable
|
||||
selectable
|
||||
onClick={() => ctx.onPlay(item.id)}
|
||||
data-nav-open
|
||||
className="group/thumb flex min-w-0 flex-1 items-center gap-3"
|
||||
@@ -327,6 +329,7 @@ function ShowGroup({ block, ctx }: { block: ShowBlock; ctx: Ctx }) {
|
||||
</Pressable>
|
||||
)}
|
||||
<Pressable
|
||||
selectable
|
||||
onClick={() => ctx.toggleShow(block.showKey)}
|
||||
data-nav-open
|
||||
className="min-w-0 flex-1"
|
||||
|
||||
Reference in New Issue
Block a user