mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
fix(pr-page): let the Start workspace button grow to fit its label (#40900)
* fix(pr-page): let the Start workspace button grow to fit its label The pull request header pinned that button to 180px with nowrap, so longer translations overflowed both edges and the arrow slid under the chevron. A minimum width keeps the stable size for short labels. tracked in STA-14595 Co-authored-by: 정의현 <rabbitdy0101@lemong.ai> * fix(pr-page): wrap the header when the workspace button no longer fits A long Start or Resume label grew past a narrow pull request page, the title collapsed, and the chevron was clipped. The title now keeps a floor so the actions wrap under it, and the label wraps only when that row is still too narrow. tracked in STA-14595 Co-authored-by: 정의현 <rabbitdy0101@lemong.ai> --------- Co-authored-by: 정의현 <rabbitdy0101@lemong.ai>
This commit is contained in:
@@ -137,20 +137,22 @@ export function PullRequestPageHeader({
|
||||
</div>
|
||||
|
||||
<div className="flex-none border-b border-border/60 px-6 py-5">
|
||||
<div className="flex items-start gap-4">
|
||||
<h1 className="min-w-0 flex-1 text-[26px] font-medium leading-snug text-foreground">
|
||||
{/* Why: a floor rather than min-w-0 — otherwise the title shrinks away and the actions never wrap. */}
|
||||
<div className="flex flex-wrap items-start gap-4">
|
||||
<h1 className="min-w-40 flex-1 text-[26px] font-medium leading-snug text-foreground">
|
||||
<span className="break-words">{workItem.title}</span>
|
||||
<span className="ml-2 align-baseline text-[20px] font-normal text-muted-foreground/70">
|
||||
#{workItem.number}
|
||||
</span>
|
||||
</h1>
|
||||
<div className="flex shrink-0 items-center gap-2">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
<DropdownMenu modal={false}>
|
||||
<ButtonGroup>
|
||||
<ButtonGroup className="max-w-full min-w-0 items-center">
|
||||
{/* Why: on its own line a long label is still wider than a narrow page, and nowrap would clip the chevron. */}
|
||||
<Button
|
||||
type="button"
|
||||
onClick={onOpenOrUsePR}
|
||||
className="w-[180px] justify-center gap-1.5 whitespace-nowrap"
|
||||
className="h-auto min-w-[180px] max-w-full shrink justify-center whitespace-normal"
|
||||
aria-label={
|
||||
hasAttachedWorkspace
|
||||
? t(
|
||||
|
||||
Reference in New Issue
Block a user