-
-
Notifications
You must be signed in to change notification settings - Fork 721
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
Add close button, fix layout, refactor #8755
Changes from all commits
212400d
95a3353
7cb4b7a
bae8773
3333eda
84b9113
8652e93
a6a0fae
026d30b
c0937ce
1ef2b80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've moved section headers up to the project status modal level, so they're easier to align and make sure they share the same styles etc. I left the container in the first instance because without it we lose the scrolling when it overflows. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use the exact same container three places, so I extracted it. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { styled } from '@mui/material'; | ||
|
||
export const HealthGridTile = styled('article')(({ theme }) => ({ | ||
backgroundColor: theme.palette.envAccordion.expanded, | ||
padding: theme.spacing(3), | ||
borderRadius: theme.shape.borderRadiusExtraLarge, | ||
})); |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This used to be in |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { ProjectHealth } from './ProjectHealth'; | ||
import { styled } from '@mui/material'; | ||
import { StaleFlags } from './StaleFlags'; | ||
import { ProjectResources } from './ProjectResources'; | ||
|
||
const onNarrowGrid = (css: object) => ({ | ||
'@container (max-width: 650px)': css, | ||
'@supports not (container-type: inline-size)': { | ||
'@media (max-width: 712px)': css, | ||
}, | ||
}); | ||
|
||
const HealthContainer = styled('div')({ | ||
containerType: 'inline-size', | ||
}); | ||
|
||
const HealthGrid = styled('div')(({ theme }) => ({ | ||
display: 'grid', | ||
gridTemplateAreas: ` | ||
"health resources" | ||
"stale resources" | ||
`, | ||
gridTemplateColumns: 'repeat(2, minmax(300px, 1fr))', | ||
gap: theme.spacing(1, 2), | ||
...onNarrowGrid({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: theme.spacing(1), | ||
}), | ||
})); | ||
|
||
const Tile = styled('div', { | ||
shouldForwardProp: (prop) => prop !== 'gridArea', | ||
})<{ gridArea: string }>(({ theme, gridArea }) => ({ | ||
gridArea, | ||
'&>*': { | ||
height: '100%', | ||
}, | ||
})); | ||
|
||
export const ProjectHealthGrid = () => { | ||
return ( | ||
<HealthContainer> | ||
<HealthGrid> | ||
<Tile gridArea='health'> | ||
<ProjectHealth /> | ||
</Tile> | ||
<Tile gridArea='stale'> | ||
<StaleFlags /> | ||
</Tile> | ||
<Tile gridArea='resources'> | ||
<ProjectResources /> | ||
</Tile> | ||
</HealthGrid> | ||
</HealthContainer> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The icon is still there, it just has no fill color by default. This is to make it easier to style.