-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[WEB-4879] refactor: organize stories and remove logs #7765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nents to include component hierarchy
WalkthroughStorybook story meta titles were updated to use hierarchical names. The EmojiPicker story also tightened its state type by importing TChangeHandlerProps from its helper and simplified its onChange handler. No component logic changed; edits are limited to story files and a helper type export. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reorganizes Storybook component titles to follow a hierarchical structure for better organization and navigation. The changes update story titles to use consistent "Components/" prefixes with logical groupings like "Emoji" for related components.
- Updates story titles to include component hierarchy for better organization
- Groups emoji-related components under "Components/Emoji/" namespace
- Places animated counter component under "Components/" for consistent structure
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| emoji-reaction.stories.tsx | Updates story title from "EmojiReaction" to "Components/Emoji/EmojiReaction" |
| emoji-reaction-picker.stories.tsx | Updates story title from "EmojiReactionPicker" to "Components/Emoji/EmojiReactionPicker" |
| emoji-picker.stories.tsx | Updates story title to "Components/Emoji/EmojiPicker" and improves type safety |
| animated-counter.stories.tsx | Updates story title from "AnimatedCounter" to "Components/AnimatedCounter" |
Comments suppressed due to low confidence (1)
packages/propel/src/emoji-icon-picker/emoji-picker.stories.tsx:1
- Console.log statement should be removed from production code. Use a proper logging mechanism or remove this debug statement.
import { useState } from "react";
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
packages/propel/src/animated-counter/animated-counter.stories.tsx (1)
5-7: Storybook config verified; update Chromatic baselines for title change
Config in packages/propel uses @storybook/react-vite@9.1.2 and your stories import from it—no duplicate “Components/AnimatedCounter” titles detected.
Nit: consider
import type { ComponentProps } from "react"instead ofReact.ComponentPropsuseState(args.count ?? 0)instead ofargs.count || 0packages/propel/src/emoji-reaction/emoji-reaction-picker.stories.tsx (1)
7-14: Title hierarchy LGTM; swap console.log for Storybook action for cleaner DXThe rename looks good. Optional: replace console.log in the story with the Actions addon so interactions show up in the panel.
Suggested changes:
+import { action } from "@storybook/addon-actions"; @@ - onChange={(emoji) => { - setSelectedEmoji(emoji); - console.log("Selected emoji:", emoji); - }} + onChange={(emoji) => { + setSelectedEmoji(emoji); + action("onChange")(emoji); + }}packages/propel/src/emoji-icon-picker/emoji-picker.stories.tsx (1)
3-5: Use a type-only import for TChangeHandlerPropsAvoids pulling types into runtime bundles and keeps intent explicit.
-import { EmojiIconPickerTypes, TChangeHandlerProps } from "./helper"; +import { EmojiIconPickerTypes } from "./helper"; +import type { TChangeHandlerProps } from "./helper";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/propel/src/animated-counter/animated-counter.stories.tsx(1 hunks)packages/propel/src/emoji-icon-picker/emoji-picker.stories.tsx(2 hunks)packages/propel/src/emoji-reaction/emoji-reaction-picker.stories.tsx(1 hunks)packages/propel/src/emoji-reaction/emoji-reaction.stories.tsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/propel/src/emoji-icon-picker/emoji-picker.stories.tsx (2)
packages/propel/src/emoji-icon-picker/emoji-picker.tsx (1)
EmojiPicker(10-136)packages/propel/src/emoji-icon-picker/helper.tsx (1)
TChangeHandlerProps(8-19)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build and lint web apps
- GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/propel/src/emoji-reaction/emoji-reaction.stories.tsx (1)
4-6: Title hierarchy LGTMConsistent with the new Components/Emoji grouping.
packages/propel/src/emoji-icon-picker/emoji-picker.stories.tsx (2)
6-8: Title hierarchy LGTMMatches the Components/Emoji grouping used elsewhere.
19-21: Nice: narrowed state type improves story correctnessThis ensures the onChange payload matches the component contract.
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Description
This PR includes—
Type of Change