Skip to content

Commit 677afe0

Browse files
fix(web): use standard stack confirmation spacing
1 parent 81dab65 commit 677afe0

1 file changed

Lines changed: 32 additions & 20 deletions

File tree

‎apps/web/src/components/pullRequest/PullRequestStackMenu.tsx‎

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ import { useAtomCommand } from "~/state/use-atom-command";
1111
import { pullRequestEnvironment } from "~/state/pullRequests";
1212
import { Button, InlineButton } from "../ui/button";
1313
import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover";
14-
import { Dialog, DialogPopup, DialogTitle, DialogDescription } from "../ui/dialog";
14+
import {
15+
Dialog,
16+
DialogPopup,
17+
DialogTitle,
18+
DialogDescription,
19+
DialogHeader,
20+
DialogPanel,
21+
DialogFooter,
22+
} from "../ui/dialog";
1523
import { toastManager } from "../ui/toast";
1624
import { resolvePullRequestState } from "./pullRequestPresentation";
1725
import { cn } from "~/lib/utils";
@@ -179,31 +187,35 @@ export function PullRequestStackMenu({
179187
}}
180188
>
181189
<DialogPopup className="max-w-md" showCloseButton={!pending}>
182-
<DialogTitle>
183-
{confirmation === "merge"
184-
? `Merge ${unmerged.length} pull requests?`
185-
: `Rebase ${unmerged.length} pull requests?`}
186-
</DialogTitle>
187-
<DialogDescription>
188-
{confirmation === "merge"
189-
? `Merge the entire stack into ${stack.base} using ${mergeMethod}. GitHub checks every layer's rules before merging or queueing the stack.`
190-
: `Rebase the remote branches from bottom to top onto ${stack.base}. This rewrites branch history and may restart checks. If a layer fails, earlier updates remain.`}
191-
</DialogDescription>
192-
<div className="my-3 max-h-48 overflow-y-auto text-sm">
193-
{unmerged.map((layer) => (
194-
<div key={layer.number}>
195-
#{layer.number} {layer.title || layer.headBranch}
196-
</div>
197-
))}
198-
</div>
199-
<div className="flex justify-end gap-2">
190+
<DialogHeader>
191+
<DialogTitle>
192+
{confirmation === "merge"
193+
? `Merge ${unmerged.length} pull requests?`
194+
: `Rebase ${unmerged.length} pull requests?`}
195+
</DialogTitle>
196+
<DialogDescription>
197+
{confirmation === "merge"
198+
? `Merge the entire stack into ${stack.base} using ${mergeMethod}. GitHub checks every layer's rules before merging or queueing the stack.`
199+
: `Rebase the remote branches from bottom to top onto ${stack.base}. This rewrites branch history and may restart checks. If a layer fails, earlier updates remain.`}
200+
</DialogDescription>
201+
</DialogHeader>
202+
<DialogPanel>
203+
<div className="max-h-48 overflow-y-auto text-sm">
204+
{unmerged.map((layer) => (
205+
<div key={layer.number}>
206+
#{layer.number} {layer.title || layer.headBranch}
207+
</div>
208+
))}
209+
</div>
210+
</DialogPanel>
211+
<DialogFooter>
200212
<Button variant="outline" disabled={pending} onClick={() => setConfirmation(null)}>
201213
Cancel
202214
</Button>
203215
<Button disabled={pending} onClick={() => void run()}>
204216
{pending ? "Working…" : confirmation === "merge" ? "Merge stack" : "Rebase stack"}
205217
</Button>
206-
</div>
218+
</DialogFooter>
207219
</DialogPopup>
208220
</Dialog>
209221
</>

0 commit comments

Comments
 (0)