Skip to content

Commit

Permalink
style: improvements to tabs, course/added panes (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 authored Jan 28, 2025
1 parent afbc80e commit 70e13bb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function AddedSectionsGrid() {
<ClearScheduleButton buttonSx={buttonSx} />
<ColumnToggleDropdown />
</Box>
<Box style={{ marginTop: 50 }}>
<Box style={{ marginTop: 56 }}>
<Typography variant="h6">{`${scheduleName} (${scheduleUnits} Units)`}</Typography>
{courses.length < 1 ? NoCoursesBox : null}
<Box display="flex" flexDirection="column" gap={1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ export function CoursePaneButtonRow(props: CoursePaneButtonRowProps) {
display: props.showSearch ? 'block' : 'none',
width: '100%',
zIndex: 3,
marginBottom: 8,
position: 'absolute',
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ const ErrorMessage = () => {
sx={{
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'column',
}}
Expand Down Expand Up @@ -321,6 +320,8 @@ export default function CourseRenderPane(props: { id?: number }) {

return (
<>
<Box sx={{ height: '56px' }} />

{loading ? (
<LoadingMessage />
) : error || courseData.length === 0 ? (
Expand All @@ -329,7 +330,6 @@ export default function CourseRenderPane(props: { id?: number }) {
<>
<RecruitmentBanner />
<Box>
<Box sx={{ height: '50px', marginBottom: '5px' }} />
{courseData.map((_: WebsocSchool | WebsocDepartment | AACourse, index: number) => {
let heightEstimate = 200;
if ((courseData[index] as AACourse).sections !== undefined)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ export const ScheduleManagementTab = ({ tab, value }: ScheduleManagementTabProps
icon={tab.icon}
iconPosition={isMobile ? 'top' : 'start'}
sx={{
...(!isMobile
...(isMobile
? {
minHeight: 'unset',
minWidth: '25%',
height: 56,
}
: {
minHeight: 'auto',
height: '44px',
padding: 3,
minWidth: '33%',
}
: { minWidth: '25%' }),
display: !isMobile && tab.mobile ? 'none' : 'flex',
}),
display: isMobile || !tab.mobile ? 'flex' : 'none',
...(isDark ? { '&.Mui-selected': { color: 'white' } } : {}),
}}
label={tab.label}
Expand Down

0 comments on commit 70e13bb

Please sign in to comment.