Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Active badge overlaps text in LaunchPlan versions table #876

Merged
merged 1 commit into from
May 24, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { useMemo } from 'react';
import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TableRow from '@mui/material/TableRow';
import Grid from '@mui/material/Grid';
import { formatDateUTC } from '../../../common/formatters';
import { padExecutionPaths, padExecutions, timestampToDate } from '../../../common/utils';
import { WaitForData } from '../../common/WaitForData';
Expand Down Expand Up @@ -45,26 +46,36 @@ export function useWorkflowVersionsTableColumns(): WorkflowVersionColumnDefiniti
activeScheduleLaunchPlan.id.version === version;
const versionText = version;
return (
<TableContainer sx={{ px: 0, borderBottom: 'none' }}>
<TableRow>
<TableCell sx={{ px: 0, borderBottom: 'none', maxWidth: 400 }}>
<Typography variant="body1">{versionText}</Typography>
</TableCell>
{isActiveVersion && (
<TableCell
sx={{
borderBottom: 'none',
marginLeft: (theme) => theme.spacing(2),
}}
>
<StatusBadge
text={ActiveLaunchPlanDisplayValueEnum.ACTIVE}
className="background-status-succeeded launchPlan"
></StatusBadge>
</TableCell>
)}
</TableRow>
</TableContainer>
<Grid container flex="1 0 auto" flexWrap="nowrap" gap={1}>
<Grid
item
flexGrow={1}
style={{
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}}
>
<Typography
variant="body1"
style={{
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}}
>
{versionText}
</Typography>
</Grid>
{isActiveVersion && (
<Grid item flexGrow={0} textAlign="right" display="flex" gap={1}>
<StatusBadge
text={ActiveLaunchPlanDisplayValueEnum.ACTIVE}
className="background-status-succeeded launchPlan"
></StatusBadge>
</Grid>
)}
</Grid>
);
},
className: styles.columnName,
Expand Down
Loading