Skip to content

Commit

Permalink
chore: removes setup badge from personal dashboard (#8384)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomasheartman authored Oct 8, 2024
1 parent 8736d2a commit b190efc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const ContentGridNoProjects: React.FC<Props> = ({ owners, admins }) => {
return (
<ContentGridContainer>
<ProjectGrid>
<GridItem gridArea='title'>
<GridItem gridArea='header'>
<Typography variant='h3'>My projects</Typography>
</GridItem>
<GridItem gridArea='onboarding'>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/personalDashboard/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const ProjectGrid = styled(ContentGrid)(
gridTemplateColumns: '1fr 1fr 1fr',
display: 'grid',
gridTemplateAreas: `
"title onboarding onboarding"
"header header header"
"projects box1 box2"
". owners owners"
`,
Expand Down
17 changes: 1 addition & 16 deletions frontend/src/component/personalDashboard/MyProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
ListItemButton,
Typography,
} from '@mui/material';
import { Badge } from '../common/Badge/Badge';
import { ProjectIcon } from '../common/ProjectIcon/ProjectIcon';
import LinkIcon from '@mui/icons-material/ArrowForward';
import { ProjectSetupComplete } from './ProjectSetupComplete';
Expand Down Expand Up @@ -190,23 +189,9 @@ export const MyProjects = forwardRef<
return (
<ContentGridContainer ref={ref}>
<ProjectGrid>
<GridItem gridArea='title'>
<GridItem gridArea='header'>
<Typography variant='h3'>My projects</Typography>
</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'>
<List
disablePadding={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ test('Render personal dashboard for a new project', async () => {

await screen.findByText('Welcome Unleash User');
await screen.findByText('projectName');
await screen.findByText('Setup incomplete');
await screen.findByText('3'); // members
await screen.findByText('0'); // features
await screen.findByText('100%'); // health
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/component/personalDashboard/RoleAndOwnerInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export const RoleAndOwnerInfo = ({ roles, owners }: Props) => {
</Typography>
<Roles>
{firstRoles.map((role) => (
<li>
<RoleBadge key={role} color='secondary'>
<li key={role}>
<RoleBadge color='secondary'>
{role}
</RoleBadge>
</li>
Expand All @@ -79,7 +79,7 @@ export const RoleAndOwnerInfo = ({ roles, owners }: Props) => {
title={
<TooltipRoles>
{extraRoles.map((role) => (
<li>
<li key={role}>
<RoleBadge>
{role}
</RoleBadge>
Expand Down

0 comments on commit b190efc

Please sign in to comment.