From 6b2b5e6e923cd53c38c53ef4d130dd407b2639d5 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Wed, 15 Oct 2025 01:01:52 -0500 Subject: [PATCH] Fix PR card layout to prevent button overflow Restructured the PR card layout to prevent the Merge button from going off-screen: - Changed from inline flex layout to stacked layout with separate actions row - Moved action buttons to their own row below PR info - Added proper spacing with pl-7 to align with content - Changed button variants for better visibility (outline instead of ghost) - Added "View" text to external link button for clarity - Better wrapping for title and badges with flex-wrap - Buttons now have consistent sizing and spacing The actions row only shows when there are actions to display (review/merge or external link), keeping the layout clean for merged PRs with no actions. --- src/components/GitDialog.tsx | 143 ++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/src/components/GitDialog.tsx b/src/components/GitDialog.tsx index ad580a52..b8f18a0a 100644 --- a/src/components/GitDialog.tsx +++ b/src/components/GitDialog.tsx @@ -990,81 +990,84 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog {pullRequests.map((pr) => (
- -
-
-
-
-

- {pr.title} -

- {pr.state === 'merged' && ( - - Merged - - )} -
-

- #{pr.number} by {pr.isOwner ? 'you' : pr.author} • {pr.sourceBranch} → {pr.targetBranch} -

-
-
- {!pr.isOwner && pr.state === 'open' && ( - <> - - - - )} - {!originUrl.startsWith('nostr://') && ( - +
+ +
+
+

+ {pr.title} +

+ {pr.state === 'merged' && ( + + Merged + )}
+

+ #{pr.number} by {pr.isOwner ? 'you' : pr.author} • {pr.sourceBranch} → {pr.targetBranch} +

+ + {/* Actions row */} + {(!pr.isOwner && pr.state === 'open') || !originUrl.startsWith('nostr://') ? ( +
+ {!pr.isOwner && pr.state === 'open' && ( + <> + + + + )} + {!originUrl.startsWith('nostr://') && ( + + )} +
+ ) : null}
))}