Skip to content
TypeScript

fix(web): center pull request unavailable states (#11110)

maria4d06156dd782
diff --git a/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx b/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
index 236d7cd86ad..5b86ef5ee3b 100644
--- a/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
+++ b/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
@@ -1447,7 +1447,13 @@ export function PullRequestDetailPanel({
onPickerOpenChange={setThreadPickerOpen}
/>
) : null}
- <div className="@container/pr-header grid min-w-0 shrink-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-x-2 border-b border-border/60">
+ <div
+ className={cn(
+ "@container/pr-header grid min-w-0 shrink-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-x-2",
+ detail && "border-b border-border/60",
+ !detail && !onClose && "hidden",
+ )}
+ >
<div className="ml-4 grid h-7 min-w-0 items-center overflow-hidden">
<div
aria-hidden={condensed}
@@ -2513,7 +2519,7 @@ export function PullRequestDetailPanel({
</div>
<div
- className="relative min-h-0 flex-1 overflow-hidden"
+ className="relative flex min-h-0 flex-1 flex-col overflow-hidden"
onScrollCapture={(event) => {
const scroller = event.target as HTMLElement;
scrollerRef.current = scroller;
diff --git a/apps/web/src/components/pullRequest/PullRequestsUnavailableState.tsx b/apps/web/src/components/pullRequest/PullRequestsUnavailableState.tsx
index 26c80326aec..f17ec882c5a 100644
--- a/apps/web/src/components/pullRequest/PullRequestsUnavailableState.tsx
+++ b/apps/web/src/components/pullRequest/PullRequestsUnavailableState.tsx
@@ -25,7 +25,7 @@ export function PullRequestsUnavailableState({
gitHubUrl?: string;
}) {
return (
- <Empty className="px-4 py-16 md:px-4">
+ <Empty className="min-h-0 justify-center-safe overflow-y-auto px-4 py-16 md:px-4 [&>*]:shrink-0">
<EmptyMedia variant="icon">
<GitPullRequestIcon />
</EmptyMedia>
diff --git a/apps/web/src/routes/_chat.pull-requests.tsx b/apps/web/src/routes/_chat.pull-requests.tsx
index 24dcab132b8..5a21a2cc37f 100644
--- a/apps/web/src/routes/_chat.pull-requests.tsx
+++ b/apps/web/src/routes/_chat.pull-requests.tsx
@@ -2362,7 +2362,7 @@ function PullRequestsColumn({
{/* The top padding is the shared fade band's height, the same pairing the
settings page makes: at rest the controls sit fully below the mask, and only
content actually passing under the chrome fades. */}
- <WorkspacePageContainer width="expanded" className="gap-4">
+ <WorkspacePageContainer width="expanded" className="min-h-full gap-4">
<div className="flex flex-col gap-3">
<div ref={inFlowSearchRef} className="flex flex-wrap items-center gap-2">
<div className="min-w-0 basis-full @lg/pr-list:basis-0 @lg/pr-list:flex-1">