Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions apps/dashboard/src/routes/_protected/$owner/$repo/pull.$pullId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,25 +219,6 @@ function PullDetailPage() {
</span>
</div>

{/* Labels */}
{pr.labels.length > 0 && (
<div className="flex flex-wrap items-center gap-1.5">
{pr.labels.map((label) => (
<span
key={label.name}
className="rounded-full border px-2.5 py-0.5 text-xs font-medium"
style={{
borderColor: `#${label.color}40`,
backgroundColor: `#${label.color}15`,
color: `#${label.color}`,
}}
>
{label.name}
</span>
))}
</div>
)}

{/* Body */}
{pr.body ? (
<div className="rounded-lg border bg-surface-0 p-5">
Expand Down Expand Up @@ -354,6 +335,29 @@ function PullDetailPage() {

{/* Right sidebar: Metadata */}
<aside className="flex h-fit flex-col gap-6 xl:sticky xl:top-10">
{/* Labels */}
<SidebarSection title="Labels">
{pr.labels.length > 0 ? (
<div className="flex flex-wrap gap-1.5">
{pr.labels.map((label) => (
<span
key={label.name}
className="label-pill rounded-full px-2.5 py-0.5 text-xs font-medium"
style={
{
"--label-color": `#${label.color}`,
} as React.CSSProperties
}
>
{label.name}
</span>
))}
</div>
) : (
<p className="text-xs text-muted-foreground">No labels</p>
)}
</SidebarSection>

{/* Reviewers */}
<SidebarSection title="Reviewers">
{pr.requestedReviewers.length > 0 ? (
Expand Down Expand Up @@ -819,7 +823,7 @@ function PullDetailPageSkeleton() {
</div>

<aside className="flex h-fit flex-col gap-6 xl:sticky xl:top-10">
{[0, 1, 2].map((section) => (
{[0, 1, 2, 3].map((section) => (
<div key={section} className="flex flex-col gap-2.5">
<Skeleton className="h-3 w-20" />
<div className="flex flex-col gap-2">
Expand Down