chore: cleanup/resolve PR comments

This commit is contained in:
Razboy20
2024-03-06 15:13:11 -06:00
parent 0c44849e15
commit 8f360206fb
36 changed files with 380 additions and 26853 deletions

View File

@@ -1,5 +1,5 @@
import type { Course } from '@shared/types/Course';
import { CalendarBottomBar } from '@views/components/calendar/CalendarBottomBar/CalendarBottomBar';
import CalendarBottomBar from '@views/components/calendar/CalendarBottomBar/CalendarBottomBar';
import CalendarGrid from '@views/components/calendar/CalendarGrid/CalendarGrid';
import CalendarHeader from '@views/components/calendar/CalendarHeader/CalenderHeader';
import { CalendarSchedules } from '@views/components/calendar/CalendarSchedules/CalendarSchedules';
@@ -9,8 +9,6 @@ import { useFlattenedCourseSchedule } from '@views/hooks/useFlattenedCourseSched
import React, { useRef } from 'react';
import { ExampleCourse } from 'src/stories/components/PopupCourseBlock.stories';
export const flags = ['WR', 'QR', 'GC', 'CD', 'E', 'II'];
/**
* A reusable chip component that follows the design system of the extension.
* @returns
@@ -23,9 +21,10 @@ export default function Calendar(): JSX.Element {
return (
<div className='flex flex-col'>
<CalendarHeader
totalHours={activeSchedule.hours}
scheduleName={activeSchedule.name}
totalCourses={activeSchedule?.courses.length}
// TODO: implement props
// totalHours={activeSchedule.hours}
// scheduleName={activeSchedule.name}
// totalCourses={activeSchedule?.courses.length}
/>
<div className='h-screen w-full flex flex-col md:flex-row'>
<div className='min-h-[30%] flex flex-col items-start gap-2.5 p-5 pl-7'>
@@ -43,7 +42,7 @@ export default function Calendar(): JSX.Element {
</div>
</div>
</div>
{/* TODO: Doesn't work when exampleCourse is replaced with an actual course through setCourse.
{/* TODO: Doesn't work when exampleCourse is replaced with an actual course through setCourse.
Check CalendarGrid.tsx and AccountForCourseConflicts for an example */}
{course ? (
<CourseCatalogInjectedPopup

View File

@@ -15,10 +15,10 @@ import UndoIcon from '~icons/material-symbols/undo';
/**
* Opens the options page in a new tab.
* @returns {Promise<void>} A promise that resolves when the options page is opened.
* @returns A promise that resolves when the options page is opened.
*/
const handleOpenOptions = async () => {
const url = chrome.runtime.getURL('/src/pages/options/index.html');
const handleOpenOptions = async (): Promise<void> => {
const url = chrome.runtime.getURL('/options.html');
await openTabFromContentScript(url);
};

View File

@@ -77,7 +77,7 @@ export function CalendarSchedules({ style, dummySchedules, dummyActiveIndex }: P
</div>
</div>
<div className='flex flex-col space-y-2.5'>
<List gap={10} draggableElements={scheduleComponents} itemHeight={30} listHeight={30} listWidth={240} />
<List gap={10} draggableElements={scheduleComponents} listWidth={240} />
<input
type='text'
placeholder='Enter new schedule'