Skip to content

Commit 1a5d414

Browse files
committed
feat(ui): Align jobs in Accordion titles
Grid layout aligns the job names nicely in a column-like fashion. Resolves #2244. Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
1 parent afa1b0a commit 1a5d414

File tree

1 file changed

+13
-13
lines changed
  • ui/src/routes/organizations/$orgId/products/$productId/repositories/$repoId/runs/$runIndex/config/-components

1 file changed

+13
-13
lines changed

ui/src/routes/organizations/$orgId/products/$productId/repositories/$repoId/runs/$runIndex/config/-components/job-title.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,28 @@ type JobTitleProps = {
4444

4545
export const JobTitle = ({ title, job }: JobTitleProps) => {
4646
return (
47-
<div className='flex items-center gap-2'>
48-
{title}
47+
<div className='grid grid-cols-[6rem_auto_1fr] items-center gap-2'>
48+
<span>{title}</span>
4949
<Badge className={`border ${getStatusBackgroundColor(job?.status)}`}>
5050
{job?.status || 'NOT RUN'}
5151
</Badge>
52-
{job?.startedAt && (
53-
<>
54-
{job.finishedAt ? (
55-
<div className='text-muted-foreground flex items-center gap-1'>
52+
<span className='text-muted-foreground'>
53+
{job?.startedAt &&
54+
(job.finishedAt ? (
55+
<span className='flex items-center gap-1'>
5656
in
5757
<RunDuration
5858
createdAt={job.startedAt}
5959
finishedAt={job.finishedAt}
6060
/>
61-
</div>
61+
</span>
6262
) : (
63-
<div className='text-muted-foreground flex items-center'>
64-
(<RunDuration createdAt={job.startedAt} finishedAt={undefined} />)
65-
</div>
66-
)}
67-
</>
68-
)}
63+
<span className='flex items-center'>
64+
(
65+
<RunDuration createdAt={job.startedAt} finishedAt={undefined} />)
66+
</span>
67+
))}
68+
</span>
6969
</div>
7070
);
7171
};

0 commit comments

Comments
 (0)