1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

chore: removes setup badge from personal dashboard (#8384)

The badge has been removed from the onboarding flow, so we don't need
to show it here. This also prepares it for the collapsible sections.
This commit is contained in:
Thomas Heartman 2024-10-08 12:28:31 +02:00 committed by GitHub
parent 8736d2a916
commit b190efce53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 22 deletions

View File

@ -108,7 +108,7 @@ export const ContentGridNoProjects: React.FC<Props> = ({ owners, admins }) => {
return ( return (
<ContentGridContainer> <ContentGridContainer>
<ProjectGrid> <ProjectGrid>
<GridItem gridArea='title'> <GridItem gridArea='header'>
<Typography variant='h3'>My projects</Typography> <Typography variant='h3'>My projects</Typography>
</GridItem> </GridItem>
<GridItem gridArea='onboarding'> <GridItem gridArea='onboarding'>

View File

@ -41,7 +41,7 @@ export const ProjectGrid = styled(ContentGrid)(
gridTemplateColumns: '1fr 1fr 1fr', gridTemplateColumns: '1fr 1fr 1fr',
display: 'grid', display: 'grid',
gridTemplateAreas: ` gridTemplateAreas: `
"title onboarding onboarding" "header header header"
"projects box1 box2" "projects box1 box2"
". owners owners" ". owners owners"
`, `,

View File

@ -7,7 +7,6 @@ import {
ListItemButton, ListItemButton,
Typography, Typography,
} from '@mui/material'; } from '@mui/material';
import { Badge } from '../common/Badge/Badge';
import { ProjectIcon } from '../common/ProjectIcon/ProjectIcon'; import { ProjectIcon } from '../common/ProjectIcon/ProjectIcon';
import LinkIcon from '@mui/icons-material/ArrowForward'; import LinkIcon from '@mui/icons-material/ArrowForward';
import { ProjectSetupComplete } from './ProjectSetupComplete'; import { ProjectSetupComplete } from './ProjectSetupComplete';
@ -190,23 +189,9 @@ export const MyProjects = forwardRef<
return ( return (
<ContentGridContainer ref={ref}> <ContentGridContainer ref={ref}>
<ProjectGrid> <ProjectGrid>
<GridItem gridArea='title'> <GridItem gridArea='header'>
<Typography variant='h3'>My projects</Typography> <Typography variant='h3'>My projects</Typography>
</GridItem> </GridItem>
<GridItem
gridArea='onboarding'
sx={{
display: 'flex',
justifyContent: 'flex-end',
}}
>
{setupIncomplete ? (
<Badge color='warning'>Setup incomplete</Badge>
) : null}
{error ? (
<Badge color='error'>Setup state unknown</Badge>
) : null}
</GridItem>
<SpacedGridItem gridArea='projects'> <SpacedGridItem gridArea='projects'>
<List <List
disablePadding={true} disablePadding={true}

View File

@ -159,7 +159,6 @@ test('Render personal dashboard for a new project', async () => {
await screen.findByText('Welcome Unleash User'); await screen.findByText('Welcome Unleash User');
await screen.findByText('projectName'); await screen.findByText('projectName');
await screen.findByText('Setup incomplete');
await screen.findByText('3'); // members await screen.findByText('3'); // members
await screen.findByText('0'); // features await screen.findByText('0'); // features
await screen.findByText('100%'); // health await screen.findByText('100%'); // health

View File

@ -66,8 +66,8 @@ export const RoleAndOwnerInfo = ({ roles, owners }: Props) => {
</Typography> </Typography>
<Roles> <Roles>
{firstRoles.map((role) => ( {firstRoles.map((role) => (
<li> <li key={role}>
<RoleBadge key={role} color='secondary'> <RoleBadge color='secondary'>
{role} {role}
</RoleBadge> </RoleBadge>
</li> </li>
@ -79,7 +79,7 @@ export const RoleAndOwnerInfo = ({ roles, owners }: Props) => {
title={ title={
<TooltipRoles> <TooltipRoles>
{extraRoles.map((role) => ( {extraRoles.map((role) => (
<li> <li key={role}>
<RoleBadge> <RoleBadge>
{role} {role}
</RoleBadge> </RoleBadge>