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: section sizes #8423

Merged
Show file tree
Hide file tree
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 @@ -42,7 +42,7 @@ const placeholderData = (theme: Theme, label?: string) => ({
});

const ChartWrapper = styled('div')({
width: '90%',
width: '80%',
});

export const PlaceholderFlagMetricsChart: React.FC<{ label?: string }> = ({
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/component/personalDashboard/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const ContentGrid = styled('article')(({ theme }) => {
return {
backgroundColor: theme.palette.divider,
borderRadius: `${theme.shape.borderRadiusLarge}px`,
overflow: 'hidden',
gap: `1px`,
display: 'flex',
flexFlow: 'column nowrap',
Expand Down Expand Up @@ -38,6 +37,7 @@ const onWideContainer =
export const ProjectGrid = styled(ContentGrid)(
onWideContainer({
gridTemplateColumns: '1fr 1fr 1fr',
gridTemplateRows: '410px auto',
display: 'grid',
gridTemplateAreas: `
"projects box1 box2"
Expand All @@ -49,6 +49,7 @@ export const ProjectGrid = styled(ContentGrid)(
export const FlagGrid = styled(ContentGrid)(
onWideContainer({
gridTemplateColumns: '1fr 1fr 1fr',
gridTemplateRows: '450px',
display: 'grid',
gridTemplateAreas: `
"flags chart chart"
Expand All @@ -60,13 +61,17 @@ export const GridItem = styled('div', {
shouldForwardProp: (prop) => !['gridArea', 'sx'].includes(prop.toString()),
})<{ gridArea: string }>(({ theme, gridArea }) => ({
padding: theme.spacing(2, 4),
maxHeight: '100%',
overflowY: 'auto',
gridArea,
}));

export const SpacedGridItem = styled('div', {
shouldForwardProp: (prop) => prop !== 'gridArea',
})<{ gridArea: string }>(({ theme, gridArea }) => ({
padding: theme.spacing(3, 4),
maxHeight: '100%',
overflowY: 'auto',
gridArea,
}));

Expand Down
15 changes: 9 additions & 6 deletions frontend/src/component/personalDashboard/LatestProjectEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ import { useLocationSettings } from 'hooks/useLocationSettings';
const Events = styled('ul')(({ theme }) => ({
padding: 0,
alignItems: 'flex-start',
display: 'flex',
flexFlow: 'column nowrap',
gap: theme.spacing(2),
}));

const Event = styled('li')(({ theme }) => ({
listStyleType: 'none',
padding: theme.spacing(0),
display: 'inline-flex',
gap: theme.spacing(2),
alignItems: 'center',
marginBottom: theme.spacing(4),
fontSize: theme.typography.body2.fontSize,

'*': {
fontWeight: 'normal',
Expand All @@ -44,6 +46,10 @@ const Timestamp = styled('time')(({ theme }) => ({
marginBottom: theme.spacing(1),
}));

const StyledUserAvatar = styled(UserAvatar)(({ theme }) => ({
marginTop: theme.spacing(0.5),
}));

export const LatestProjectEvents: FC<{
latestEvents: PersonalDashboardProjectDetailsSchema['latestEvents'];
}> = ({ latestEvents }) => {
Expand All @@ -64,10 +70,7 @@ export const LatestProjectEvents: FC<{
{latestEvents.map((event) => {
return (
<Event key={event.id}>
<UserAvatar
src={event.createdByImageUrl}
sx={{ mt: 1 }}
/>
<StyledUserAvatar src={event.createdByImageUrl} />
<div>
<Timestamp dateTime={event.createdAt}>
{formatDateYMDHM(
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/personalDashboard/MyProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const MyProjects = forwardRef<
<SpacedGridItem gridArea='projects'>
<List
disablePadding={true}
sx={{ maxHeight: '400px', overflow: 'auto' }}
sx={{ height: '100%', overflow: 'auto' }}
>
{projects.map((project) => (
<ProjectListItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export const PersonalDashboard = () => {
<List
disablePadding={true}
sx={{
maxHeight: '400px',
height: '100%',
overflow: 'auto',
}}
>
Expand Down
Loading