Skip to content

Commit 18c5a1d

Browse files
authored
fix(web): simplify pull request summary sections (#10612)
1 parent 6c69534 commit 18c5a1d

6 files changed

Lines changed: 152 additions & 141 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ export function PullRequestDetailPanel({
16541654
render={
16551655
<Button
16561656
size="xs"
1657-
variant="ghost"
1657+
variant="outline"
16581658
aria-label={
16591659
handoff?.startsWith("checkout") ? "Checking out..." : "Check out"
16601660
}
@@ -1734,7 +1734,7 @@ export function PullRequestDetailPanel({
17341734
<span className="inline-flex shrink-0">
17351735
<Button
17361736
size="xs"
1737-
variant="default"
1737+
variant="destructive-outline"
17381738
disabled={handoff !== null}
17391739
onClick={startResolveConflicts}
17401740
aria-label={

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ export function PullRequestMarkdown({
3939
[repositoryUrl],
4040
);
4141
return (
42-
<div className={cn("space-y-3", className)} data-image-gallery>
42+
<div
43+
className={cn(
44+
"space-y-3 [&_[data-markdown-details]]:border-0 [&_[data-markdown-details-summary]]:text-foreground/80 [&_[data-markdown-details-summary]>svg]:text-muted-foreground/60",
45+
className,
46+
)}
47+
data-image-gallery
48+
>
4349
{segments.map((segment) => {
4450
if (segment.kind === "markdown") {
4551
return (

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

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SearchIcon, UserCheckIcon } from "lucide-react";
1+
import { SearchIcon } from "lucide-react";
22
import { PullRequestStackPopover } from "./PullRequestStackPopover";
33
import { memo, type RefCallback } from "react";
44

@@ -14,6 +14,7 @@ import {
1414
PullRequestActorLabel,
1515
PullRequestDiffStat,
1616
PullRequestMetaLine,
17+
PullRequestApprovalGlyph,
1718
PullRequestStateGlyph,
1819
} from "./pullRequestPresentation";
1920

@@ -137,6 +138,26 @@ function PullRequestRowImpl({
137138
}
138139
/>
139140
) : null}
141+
{/* Only a verdict somebody has actually given: "review required" is the absence of
142+
one, and saying so on every unreviewed row would say nothing. */}
143+
{entry.reviewDecision === "approved" ? (
144+
<PullRequestApprovalGlyph />
145+
) : entry.reviewDecision === "changes-requested" ? (
146+
<span className="min-w-0 truncate text-amber-600/90 dark:text-amber-400/80">
147+
Changes requested
148+
</span>
149+
) : null}
150+
{entry.checksState === undefined ? null : (
151+
<PullRequestChecksPopover
152+
checksState={entry.checksState}
153+
environmentId={entry.environmentId}
154+
reference={{
155+
projectId: entry.projectId,
156+
repository: entry.repository,
157+
number: entry.number,
158+
}}
159+
/>
160+
)}
140161
<PullRequestDiffStat
141162
additions={entry.additions}
142163
deletions={entry.deletions}
@@ -195,35 +216,6 @@ function PullRequestRowImpl({
195216
labelClassName="sr-only @xs/pr-row-meta:not-sr-only @xs/pr-row-meta:truncate"
196217
/>
197218
{entry.labels.length > 0 ? <PullRequestRowLabels labels={entry.labels} /> : null}
198-
{/* Only a verdict somebody has actually given: "review required" is the absence of
199-
one, and saying so on every unreviewed row would say nothing. */}
200-
{entry.reviewDecision === "approved" ? (
201-
<Tooltip>
202-
<TooltipTrigger render={<span className="inline-flex shrink-0" />}>
203-
<UserCheckIcon
204-
aria-hidden
205-
className="size-3.5 text-emerald-600/90 dark:text-emerald-400/80"
206-
/>
207-
<span className="sr-only">Approved</span>
208-
</TooltipTrigger>
209-
<TooltipPopup>Approved</TooltipPopup>
210-
</Tooltip>
211-
) : entry.reviewDecision === "changes-requested" ? (
212-
<span className="min-w-0 truncate text-amber-600/90 dark:text-amber-400/80">
213-
Changes requested
214-
</span>
215-
) : null}
216-
{entry.checksState === undefined ? null : (
217-
<PullRequestChecksPopover
218-
checksState={entry.checksState}
219-
environmentId={entry.environmentId}
220-
reference={{
221-
projectId: entry.projectId,
222-
repository: entry.repository,
223-
number: entry.number,
224-
}}
225-
/>
226-
)}
227219
</PullRequestMetaLine>
228220
<span className="col-start-2 row-start-2 flex items-center justify-self-end gap-3 whitespace-nowrap text-[11px] text-muted-foreground/70 tabular-nums">
229221
<span className="hidden @sm/pr-row:inline">

0 commit comments

Comments
 (0)