refactor(web): Empty has three sizes (#13040)

Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Fable 5 authored and GitHub committed 2026-09-22 12:22:19 -07:00
1 parent 0fa4a859f6
commit 0ee02ebf22
9 files changed
+53 -43

No files matched your search

@@ -100,7 +100,7 @@ export function PullRequestListEmptyState({
// Ahead of the search and the filters, because neither can produce a row until a project does.
if (!hasProjects) {
return (
<Empty className="py-16">
<Empty>
<BranchMark joined={false} />
<EmptyHeader>
<EmptyTitle>No projects in this workspace</EmptyTitle>
@@ -131,7 +131,7 @@ export function PullRequestListEmptyState({
if (query.length > 0) {
return (
<Empty className="py-16">
<Empty>
<BranchMark joined={false} />
<EmptyHeader>
{/* A pasted paragraph is still a search, but it is not a title. */}
@@ -142,7 +142,7 @@ export function PullRequestListEmptyState({
The hosts were searched for it. Try fewer words, or search by number, author or branch.
</EmptyDescription>
</EmptyHeader>
<EmptyContent className="flex-row flex-wrap justify-center gap-2">
<div className="flex flex-wrap justify-center gap-2">
<Button size="sm" variant="outline" onClick={onClearQuery}>
<SearchIcon className="size-3.5" />
Clear search
@@ -153,13 +153,13 @@ export function PullRequestListEmptyState({
<RefreshIcon size="sm" refreshing={refreshing} />
{refreshing ? "Checking..." : "Check again"}
</Button>
</EmptyContent>
</div>
</Empty>
);
}
return (
<Empty className="py-16">
<Empty>
<BranchMark joined={false} />
<EmptyHeader>
<EmptyTitle>{filtered ? "Nothing under these filters" : "No pull requests"}</EmptyTitle>
@@ -169,7 +169,7 @@ export function PullRequestListEmptyState({
: "Pull requests from every project in this workspace appear here."}
</EmptyDescription>
</EmptyHeader>
<EmptyContent className="flex-row flex-wrap justify-center gap-2">
<div className="flex flex-wrap justify-center gap-2">
{canLoadMore ? (
<Button size="sm" variant="outline" disabled={loadingMore} onClick={onLoadMore}>
{loadingMore ? "Loading..." : "Load more pull requests"}
@@ -179,7 +179,7 @@ export function PullRequestListEmptyState({
<RefreshIcon size="sm" refreshing={refreshing} />
{refreshing ? "Checking..." : "Check again"}
</Button>
</EmptyContent>
</div>
</Empty>
);
}
@@ -2,14 +2,7 @@ import { RefreshIcon } from "~/components/ui/refresh-icon";
import { ExternalLinkIcon } from "lucide-react";
import { Button } from "../ui/button";
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "../ui/empty";
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../ui/empty";
import { PullRequestGlyph } from "./pullRequestIcons";
export function PullRequestsUnavailableState({
@@ -26,7 +19,7 @@ export function PullRequestsUnavailableState({
gitHubUrl?: string;
}) {
return (
<Empty className="min-h-0 justify-center-safe overflow-y-auto px-4 py-16 md:px-4 [&>*]:shrink-0">
<Empty className="min-h-0 justify-center-safe overflow-y-auto [&>*]:shrink-0">
<EmptyMedia variant="icon">
<PullRequestGlyph.pullRequest />
</EmptyMedia>
@@ -37,7 +30,7 @@ export function PullRequestsUnavailableState({
<EmptyDescription>{error}</EmptyDescription>
</EmptyHeader>
{onRetry || gitHubUrl ? (
<EmptyContent className="flex-row flex-wrap justify-center gap-2">
<div className="flex flex-wrap justify-center gap-2">
{onRetry ? (
<Button
size="sm"
@@ -60,7 +53,7 @@ export function PullRequestsUnavailableState({
Open on GitHub
</Button>
) : null}
</EmptyContent>
</div>
) : null}
</Empty>
);