diff --git a/src/views/components/PopupMain.tsx b/src/views/components/PopupMain.tsx index e47594de..2fd13f72 100644 --- a/src/views/components/PopupMain.tsx +++ b/src/views/components/PopupMain.tsx @@ -1,6 +1,6 @@ import splashText from '@assets/insideJokes'; import createSchedule from '@pages/background/lib/createSchedule'; -import { CalendarDots, GearSix, Plus } from '@phosphor-icons/react'; +import { CalendarDots, Flag, GearSix, Plus } from '@phosphor-icons/react'; import { background } from '@shared/messages'; import { initSettings, OptionsStore } from '@shared/storage/OptionsStore'; import { UserScheduleStore } from '@shared/storage/UserScheduleStore'; @@ -14,8 +14,6 @@ import { getUpdatedAtDateTimeString } from '@views/lib/getUpdatedAtDateTimeStrin import useKC_DABR_WASM from 'kc-dabr-wasm'; import React, { useEffect, useState } from 'react'; -import Feedback from '~icons/material-symbols/flag'; - import { Button } from './common/Button'; import CourseStatus from './common/CourseStatus'; import { SmallLogo } from './common/LogoIcon'; @@ -91,15 +89,14 @@ export default function PopupMain(): JSX.Element {
- - - +
diff --git a/src/views/components/common/List.tsx b/src/views/components/common/List.tsx index 267d7e29..78b90c58 100644 --- a/src/views/components/common/List.tsx +++ b/src/views/components/common/List.tsx @@ -59,7 +59,7 @@ function Item(props: { {...props.provided.draggableProps} ref={props.provided.innerRef} style={getStyle(props.provided, props.style)} - className={props.isDragging ? 'is-dragging' : ''} + className={props.isDragging ? 'group is-dragging' : ''} > {props.children} @@ -104,7 +104,7 @@ function List({ draggables, itemKey, children, onReordered, gap }: ListProps< ); return ( -
+
(false); + const ref = useRef(null); useEffect(() => { initSettings().then(({ enableCourseStatusChips }) => setEnableCourseStatusChips(enableCourseStatusChips)); @@ -46,6 +47,17 @@ export default function PopupCourseBlock({ // console.log('enableCourseStatusChips', newValue); }); + // adds transition for shadow hover after three frames + requestAnimationFrame(() => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + if (ref.current) { + ref.current.classList.add('transition-shadow-100'); + } + }); + }); + }); + return () => { OptionsStore.removeListener(l1); }; @@ -66,10 +78,11 @@ export default function PopupCourseBlock({ backgroundColor: colors.primaryColor, }} className={clsx( - 'h-full w-full inline-flex items-center justify-center gap-1 rounded pr-3 focusable cursor-pointer text-left', + 'h-full w-full inline-flex items-center justify-center gap-1 rounded pr-3 focusable cursor-pointer text-left hover:shadow-md ease-out group-[.is-dragging]:shadow-md', className )} onClick={handleClick} + ref={ref} >