fix(personnel): mobile layout for conversations
- Converse button no longer floats over the hero text on phones: it sits in the card's content flow below the status chips and only anchors to the hero's right edge from md up - conversation dialog keeps a side margin on small screens instead of rendering edge-to-edge - dialog titles truncate with min-w-0 so long NPC names and attachment urls cannot push the close buttons out
This commit is contained in:
parent
6d2cde88db
commit
b1168dcc38
3 changed files with 11 additions and 10 deletions
|
|
@ -356,17 +356,17 @@ export function NpcConversation({ npc, dialogue }: NpcConversationProps) {
|
||||||
<Dialog open={open} onOpenChange={(next) => !next && close()}>
|
<Dialog open={open} onOpenChange={(next) => !next && close()}>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
showCloseButton={false}
|
showCloseButton={false}
|
||||||
className="flex max-w-2xl flex-col gap-0 overflow-hidden rounded-none border border-white/20 bg-zinc-950 p-0 text-white sm:rounded-none"
|
className="flex w-[calc(100%-1.5rem)] max-w-2xl flex-col gap-0 overflow-hidden rounded-none border border-white/20 bg-zinc-950 p-0 text-white sm:w-full sm:rounded-none"
|
||||||
>
|
>
|
||||||
<div className={`relative flex items-center justify-between ${DOSSIER.strip}`}>
|
<div className={`relative flex items-center justify-between ${DOSSIER.strip}`}>
|
||||||
<DialogTitle className="font-mono text-[10px] font-normal uppercase tracking-widest text-white/60">
|
<DialogTitle className="min-w-0 truncate font-mono text-[10px] font-normal uppercase tracking-widest text-white/60">
|
||||||
Conversation // {npc.name}
|
Conversation // {npc.name}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={close}
|
onClick={close}
|
||||||
aria-label="Close conversation"
|
aria-label="Close conversation"
|
||||||
className="text-white/40 transition-colors hover:text-white/90"
|
className="shrink-0 text-white/40 transition-colors hover:text-white/90"
|
||||||
>
|
>
|
||||||
<XIcon className="size-4" />
|
<XIcon className="size-4" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -154,12 +154,6 @@ export function NpcProfile({ npc, listings, employmentSlot, conversationSlot }:
|
||||||
<ClassificationStrip left="Personnel File // Theater Contacts" right={`REF ${refCode}`} />
|
<ClassificationStrip left="Personnel File // Theater Contacts" right={`REF ${refCode}`} />
|
||||||
<CornerBrackets />
|
<CornerBrackets />
|
||||||
|
|
||||||
{conversationSlot ? (
|
|
||||||
<div className="absolute right-6 top-1/2 z-20 -translate-y-1/2 md:right-12">
|
|
||||||
{conversationSlot}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
<div className="relative z-10 flex flex-col gap-3 px-6 py-10 md:py-14">
|
<div className="relative z-10 flex flex-col gap-3 px-6 py-10 md:py-14">
|
||||||
<h1
|
<h1
|
||||||
data-text={npc.name}
|
data-text={npc.name}
|
||||||
|
|
@ -184,6 +178,13 @@ export function NpcProfile({ npc, listings, employmentSlot, conversationSlot }:
|
||||||
activityOptions={activityOptions}
|
activityOptions={activityOptions}
|
||||||
/>
|
/>
|
||||||
<NpcStatusChips npc={npc} className="mt-1" />
|
<NpcStatusChips npc={npc} className="mt-1" />
|
||||||
|
{conversationSlot ? (
|
||||||
|
// Mobile: a normal button in the card's flow so it never covers
|
||||||
|
// the bio text. md+: floated to the hero's right edge as before.
|
||||||
|
<div className="z-20 self-start pt-1 md:absolute md:right-12 md:top-1/2 md:-translate-y-1/2 md:self-auto md:pt-0">
|
||||||
|
{conversationSlot}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative z-10">
|
<div className="relative z-10">
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ function DialogueLink({ href, children }: { href: string; children: ReactNode })
|
||||||
className="flex h-[85vh] w-[92vw] max-w-6xl flex-col gap-0 overflow-hidden rounded-none border border-white/20 bg-zinc-950 p-0 text-white sm:max-w-6xl"
|
className="flex h-[85vh] w-[92vw] max-w-6xl flex-col gap-0 overflow-hidden rounded-none border border-white/20 bg-zinc-950 p-0 text-white sm:max-w-6xl"
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between gap-4 border-b border-white/15 bg-black/50 px-4 py-2 backdrop-blur-sm">
|
<div className="flex items-center justify-between gap-4 border-b border-white/15 bg-black/50 px-4 py-2 backdrop-blur-sm">
|
||||||
<DialogTitle className="truncate font-mono text-[10px] font-normal uppercase tracking-widest text-white/60">
|
<DialogTitle className="min-w-0 truncate font-mono text-[10px] font-normal uppercase tracking-widest text-white/60">
|
||||||
Attachment // {href.slice(0, 96)}
|
Attachment // {href.slice(0, 96)}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<div className="flex shrink-0 items-center gap-3">
|
<div className="flex shrink-0 items-center gap-3">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue