Skip to content

Commit

Permalink
feat: course color generation (Longhorn-Developers#179)
Browse files Browse the repository at this point in the history
* feat: course color generation

* feat: add proper TS for hex colors

* refactor: fix oklab and improve contrast ratios

* fix: update HexColor type

* refactor: update color switch point

* refactor: color-related functions and types

* fix: imports and TS issues

* fix: imports and TS issues

* chore: add no-restricted-syntax ForInStatement

* chore(docs): add jsdoc

---------

Co-authored-by: doprz <52579214+doprz@users.noreply.github.com>
  • Loading branch information
2 people authored and caseycharleston committed Mar 30, 2024
1 parent bfa6416 commit 34e363d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/views/components/common/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, { Fragment } from 'react';

import ExtensionRoot from './ExtensionRoot/ExtensionRoot';

export interface _DialogProps {
interface _DialogProps {
className?: string;
title?: JSX.Element;
description?: JSX.Element;
Expand Down
1 change: 1 addition & 0 deletions src/views/components/common/ScheduleListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function ScheduleListItem({ schedule, dragHandleProps, onClick }:
const editorRef = React.useRef<HTMLInputElement>(null);
useEffect(() => {
const editor = editorRef.current;

setEditorValue(schedule.name);

if (isEditing && editor) {
Expand Down
6 changes: 4 additions & 2 deletions src/views/hooks/useFlattenedCourseSchedule.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { HexColor } from '@shared/types/Color';
import type { Course, StatusType } from '@shared/types/Course';
import type { CourseMeeting } from '@shared/types/CourseMeeting';
import type { UserSchedule } from '@shared/types/UserSchedule';
import type { CalendarCourseCellProps } from '@views/components/calendar/CalendarCourseCell';
import { colors } from '@shared/types/ThemeColors';
import { UserSchedule } from '@shared/types/UserSchedule';
import type { CalendarCourseCellProps } from '@views/components/calendar/CalendarCourseCell/CalendarCourseCell';

import useSchedules from './useSchedules';

Expand Down

0 comments on commit 34e363d

Please sign in to comment.