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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 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
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
2 changes: 1 addition & 1 deletion apps/antalmanac/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,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
Loading
Loading