Skip to content

Commit 317f53e

Browse files
committed
#1650 - iron out details, make it responsive
1 parent b2220c2 commit 317f53e

7 files changed

Lines changed: 30 additions & 25 deletions

File tree

src/frontend/src/components/ChangeRequestDetailCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ interface ChangeRequestDetailCardProps {
6969

7070
const ChangeRequestDetailCard: React.FC<ChangeRequestDetailCardProps> = ({ changeRequest }) => {
7171
return (
72-
<Card sx={{ width: 325, mr: 2, borderRadius: 3, mb: 2 }}>
72+
<Card sx={{ minWidth: 325, maxWidth: 325, mr: 2, borderRadius: 3, mb: 2 }}>
7373
<CardContent>
7474
<Grid container justifyContent="space-between" alignItems="flex-start">
7575
<Grid item xs mb={1} mt={-1.5}>

src/frontend/src/layouts/PageTitle/PageTitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const PageTitle: React.FC<PageTitleProps> = ({ title, chips, previousPages, head
4242
>
4343
<Grid container>
4444
<Grid container item xs={6} md={tabs ? 4 : 8} display="flex" alignItems={'center'} rowGap={2}>
45-
<Grid item xs={12} md={chips ? 4.2 : 12}>
45+
<Grid item xs={12} md={chips ? 4 : 12}>
4646
<Typography variant="h4" fontSize={30}>
4747
{title}
4848
</Typography>

src/frontend/src/pages/ChangeRequestDetailPage/ChangeRequestDetailsView.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
114114
</Grid>
115115
</Grid>
116116
<Grid container rowSpacing={2}>
117-
<Grid container rowSpacing={1} item xs={isStandard ? 7 : isActivation ? 6 : 12}>
117+
<Grid container item xs={12} md={isStandard ? 7 : isActivation ? 6 : 12} height={'fit-content'}>
118118
{buildDetails(changeRequest)}
119-
<Grid item md={isStandard ? 12 : isActivation ? 12 : 5}>
119+
<Grid item xs={12} md={isStandard ? 12 : isActivation ? 12 : 5} height={'fit-content'}>
120120
<ReviewNotes
121121
reviewer={changeRequest.reviewer}
122122
reviewNotes={changeRequest.reviewNotes}
123123
dateReviewed={changeRequest.dateReviewed}
124124
/>
125125
</Grid>
126-
<Grid item md={isStandard ? 12 : isActivation ? 0 : 6}>
126+
<Grid item md={isStandard ? 12 : isActivation ? 0 : 6} sx={{ mt: { xs: 2, md: isStandard ? 2 : 0 } }}>
127127
{!isActivation && (
128128
<ImplementedChangesList
129129
changes={changeRequest.implementedChanges || []}
@@ -132,7 +132,7 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
132132
)}
133133
</Grid>
134134
</Grid>
135-
<Grid item xs={isStandard ? 5 : 0}>
135+
<Grid item xs={isStandard ? 12 : 0} md={isStandard ? 5 : 0}>
136136
{isStandard && (
137137
<ProposedSolutionsList
138138
proposedSolutions={(changeRequest as StandardChangeRequest).proposedSolutions}
@@ -141,7 +141,7 @@ const ChangeRequestDetailsView: React.FC<ChangeRequestDetailsProps> = ({
141141
/>
142142
)}
143143
</Grid>
144-
<Grid item xs={isActivation ? 6 : 0}>
144+
<Grid item xs={isActivation ? 12 : 0} md={isActivation ? 6 : 0}>
145145
{isActivation && (
146146
<ImplementedChangesList
147147
changes={changeRequest.implementedChanges || []}

src/frontend/src/pages/ChangeRequestDetailPage/ProposedSolutionsList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const ProposedSolutionsList: React.FC<ProposedSolutionsListProps> = ({ proposedS
2929
const { isLoading, isError, error, mutateAsync } = useCreateProposeSolution();
3030
const toast = useToast();
3131
const theme = useTheme();
32+
const isDark = theme.palette.mode === 'dark';
3233

3334
if (isLoading) return <LoadingIndicator />;
3435
if (isError) return <ErrorPage message={error?.message} />;
@@ -91,10 +92,10 @@ const ProposedSolutionsList: React.FC<ProposedSolutionsListProps> = ({ proposedS
9192
}}
9293
>
9394
<Grid container rowSpacing={1}>
94-
<Grid item xs={12} sx={{ p: 2, mt: 1, minHeight: 100, borderRadius: 1, bgcolor: '#474848' }}>
95+
<Grid item xs={12} sx={{ p: 2, mt: 1, minHeight: 100, borderRadius: 1, bgcolor: isDark ? '#474848' : 'white' }}>
9596
<DetailDisplay label="Description" content={proposedSolution.description} />
9697
</Grid>
97-
<Grid item xs={12} sx={{ p: 2, mt: 2, minHeight: 100, borderRadius: 1, bgcolor: '#474848' }}>
98+
<Grid item xs={12} sx={{ p: 2, mt: 2, minHeight: 100, borderRadius: 1, bgcolor: isDark ? '#474848' : 'white' }}>
9899
<DetailDisplay label="Scope Impact" content={proposedSolution.scopeImpact} />
99100
</Grid>
100101
<Grid item xs={7} display="flex" sx={{ marginTop: 0.5 }}>

src/frontend/src/pages/ChangeRequestDetailPage/ReviewNotes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface ReviewNotesProps {
1717
const ReviewNotes: React.FC<ReviewNotesProps> = ({ reviewer, reviewNotes, dateReviewed }: ReviewNotesProps) => {
1818
return (
1919
<InfoBlock title={'Review Notes'}>
20-
<Typography>
20+
<Typography sx={{ py: '8px' }}>
2121
<Tooltip
2222
id="tooltip"
2323
arrow

src/frontend/src/pages/ChangeRequestDetailPage/StandardDetails.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,24 @@ const style = {
2020
};
2121
const StandardDetails: React.FC<StandardDetailsProps> = ({ cr }: StandardDetailsProps) => {
2222
return (
23-
<Grid container spacing={1}>
24-
<InfoBlock title={'What'}>
25-
<Typography>{cr.what}</Typography>
26-
</InfoBlock>
27-
<InfoBlock title="Why">
28-
{cr.why.map((ele: ChangeRequestExplanation, idx: number) => (
29-
<Box key={'CRExplanation' + idx} display="flex">
30-
<Typography sx={style}>{ele.type + ' '}</Typography>
31-
<Typography mx={'10px'}>{' - '}</Typography>
32-
<Typography>{ele.explain}</Typography>
33-
</Box>
34-
))}
35-
</InfoBlock>
36-
</Grid>
23+
<Box>
24+
<Box my={1}>
25+
<InfoBlock title={'What'}>
26+
<Typography>{cr.what}</Typography>
27+
</InfoBlock>
28+
</Box>
29+
<Box my={3}>
30+
<InfoBlock title="Why">
31+
{cr.why.map((ele: ChangeRequestExplanation, idx: number) => (
32+
<Box key={'CRExplanation' + idx} display="flex">
33+
<Typography sx={style}>{ele.type + ' '}</Typography>
34+
<Typography mx={'10px'}>{' - '}</Typography>
35+
<Typography>{ele.explain}</Typography>
36+
</Box>
37+
))}
38+
</InfoBlock>
39+
</Box>
40+
</Box>
3741
);
3842
};
3943

src/frontend/src/pages/CreateChangeRequestPage/CreateChangeRequestView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ const CreateChangeRequestsView: React.FC<CreateChangeRequestViewProps> = ({
209209
}
210210
>
211211
<Grid container spacing={2} display="flex" justifyContent="space-between">
212-
<Grid container item spacing={2} xs={12} md={6}>
212+
<Grid container item spacing={2} xs={12} md={6} height="fit-content">
213213
<Grid item xs={12}>
214214
<FormLabel>WBS</FormLabel>
215215
<NERAutocomplete

0 commit comments

Comments
 (0)