Skip to content

Conversation

@dioo1461
Copy link
Contributor

@dioo1461 dioo1461 commented Jun 22, 2025

#️⃣ 연관된 이슈>

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

  • 지난 PR에서 누락되었던 calendar 패키지에 스토리북 세팅했습니다.

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

Summary by CodeRabbit

  • New Features

    • Introduced Storybook support for the calendar package, enabling interactive component previews and documentation.
    • Added global theme styling and enhanced control panel features for color and date properties in Storybook.
  • Chores

    • Added scripts to run and build Storybook directly from the package for easier development and deployment.

@dioo1461 dioo1461 self-assigned this Jun 22, 2025
@dioo1461 dioo1461 requested a review from hamo-o as a code owner June 22, 2025 12:35
@dioo1461 dioo1461 added the 🖥️ FE Frontend label Jun 22, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 22, 2025

Walkthrough

This change introduces Storybook support for the calendar package by adding configuration files for Storybook (main.ts and preview.ts) and updating package.json scripts to enable running and building Storybook. The configuration integrates Vite, Vanilla Extract for styling, path aliases, Chromatic, and enhanced control parameters.

Changes

File(s) Change Summary
frontend/packages/calendar/.storybook/main.ts Added Storybook main configuration using Vite, Vanilla Extract plugins, path aliases, and essential addons.
frontend/packages/calendar/.storybook/preview.ts Added Storybook preview configuration with global theme import and control parameter matchers for color/date.
frontend/packages/calendar/package.json Added "storybook" and "build-storybook" scripts to scripts section.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Storybook CLI
    participant Vite Builder
    participant VanillaExtract
    participant Calendar Components

    Developer->>Storybook CLI: Run "storybook" or "build-storybook"
    Storybook CLI->>Vite Builder: Start dev/build with custom config
    Vite Builder->>VanillaExtract: Apply CSS-in-TypeScript plugin
    Vite Builder->>Calendar Components: Resolve path aliases, build stories
    Storybook CLI->>Developer: Serve or build Storybook with themed preview
Loading

Possibly related PRs

Suggested reviewers

  • hamo-o

Poem

In the warren where stories bloom,
The calendar hops into the room.
With Vite and themes, and colors bright,
Storybook glows through day and night.
New scripts to run, new tales to show—
The garden of components begins to grow!
🐇✨


📜 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 ac77e68 and 66eba02.

📒 Files selected for processing (3)
  • frontend/packages/calendar/.storybook/main.ts (1 hunks)
  • frontend/packages/calendar/.storybook/preview.ts (1 hunks)
  • frontend/packages/calendar/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: frontend
🔇 Additional comments (10)
frontend/packages/calendar/package.json (1)

15-16: Add Storybook CLI scripts – verify commands and dependencies
Ensure that the storybook dev and storybook build commands align with your installed Storybook version (v7’s CLI is sb dev by default) and confirm that the necessary Storybook packages (@storybook/react-vite, @storybook/addon-essentials, @chromatic-com/storybook, @storybook/addon-interactions, etc.) are installed or hoisted in the workspace.

frontend/packages/calendar/.storybook/preview.ts (4)

1-2: Global CSS import is correct
Importing @endolphin/theme/css here applies your design system styles across all stories.


3-4: Type import for Preview looks good
Using Preview from @storybook/react properly types the configuration.


5-14: Configure control matchers
The controls.matchers regexes for color and date props are correctly scoped and will enhance your Storybook controls panel.


16-16: Default export is in place
Exporting the preview object finalizes the Storybook preview setup.

frontend/packages/calendar/.storybook/main.ts (5)

1-6: Imports for Storybook and Vanilla Extract look correct
You’re pulling in StorybookConfig from @storybook/react-vite along with the Vite and esbuild plugins for Vanilla Extract.


8-13: Stories and addons configuration is solid
Your glob patterns cover MDX and TS/JS stories, and you’ve included essentials, Chromatic, and interaction testing addons.


14-17: Framework preset is properly specified
Setting the framework name to @storybook/react-vite ensures Vite-based Storybook is used.


18-40: Vite customization via viteFinal is well-structured
Merging in the Vanilla Extract Vite plugin, esbuild runtime support, and path aliases (@, @hooks, @components) aligns with your monorepo conventions.


41-43: Exporting Storybook config
Default export of the config object completes the main.ts setup.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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? Create a ticket on our support page 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 docstrings to generate docstrings for this 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 dioo1461 changed the title [FE-Feat]: calendar 패키지에 스토리북 세팅 [FE-Feat] calendar 패키지에 스토리북 세팅 Jun 22, 2025
Copy link
Contributor

@hamo-o hamo-o left a comment

Choose a reason for hiding this comment

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

요것도 packages/ui 와 겹치는 세팅이어서, config로 관리하거나 루트에서 관리하면 어떨까 싶습니다.
참고: https://turborepo.com/docs/guides/tools/storybook#co-locating-stories

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