Skip to content

Conversation

@hamo-o
Copy link
Contributor

@hamo-o hamo-o commented May 15, 2025

#️⃣ 연관된 이슈>

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

UI 작업해두신거에 API 연결, 리다이렉트 로직 추가했습니다.

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

Summary by CodeRabbit

  • New Features

    • Added the ability to view and manage linked Google Calendar accounts in the sidebar, including a list of connected calendars and an option to add new accounts.
    • Introduced a new route to handle Google Calendar OAuth redirects and ensure calendar data is refreshed after authorization.
    • Added new calendar and clock icon components for improved visual representation.
  • Improvements

    • Enhanced sidebar functionality by displaying linked calendar accounts.
    • Updated UI styles for the Linked Calendar feature for a more consistent look and feel.
  • Chores

    • Updated internal dependencies and package versions for better workspace management.
    • Adjusted deployment workflow to change the target directory structure on the server.

@hamo-o hamo-o self-assigned this May 15, 2025
@hamo-o hamo-o requested a review from dioo1461 as a code owner May 15, 2025 10:55
@hamo-o hamo-o added the 🖥️ FE Frontend label May 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 15, 2025

Walkthrough

This update introduces a new "Linked Calendar" feature in the client app, enabling users to view and add linked Google Calendar accounts. It adds new React components, API hooks, Zod schemas, and styling for the feature. Supporting changes include new icon components, environment variable integration, and minor workflow and dependency adjustments.

Changes

File(s) Change Summary
frontend/apps/client/package.json, frontend/packages/ui/package.json Updated internal dependency versions to workspace protocol; incremented UI package version.
.github/workflows/fe-cd.yml Changed deployment directory structure for frontend assets on the server.
frontend/apps/client/src/envconfig.ts Added GOOGLE_CALENDAR_PERMISSION_URL to exported environment config.
frontend/apps/client/src/features/my-calendar/model/index.ts Added Zod schema and type alias for CalendarListResponse.
frontend/apps/client/src/features/my-calendar/api/index.ts Added calendarApi with getCalendarList method; fixed object closure.
frontend/apps/client/src/features/my-calendar/api/keys.ts Added calendarKeys export; fixed object closure.
frontend/apps/client/src/features/my-calendar/api/queries.ts Added useCalendarListQuery React Query hook.
frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/CalendarAccountAddButton.tsx Added new CalendarAccountAddButton component for adding calendar accounts.
frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/LinkedCalendarList.tsx Added LinkedCalendarList component to display linked calendars or empty state.
frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/index.css.ts Added vanilla-extract CSS module for LinkedCalendar feature styling.
frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/index.tsx Added main LinkedCalendar component to fetch and display linked calendars.
frontend/apps/client/src/features/my-calendar/ui/SideBar/index.tsx Imported and rendered LinkedCalendar in the sidebar.
frontend/apps/client/src/routes/oauth.redirect/calendar/index.tsx Added redirect route to invalidate calendar queries and navigate to /my-calendar.
frontend/packages/ui/src/components/Icon/component/CalendarMini.tsx Added new CalendarMini SVG icon component.
frontend/packages/ui/src/components/Icon/component/ClockGraphic.tsx Added new ClockGraphic SVG icon component.
frontend/packages/ui/src/components/Icon/index.ts Reorganized and expanded icon exports, including new icons.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SideBar
    participant LinkedCalendar
    participant useCalendarListQuery
    participant calendarApi
    participant API Server

    User->>SideBar: View sidebar
    SideBar->>LinkedCalendar: Render component
    LinkedCalendar->>useCalendarListQuery: Fetch calendar list
    useCalendarListQuery->>calendarApi: getCalendarList()
    calendarApi->>API Server: GET /api/v1/calendar/list
    API Server-->>calendarApi: Return CalendarListResponse[]
    calendarApi-->>useCalendarListQuery: Return data
    useCalendarListQuery-->>LinkedCalendar: Provide calendarList, isPending
    LinkedCalendar->>User: Display linked calendars or add button
Loading
sequenceDiagram
    participant User
    participant RedirectRoute
    participant QueryClient
    participant Router

    User->>RedirectRoute: Visit /oauth/redirect/calendar/
    RedirectRoute->>QueryClient: Invalidate calendarKeys.all queries
    QueryClient-->>RedirectRoute: Queries invalidated
    RedirectRoute->>Router: Navigate to /my-calendar
Loading

Poem

🐰✨
A calendar hops onto the scene,
With buttons blue and icons clean.
Now linked accounts are easy to see,
Add your Google, set yourself free!
With queries fresh and styles anew,
This rabbit brings new features to you.
📅💙


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 67bd32815cfa9c597df8cad0cfa2f5d1bccb1af8 and c015961.

⛔ Files ignored due to path filters (2)
  • frontend/packages/ui/src/components/Icon/svg/calendar-mini.svg is excluded by !**/*.svg
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (17)
  • .github/workflows/fe-cd.yml (1 hunks)
  • frontend/apps/client/package.json (1 hunks)
  • frontend/apps/client/src/envconfig.ts (1 hunks)
  • frontend/apps/client/src/features/my-calendar/api/index.ts (2 hunks)
  • frontend/apps/client/src/features/my-calendar/api/keys.ts (1 hunks)
  • frontend/apps/client/src/features/my-calendar/api/queries.ts (2 hunks)
  • frontend/apps/client/src/features/my-calendar/model/index.ts (1 hunks)
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/CalendarAccountAddButton.tsx (1 hunks)
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/LinkedCalendarList.tsx (1 hunks)
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/index.css.ts (1 hunks)
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/index.tsx (1 hunks)
  • frontend/apps/client/src/features/my-calendar/ui/SideBar/index.tsx (2 hunks)
  • frontend/apps/client/src/routes/oauth.redirect/calendar/index.tsx (1 hunks)
  • frontend/packages/ui/package.json (1 hunks)
  • frontend/packages/ui/src/components/Icon/component/CalendarMini.tsx (1 hunks)
  • frontend/packages/ui/src/components/Icon/component/ClockGraphic.tsx (1 hunks)
  • frontend/packages/ui/src/components/Icon/index.ts (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • frontend/packages/ui/package.json
  • frontend/packages/ui/src/components/Icon/component/ClockGraphic.tsx
  • frontend/packages/ui/src/components/Icon/index.ts
  • frontend/packages/ui/src/components/Icon/component/CalendarMini.tsx
🚧 Files skipped from review as they are similar to previous changes (11)
  • frontend/apps/client/src/features/my-calendar/ui/SideBar/index.tsx
  • frontend/apps/client/src/envconfig.ts
  • frontend/apps/client/src/features/my-calendar/api/index.ts
  • frontend/apps/client/src/features/my-calendar/api/queries.ts
  • frontend/apps/client/package.json
  • frontend/apps/client/src/features/my-calendar/model/index.ts
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/index.css.ts
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/index.tsx
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/LinkedCalendarList.tsx
  • frontend/apps/client/src/features/my-calendar/api/keys.ts
  • frontend/apps/client/src/features/my-calendar/ui/LinkedCalendar/CalendarAccountAddButton.tsx

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Join our Discord community for assistance with any issues or questions.

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 sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

@dioo1461
Copy link
Contributor

잘 작동하네요! 고생하셨습니다~

다만 현재 캘린더 권한 승인 이후에 바로 my-calendar 페이지로 리다이렉트되면서 GET calendar/list 요청이 빈 배열을 반환하여, 새로고침 전까지 연동된 캘린더 목록이 화면에 표시되지 않는 문제가 있습니다..!

해결하려면 백엔드에서 사용자에게 할당된 캘린더 정보가 완전히 업데이트된 이후에 리다이렉트를 수행하도록 해주어야 할 것 같습니다.

@hamo-o hamo-o force-pushed the feature/fe/google-calendar-permission branch from 63feeb1 to 67bd328 Compare June 4, 2025 03:35
@hamo-o hamo-o force-pushed the feature/fe/google-calendar-permission branch from 67bd328 to c015961 Compare June 4, 2025 05:33
@hamo-o
Copy link
Contributor Author

hamo-o commented Jun 4, 2025

잘 작동하네요! 고생하셨습니다~

다만 현재 캘린더 권한 승인 이후에 바로 my-calendar 페이지로 리다이렉트되면서 GET calendar/list 요청이 빈 배열을 반환하여, 새로고침 전까지 연동된 캘린더 목록이 화면에 표시되지 않는 문제가 있습니다..!

해결하려면 백엔드에서 사용자에게 할당된 캘린더 정보가 완전히 업데이트된 이후에 리다이렉트를 수행하도록 해주어야 할 것 같습니다.

c015961 해결했습니다.

@hamo-o hamo-o merged commit 6c939ed into dev Jun 4, 2025
1 check passed
@hamo-o hamo-o deleted the feature/fe/google-calendar-permission branch June 4, 2025 05:33
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.

3 participants