Skip to content

Commit 7cac54b

Browse files
committed
#1641: Added scrolling
1 parent 1309708 commit 7cac54b

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

src/frontend/src/components/ChangeRequestDetailCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const ChangeRequestDetailCard: React.FC<ChangeRequestDetailCardProps> = ({ chang
106106
const ChangeRequestTypeView = () => determineChangeRequestTypeView(changeRequest);
107107
const pillColor = determineChangeRequestPillColor(changeRequest.type);
108108
return (
109-
<Card sx={{ width: 300, mr: 1, mb: 1, borderRadius: 5 }}>
109+
<Card sx={{ minWidth: 300, width: 300, mr: 1, mb: 1, borderRadius: 5 }}>
110110
<CardContent>
111111
<Grid container justifyContent="space-between" alignItems="center">
112112
<Grid item>

src/frontend/src/pages/ChangeRequestDetailPage/OtherChangeRequestsPopupTabs.tsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,27 @@ const OtherChangeRequestsPopupTabs: React.FC<OtherChangeRequestsPopupTabsProps>
5656
padding: '20px',
5757
background: theme.palette.background.paper,
5858
borderTop: `solid 1px ${theme.palette.divider}`,
59-
borderLeft: `solid 1px ${theme.palette.divider}`
59+
borderLeft: `solid 1px ${theme.palette.divider}`,
60+
'&::-webkit-scrollbar': {
61+
height: '20px'
62+
},
63+
'&::-webkit-scrollbar-track': {
64+
backgroundColor: 'transparent'
65+
},
66+
'&::-webkit-scrollbar-thumb': {
67+
backgroundColor: theme.palette.divider,
68+
borderRadius: '20px',
69+
border: '6px solid transparent',
70+
backgroundClip: 'content-box'
71+
},
72+
overflowX: 'scroll'
6073
}}
6174
>
62-
{crList.map((cr: ChangeRequest) => (
63-
<ChangeRequestDetailCard changeRequest={cr}></ChangeRequestDetailCard>
64-
))}
75+
{crList.length !== 0 ? (
76+
crList.map((cr: ChangeRequest) => <ChangeRequestDetailCard changeRequest={cr}></ChangeRequestDetailCard>)
77+
) : (
78+
<Typography>No related change requests.</Typography>
79+
)}
6580
</Box>
6681
);
6782

@@ -71,7 +86,7 @@ const OtherChangeRequestsPopupTabs: React.FC<OtherChangeRequestsPopupTabsProps>
7186
position: 'fixed',
7287
bottom: '0px',
7388
left: '65px',
74-
minWidth: '100%'
89+
width: `calc(100% - 65px)`
7590
}}
7691
>
7792
<Tabs

0 commit comments

Comments
 (0)