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

feat: mobile ui and saved scroll position #1001

Merged
merged 30 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cc80a74
fix: correct error messages when importing courses
Aug 13, 2024
9face3b
fix: create and implement custom error for querying Zotcourse
Aug 13, 2024
160b71c
refactor: update conditional logic for import source handling
Aug 13, 2024
bc1b0aa
style: rename ZotCourse to Zotcourse
johwuy Aug 14, 2024
979225a
style: capitalize first letter for interfaces
Aug 14, 2024
c29777b
Merge branch 'icssc:main' into main
johwuy Aug 17, 2024
d4e9a2d
feat: preserve scrolling position in search tab
Aug 18, 2024
e130a04
Merge branch 'main' of https://github.com/johwuy/AntAlmanac
Aug 18, 2024
5f0765e
fix: create custom Box component with ref attribute
Aug 20, 2024
bf0f235
refactor: shared tabs
ap0nia Aug 20, 2024
2d418bb
refactor: early return
ap0nia Aug 20, 2024
6f73bd3
fix: scroll restoration actually works
ap0nia Aug 20, 2024
fa4dbe9
feat: mobile responsiveness
ap0nia Aug 20, 2024
82de246
fix: mobile responsiveness
ap0nia Aug 20, 2024
7a156c5
fix: scroll results
ap0nia Aug 20, 2024
89bbb7d
feat: custom theme breakpoints
ap0nia Aug 20, 2024
c2f4ef5
fix: calendar height
ap0nia Aug 20, 2024
51f2ee8
fix: mobile heights and revamped bottom tab bar
ap0nia Aug 20, 2024
6bce67d
style: bottom navigation tabs
ap0nia Aug 20, 2024
b82c9e8
fix(antalmanac): mismatch media query and white text for focused tab
ap0nia Sep 29, 2024
0d13100
fix(antalmanac): remove marginY on calendar
ap0nia Sep 29, 2024
06c9a65
fix(antalmanac): 100dvh include header
ap0nia Oct 1, 2024
ccf5664
chore(antalmanac): remove comments
ap0nia Oct 1, 2024
a393c10
fix(antalmanac): handle null case
ap0nia Oct 10, 2024
1fa4452
Merge branch 'main' into temp
ap0nia Oct 10, 2024
7d38e8d
test(antalmanac): update download-ics snapshot
ap0nia Oct 10, 2024
7888a82
chore(aa): cleanup css imports from leaflet
ap0nia Oct 24, 2024
3cc9f4d
fix(aa): bad max-height constraints
ap0nia Oct 24, 2024
71a93e7
style(aa): make selected tab text white
ap0nia Oct 24, 2024
be65e58
fix: override a tag color on v5
KevinWu098 Oct 31, 2024
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
12 changes: 1 addition & 11 deletions apps/antalmanac/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,7 @@
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/google_font_roboto_300_400_500_700.css" />
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""
/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/leaflet.locatecontrol/dist/L.Control.Locate.min.css"
/>

<!--
Notice the use of %PUBLIC_URL% in the tags above.
Expand Down Expand Up @@ -110,7 +100,7 @@
</head>
<body style="overflow: hidden">
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root" style="height: 100vh; position: fixed; top: 0; width: 100%"></div>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
15 changes: 0 additions & 15 deletions apps/antalmanac/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,3 @@
font-size: 30pt;
color: white;
}

/**
* Needed to set the table cells to the correct height...for some reason?
*/
@media (min-resolution: 120dpi) {
html {
font-size: 14px;
}
}

@media (min-resolution: 144dpi) {
html {
font-size: 12px;
}
}
19 changes: 4 additions & 15 deletions apps/antalmanac/src/components/Calendar/CalendarRoot.tsx
KevinWu098 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ const AntAlmanacEvent = ({ event }: { event: CalendarEvent }) => {
};

interface ScheduleCalendarProps {
isMobile: boolean;
isMobile?: boolean;
}

export default function ScheduleCalendar(props: ScheduleCalendarProps) {
const { isMobile } = props;

export default function ScheduleCalendar(_props?: ScheduleCalendarProps) {
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
const [showFinalsSchedule, setShowFinalsSchedule] = useState(false);
const [courseInMoreInfo, setCourseInMoreInfo] = useState<CalendarEvent | null>(null);
Expand Down Expand Up @@ -163,8 +161,6 @@ export default function ScheduleCalendar(props: ScheduleCalendarProps) {
const events = getEventsForCalendar();
const hasWeekendCourse = events.some((event) => event.start.getDay() === 0 || event.start.getDay() === 6);

const calendarStyling = isMobile ? { height: `calc(100% - 55px)` } : { height: `calc(100vh - 104px)` };

const calendarTimeFormat = isMilitaryTime ? 'HH:mm' : 'h:mm A';
const calendarGutterTimeFormat = isMilitaryTime ? 'HH:mm' : 'h A';

Expand Down Expand Up @@ -213,21 +209,14 @@ export default function ScheduleCalendar(props: ScheduleCalendarProps) {
}, []);

return (
<Box
style={{
height: isMobile ? 'calc(100% - 50px)' : undefined,
margin: '0px 4px',
borderRadius: '1px',
}}
id={'calendar-root'}
>
<Box id="calendar-root" borderRadius={1} flexGrow={1} height={0} display="flex" flexDirection="column">
<CalendarToolbar
currentScheduleIndex={currentScheduleIndex}
toggleDisplayFinalsSchedule={toggleDisplayFinalsSchedule}
showFinalsSchedule={showFinalsSchedule}
scheduleNames={scheduleNames}
/>
<Box id="screenshot" style={calendarStyling}>
<Box id="screenshot" height="0" flexGrow={1}>
<Popper
anchorEl={anchorEl}
placement="right"
Expand Down
2 changes: 2 additions & 0 deletions apps/antalmanac/src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'leaflet/dist/leaflet.css';
import 'leaflet.locatecontrol/dist/L.Control.Locate.min.css';
import './Map.css';

import { Box, Paper, Tab, Tabs, Typography } from '@mui/material';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function RightPane() {
}, [handleKeydown]);

return (
<Box height={'100%'} marginX={0.5}>
<Box height={0} flexGrow={1} marginX={0.5}>
<CoursePaneButtonRow
showSearch={!searchIsDisplayed}
onDismissSearchResults={displaySearch}
Expand Down
Loading
Loading