Skip to content

Conversation

@hamo-o
Copy link
Contributor

@hamo-o hamo-o commented Feb 5, 2025

#️⃣ 연관된 이슈>

📝 작업 내용> 이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

  • 기/디 피드백: 캘린더 헤더에서의 직접 선택을 막고, 선택된 날짜는 하이라이팅 되었다가 애니메이션으로 사라지도록 합니다. (선택된 값은 계속 유지됨)
  • 선택 시간의 시작과 끝의 Date 객체를 상태로 들고 있도록 합니다.
    • 드래그 시 15분 단위로 셀 선택 구현
    • 클릭 시 15분짜리 셀 선택 구현
    • 캘린더 외부 클릭 시 선택 해제 구현

아래 UI (새 일정 표시 및 시간범위 렌더링) 제외하고 구현했습니다.
image

🙏 여기는 꼭 봐주세요! > 리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

Summary by CodeRabbit

  • New Features

    • Introduced a new CalendarDetailCell component for enhanced time cell interactivity.
    • Added a TimeTableProvider for improved context management within the calendar.
  • Bug Fixes

    • Removed outdated week change functionality, simplifying week navigation.
  • Style

    • Updated animations and visual highlights across calendar cells and notifications for a smoother, more refined experience.
  • Refactor

    • Streamlined date handling and interaction logic across calendar components, including revised selection behavior and improved click-outside detection.

@hamo-o hamo-o added the 🖥️ FE Frontend label Feb 5, 2025
@hamo-o hamo-o added this to the 1차 스프린트 milestone Feb 5, 2025
@hamo-o hamo-o requested a review from dioo1461 as a code owner February 5, 2025 11:48
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2025

Walkthrough

This pull request revises multiple calendar-related components, hooks, and styles. It removes obsolete week-change handlers and replaces a holiday boolean with date objects across components. New functionalities include a time selection mechanism with associated context and hooks, an outside-click detector for resetting selections, and an added CalendarDetailCell for detailed time block interactions. Additionally, styling updates integrate new animation properties for highlight effects, and several utility functions for date operations have been introduced.

Changes

File(s) Change Summary
Calendar/Core/SelectedWeek.tsx, WeekCell.tsx, TimeControlButton.tsx, index.css.ts Removed week-change handler (handleChangeWeek) and made onClickHandler optional; added a clickable prop to chevron icons; updated styling to remove cursor: pointer and integrate fadeHighlightProps.
Calendar/Header/CalendarHeader.tsx Removed isWeekend utility; replaced holiday prop with date prop in CalendarCell usage.
Calendar/Table/CalendarCell.tsx, CalendarDay.tsx, CalendarDetailCell.tsx, index.css.ts, index.tsx Replaced holiday property with date in interfaces and component props; updated cell logic to use isWeekend(date); introduced the new CalendarDetailCell for time block rendering; added styling recipes with state variants; integrated the useClickOutside hook and updated component props.
Calendar/context/TimeTableContext.ts, TimeTableProvider.tsx, Calendar/index.tsx Introduced a new time table context and provider (TimeTableProvider) utilizing a custom hook (useSelectTime), and updated the calendar hierarchy to include this new provider.
Notification/GlobalNotification.tsx Updated import and classname from fadeInAndOut to fadeInAndOutStyle for consistent styling.
Constants & Utils (constants/date.ts, utils/date/date.ts) Changed the type for TIMES to readonly number[], added a new MINUTES constant, and introduced new date utility functions: sortDate and isDateInRange.
Hooks & Theme (hooks/useClickOutside.ts, hooks/useSelectTime.ts, theme/animation.css.ts) Added custom hooks to detect clicks outside elements and manage time selection state; renamed animation export and added new animation keyframes and properties.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant CD as CalendarDetailCell
    participant TTC as TimeTableContext (useSelectTime)
    participant Reducer as Time Selection Reducer

    U->>CD: Click on a detail cell
    CD->>TTC: Trigger mouse event handler (SELECT_START/PROGRESS/END)
    TTC->>Reducer: Dispatch action to update selection state
    Reducer-->>TTC: Return updated time selection state
    TTC-->>CD: Update cell state (selected/done/default)
Loading
sequenceDiagram
    participant U as User
    participant DT as Document (click event)
    participant CC as CalendarTable
    participant UC as useClickOutside Hook
    participant Reset as TimeTableContext.reset

    U->>DT: Click event occurs
    DT->>UC: Capture click event
    alt Click is outside calendar table
        UC->>Reset: Invoke reset function
        Reset-->>CC: Clear time selection state
    else Click is inside calendar table
        UC-->>CC: No action taken
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
블록 단위 편집 구현 [#61] Block-level editing functionality is not implemented.

Possibly related PRs

Suggested reviewers

  • dioo1461

Poem

I'm a rabbit in the code, hopping through the day,
Tweaking calendar cells in a whimsical display.
With time hooks and animations shining bright,
I nibble on bugs and set the dates right.
A joyful jump in each revised line—
Code magic in every bound, simply divine!
🐰✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93c6ccb and 3350833.

📒 Files selected for processing (2)
  • frontend/src/components/Calendar/Core/WeekCell.tsx (2 hunks)
  • frontend/src/hooks/useClickOutside.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/hooks/useClickOutside.ts
🧰 Additional context used
📓 Learnings (1)
frontend/src/components/Calendar/Core/WeekCell.tsx (1)
Learnt from: hamo-o
PR: softeer5th/Team4-enDolphin#95
File: frontend/src/components/Calendar/Core/WeekCell.tsx:34-34
Timestamp: 2025-02-06T01:44:08.551Z
Learning: In the Calendar WeekCell component, `Date.now()` is intentionally used as a key when selected is true to force re-renders of the component when the selected state changes. This is a specific requirement for the component's animation behavior.
🔇 Additional comments (2)
frontend/src/components/Calendar/Core/WeekCell.tsx (2)

13-13: LGTM!

Clean removal of the onClickHandler prop aligns with the interface changes and the PR's objective to prevent direct selection from calendar header.


31-31: LGTM!

Using Date.now() as key when selected is true is intentional here to force re-renders for animation purposes.

Note: While using Date.now() as a key is generally not recommended as it can cause unnecessary re-renders, in this specific case it's an intentional implementation requirement for the component's animation behavior.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (15)
frontend/src/theme/animation.css.ts (2)

34-47: LGTM! Consider performance optimization for the animation.

The highlight animation sequence is well-implemented and aligns with the PR objectives. However, consider using transform instead of box-shadow for better performance, as box-shadow animations can be computationally expensive.

 export const fadeHighlight = keyframes({
   '0%': { backgroundColor: vars.color.Ref.Netural.White },
   '5%': { 
     backgroundColor: vars.color.Ref.Primary[50],         
-    boxShadow: `inset 0 0 0 0.5px ${vars.color.Ref.Primary[100]}`, 
+    transform: 'scale(1.01)',
   },
   '50%': { 
     backgroundColor: vars.color.Ref.Primary[50],
-    boxShadow: `inset 0 0 0 0.5px ${vars.color.Ref.Primary[100]}`,
+    transform: 'scale(1.01)',
   },
   '100%': { 
     backgroundColor: vars.color.Ref.Netural.White,
+    transform: 'scale(1)',
   },
 });

49-53: Consider reducing the animation duration for better UX.

A 2-second duration might feel too long for a highlight effect. Consider reducing it to 0.5-1s for a snappier user experience, especially since this is used for calendar cell interactions.

 export const fadeHighlightProps: CSSProperties = {
   animationName: fadeHighlight,
-  animationDuration: '2s',
+  animationDuration: '0.8s',
   animationFillMode: 'forwards',
 };
frontend/src/components/Calendar/context/TimeTableContext.ts (1)

1-8: LGTM! Consider adding JSDoc comments.

The context implementation follows React best practices with proper type safety. Consider adding JSDoc comments to document the purpose and usage of the context and hook.

+/**
+ * Context for managing time-related information in the calendar.
+ * @type {React.Context<TimeInfo | null>}
+ */
 export const TimeTableContext = createContext<TimeInfo | null>(null);
 
+/**
+ * Hook to safely consume the TimeTableContext.
+ * @throws {Error} When used outside of TimeTableContext.Provider
+ * @returns {TimeInfo} The current time information
+ */
 export const useTimeTableContext = (): TimeInfo => useSafeContext(TimeTableContext);
frontend/src/constants/date.ts (2)

5-7: Simplify array generation.

The TIMES array generation can be simplified using Array.from().

-export const TIMES: readonly number[] = Object.freeze(
-  new Array(24).fill(0)
-    .map((_, i) => i));
+export const TIMES: readonly number[] = Object.freeze(
+  Array.from({ length: 24 }, (_, i) => i));

20-22: Simplify MINUTES array generation.

Similar to TIMES, the MINUTES array generation can be simplified.

-export const MINUTES = Object.freeze(
-  new Array(4).fill(0)
-    .map((_, i) => i * 15));
+export const MINUTES = Object.freeze(
+  Array.from({ length: 4 }, (_, i) => i * 15));
frontend/src/components/Calendar/Table/CalendarDay.tsx (1)

24-31: Fix map function syntax.

Remove the unnecessary trailing comma in the map function.

-    {TIMES.map((time) => (
-      <CalendarCell
-        date={date}
-        key={time}
-        selected={selected}
-        time={time}
-      />
-    ),
+    {TIMES.map((time) => (
+      <CalendarCell
+        date={date}
+        key={time}
+        selected={selected}
+        time={time}
+      />
+    )
    )}
frontend/src/hooks/useClickOutside.ts (1)

4-26: LGTM! Well-implemented custom hook with proper cleanup.

The hook effectively handles outside clicks and properly cleans up event listeners.

Consider adding error handling for cases where the ref is not properly initialized:

 export const useClickOutside = <T extends HTMLElement>(
   onClickOutside: (event: MouseEvent) => void,
 ) => {
   const notClickableRef: RefObject<T | null> = useRef<T>(null);

   useEffect(() => {
     const handleClickOutside = (e: MouseEvent) => {
+      if (!notClickableRef.current) {
+        console.warn('useClickOutside: ref not initialized');
+        return;
+      }
       const target = e.target as Node;
-      const isOutside =
-        notClickableRef.current && !notClickableRef.current.contains(target);
+      const isOutside = !notClickableRef.current.contains(target);
       if (!isOutside) return;

       onClickOutside(e);
     };

     document.addEventListener('click', handleClickOutside, true);
     return () => {
       document.removeEventListener('click', handleClickOutside, true);
     };
   }, [notClickableRef, onClickOutside]);

   return notClickableRef;
 };
frontend/src/components/Calendar/Table/CalendarDetailCell.tsx (2)

20-24: Consider memoizing the state style calculation.

The state style calculation could be memoized to prevent unnecessary recalculations.

-  const stateStyle = (() => {
+  const stateStyle = useMemo(() => {
     if (done) return 'done';
     if (selected) return 'selected';
     return 'default';
-  })();
+  }, [done, selected]);

26-35: Consider memoizing event handlers.

The mouse event handlers could be memoized to prevent unnecessary re-renders.

+  const memoizedHandlers = useMemo(() => ({
+    onClick: () => handleClick(date),
+    onMouseDown: () => handleMouseDown(date),
+    onMouseEnter: () => handleMouseEnter(date),
+    onMouseUp: handleMouseUp,
+  }), [date, handleClick, handleMouseDown, handleMouseEnter, handleMouseUp]);

   return (
     <div
       className={cellDetailStyle({ state: stateStyle })}
       key={date.getTime()}
-      onClick={()=>handleClick(date)}
-      onMouseDown={()=>handleMouseDown(date)}
-      onMouseEnter={()=>handleMouseEnter(date)}
-      onMouseUp={handleMouseUp}
+      {...memoizedHandlers}
     />
   );
frontend/src/components/Calendar/Table/CalendarCell.tsx (1)

33-42: Consider memoizing time slots rendering.

The mapping over MINUTES array could be memoized to prevent unnecessary recalculations.

+  const timeSlots = useMemo(() => {
+    if (time === 'empty' || time === 'all') return null;
+    return (
+      <Flex direction='column' height='100%'>
+        {MINUTES.map((minute) => {
+          const newDate = new Date(date);
+          newDate.setHours(time);
+          newDate.setMinutes(minute);
+          return <CalendarDetailCell date={newDate} key={newDate.getTime()} />;
+        })}
+      </Flex>
+    );
+  }, [date, time]);

   return (
     <div 
       aria-selected={selected}
       className={cellStyle({ 
         day: isWeekend(date) ? 'holiday' : 'default', 
         time: formatTimeToStyle(time),
         state: selected ? 'selected' : 'default',
       })}
       role='gridcell'
       tabIndex={0}
     >
-      {(time === 'empty' || time === 'all') ? null : (
-        <Flex direction='column' height='100%'>
-          {MINUTES.map((minute) => {
-            const newDate = new Date(date);
-            newDate.setHours(time);
-            newDate.setMinutes(minute);
-            return <CalendarDetailCell date={newDate} key={newDate.getTime()} />;
-          })}
-        </Flex>
-      )}
+      {timeSlots}
     </div>
   );
frontend/src/hooks/useSelectTime.ts (1)

82-100: Consider adding memoization for event handlers

The event handlers are recreated on every render. Consider using useCallback to memoize them for better performance.

Apply this diff:

+import { useCallback, useReducer } from 'react';
 
 export const useSelectTime = (): TimeInfo => {
   const [state, dispatch] = useReducer(selectReducer, 
     { selectedTime: { startTime: null, endTime: null }, 
       doneTime: { startTime: null, endTime: null },
       isSelecting: false },
   );
 
+  const handleMouseDown = useCallback((date: Date) => 
+    dispatch({ type: 'SELECT_START', date }), []);
+  const handleMouseEnter = useCallback((date: Date) => 
+    dispatch({ type: 'SELECT_PROGRESS', date }), []);
+  const handleMouseUp = useCallback(() => 
+    dispatch({ type: 'SELECT_END' }), []);
+  const handleClick = useCallback((date: Date) => 
+    dispatch({ type: 'SELECT_END', date }), []);
+  const reset = useCallback(() => 
+    dispatch({ type: 'SELECT_CANCEL' }), []);
 
   return {
     selectedStartTime: state.selectedTime.startTime,
     selectedEndTime: state.selectedTime.endTime,
     doneStartTime: state.doneTime.startTime,
     doneEndTime: state.doneTime.endTime,
-    handleMouseDown: (date: Date) => dispatch({ type: 'SELECT_START', date }),
-    handleMouseEnter: (date: Date) => dispatch({ type: 'SELECT_PROGRESS', date }),
-    handleMouseUp: () => dispatch({ type: 'SELECT_END' }),
-    handleClick: (date: Date) => dispatch({ type: 'SELECT_END', date }),
-    reset: () => dispatch({ type: 'SELECT_CANCEL' }),
+    handleMouseDown,
+    handleMouseEnter,
+    handleMouseUp,
+    handleClick,
+    reset,
   };
 };
frontend/src/components/Calendar/Table/index.css.ts (1)

68-86: Consider adding transition properties for smoother state changes

The cellDetailStyle could benefit from smooth transitions between states.

Apply this diff:

  base: {
    width: '100%',
    flexGrow: 1,
    cursor: 'pointer',
+   transition: 'background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out',
  },
frontend/src/utils/date/date.ts (3)

108-127: Add input validation for invalid Date objects.

The function handles null cases well, but it should also validate that the input Date objects are valid to prevent potential runtime errors.

Consider adding validation like this:

 export const sortDate = (date1: Date | null, date2: Date | null): {
   startDate: Date | null;
   endDate: Date | null;
 } => {
   if (!date1 || !date2) {
     return { 
       startDate: date1 || date2, 
       endDate: date1 || date2, 
     };
   }
+  if (isNaN(date1.getTime()) || isNaN(date2.getTime())) {
+    throw new Error('Invalid Date object provided');
+  }
   const [startDate, endDate] 
     = [date1, date2].sort((a, b) => a.getTime() - b.getTime());
   return { startDate, endDate };
 };

129-135: Complete the function documentation.

The function's documentation is missing its description.

Add a description like this:

 /**
-
+ * Checks if a target date falls within a date range (inclusive).
  * @param target - 비교할 날짜
  * @param startDate - 시작 날짜
  * @param endDate - 종료 날짜
  * @returns - 날짜가 범위 내에 있는지 여부
  */

136-151: Add input validation for the target date.

The function should validate that the target date is a valid Date object.

Consider adding validation like this:

 export const isDateInRange = (
   target: Date,
   startDate: Date | null,
   endDate: Date | null,
 ): boolean => {
+  if (isNaN(target.getTime())) {
+    throw new Error('Invalid target Date object provided');
+  }
   if (!startDate || !endDate) return false;

   const { startDate: start, endDate: end } = sortDate(startDate, endDate);
   if (!start || !end) return false;

   const targetTime = target.getTime();
   const startTime = start.getTime();
   const endTime = end.getTime();

   return targetTime >= startTime && targetTime <= endTime;
 };
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 870c9a9 and 93c6ccb.

📒 Files selected for processing (19)
  • frontend/src/components/Calendar/Core/SelectedWeek.tsx (1 hunks)
  • frontend/src/components/Calendar/Core/TimeControlButton.tsx (2 hunks)
  • frontend/src/components/Calendar/Core/WeekCell.tsx (2 hunks)
  • frontend/src/components/Calendar/Core/index.css.ts (2 hunks)
  • frontend/src/components/Calendar/Header/CalendarHeader.tsx (2 hunks)
  • frontend/src/components/Calendar/Table/CalendarCell.tsx (2 hunks)
  • frontend/src/components/Calendar/Table/CalendarDay.tsx (1 hunks)
  • frontend/src/components/Calendar/Table/CalendarDetailCell.tsx (1 hunks)
  • frontend/src/components/Calendar/Table/index.css.ts (3 hunks)
  • frontend/src/components/Calendar/Table/index.tsx (1 hunks)
  • frontend/src/components/Calendar/context/TimeTableContext.ts (1 hunks)
  • frontend/src/components/Calendar/context/TimeTableProvider.tsx (1 hunks)
  • frontend/src/components/Calendar/index.tsx (2 hunks)
  • frontend/src/components/Notification/GlobalNotification.tsx (2 hunks)
  • frontend/src/constants/date.ts (2 hunks)
  • frontend/src/hooks/useClickOutside.ts (1 hunks)
  • frontend/src/hooks/useSelectTime.ts (1 hunks)
  • frontend/src/theme/animation.css.ts (2 hunks)
  • frontend/src/utils/date/date.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/src/components/Notification/GlobalNotification.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Send PR Notification to Reviewers
🔇 Additional comments (13)
frontend/src/theme/animation.css.ts (2)

6-6: Address the TODO comment about token magic numbers.

Consider moving the following magic numbers to design tokens:

  • Animation durations (0.3s)
  • Animation delays (2.7s)
  • Box shadow sizes (0.5px)

This will improve maintainability and consistency across animations.


30-32: LGTM! Clear naming improvement.

The rename from fadeInAndOut to fadeInAndOutStyle better indicates this is a style object.

frontend/src/components/Calendar/context/TimeTableProvider.tsx (1)

1-14: LGTM! Clean provider implementation.

The TimeTableProvider implementation follows React best practices with proper typing and clean component structure.

frontend/src/components/Calendar/index.tsx (1)

1-19: LGTM! Verify provider dependencies.

The component hierarchy is well-structured. The TimeTableProvider is correctly placed to provide time-related context to both CalendarHeader and CalendarTable.

Please verify that CalendarHeader and CalendarTable don't have any dependencies that require them to be direct children of CalendarProvider.

frontend/src/components/Calendar/Header/CalendarHeader.tsx (1)

15-20: LGTM! Clean refactor of CalendarCell props.

The changes effectively move the weekend logic to CalendarCell component, making it more self-contained and reusable.

frontend/src/components/Calendar/Table/CalendarDay.tsx (1)

7-10: LGTM! Clean interface update.

The CalendarDayProps interface update aligns well with the broader refactoring of date handling across components.

frontend/src/components/Calendar/Core/SelectedWeek.tsx (1)

9-11: LGTM! Aligned with PR objectives.

The removal of handleChangeWeek aligns with preventing direct selection from calendar header.

frontend/src/components/Calendar/Table/index.tsx (2)

2-3: LGTM! Good use of hooks and context for managing time selection.

The implementation correctly:

  • Uses useClickOutside hook to handle deselection when clicking outside.
  • Integrates TimeTableContext for managing time selection state.

Also applies to: 5-6, 13-14


18-18: LGTM! Clean up of CalendarDay props.

Good simplification by removing the holiday prop in favor of passing the date object directly.

Also applies to: 21-25

frontend/src/components/Calendar/Table/CalendarDetailCell.tsx (1)

6-19: LGTM! Well-structured time slot selection implementation.

The component correctly implements the required functionality for time slot selection through both drag and click actions.

frontend/src/components/Calendar/Core/WeekCell.tsx (1)

13-13: LGTM! Made onClickHandler optional.

Good change to make the click handler optional, aligning with the requirement to prevent direct selection from calendar header.

frontend/src/components/Calendar/Core/index.css.ts (1)

82-86: LGTM! Consistent use of fadeHighlight animation

The fadeHighlight animation is consistently applied across components, providing a unified user experience.

frontend/src/components/Calendar/Core/TimeControlButton.tsx (1)

18-18: LGTM! Enhanced button interactivity

The addition of the clickable prop to chevron icons improves visual feedback for user interactions.

Also applies to: 28-28

Copy link
Contributor

@dioo1461 dioo1461 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

select 범위 내에 존재할 시에 오전 0시 이전의 빈 공간도 하이라이트되면 좋을 것 같습니다.

구글 캘린더는 어떻게 하나 보니까 저희 캘린더의 empty 공간이 없고 그냥 아예 '오전 0시' 레이블을 출력하지 않는 방식으로 처리하네요? 하이라이트 처리가 힘들다면 이 방식도 나쁘진 않을 것 같습니다.

고생하셨습니다!

@hamo-o
Copy link
Contributor Author

hamo-o commented Feb 6, 2025

select 범위 내에 존재할 시에 오전 0시 이전의 빈 공간도 하이라이트되면 좋을 것 같습니다.

구글 캘린더는 어떻게 하나 보니까 저희 캘린더의 empty 공간이 없고 그냥 아예 '오전 0시' 레이블을 출력하지 않는 방식으로 처리하네요? 하이라이트 처리가 힘들다면 이 방식도 나쁘진 않을 것 같습니다.

고생하셨습니다!

애플 캘린더에서는 저희 서비스랑 비슷하게 최상단 빈칸을 표시해주고 있는데, 마찬가지로 선택되지 않아서 저희도 하이라이팅 하지 않아도 큰 문제는 없을 것 같습니다.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🖥️ FE Frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 블록 단위 선택 구현

3 participants