-
-
Notifications
You must be signed in to change notification settings - Fork 53
Feat: Basic collapsible component added #407
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
WalkthroughThe changes involve updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- src/components/ui/Button/Button.tsx (2 hunks)
- src/components/ui/Collapsible/Collapsible.stories.tsx (1 hunks)
- src/components/ui/Collapsible/Collapsible.tsx (1 hunks)
Additional comments not posted (6)
src/components/ui/Button/Button.tsx (2)
15-15: LGTM! Enhanced flexibility forButtonProps.The inclusion of
DetailedHTMLPropsandPropsWithChildrenimproves the component's flexibility by allowing it to accept standard HTML button attributes and children.
17-17: LGTM! ImprovedButtoncomponent usability.The adjustments to the
Buttoncomponent's props, including setting the default size to 'medium', enhance its usability and clarity.src/components/ui/Collapsible/Collapsible.tsx (1)
28-57: LGTM! Well-structuredCollapsiblecomponent.The
Collapsiblecomponent is well-structured, providing expandable/collapsible functionality with support for custom triggers and default icons.src/components/ui/Collapsible/Collapsible.stories.tsx (3)
19-32: LGTM! ClearDefaultstory forCollapsible.The
Defaultstory effectively demonstrates the basic usage and default behavior of theCollapsiblecomponent.
34-47: LGTM! EffectiveWithTitlestory forCollapsible.The
WithTitlestory clearly demonstrates the usage of theCollapsiblecomponent with a title.
49-72: LGTM! ComprehensiveExternalTriggerstory forCollapsible.The
ExternalTriggerstory effectively demonstrates the usage of theCollapsiblecomponent with an external trigger, showcasing its flexibility.
| * | ||
| * */ | ||
|
|
||
| export type CollapsibleProps = { open?: boolean, title?: string, trigger?: ReactNode} & PropsWithChildren; |
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.
Consider implementing checklist features.
The checklist indicates missing features such as RTL support, animations, and positioning. Consider implementing these for a more robust component.
Would you like help implementing these features or opening a GitHub issue to track them?
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.
Would you like help implementing these features or opening a GitHub issue to track them?
nah man, I'm good.
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.
@decipher-cs, understood! If you need any assistance in the future, feel free to reach out. 😊
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=======================================
Coverage 94.44% 94.44%
=======================================
Files 10 10
Lines 54 54
Branches 9 9
=======================================
Hits 51 51
Misses 3 3 ☔ View full report in Codecov by Sentry. |
<Button/>propsSummary by CodeRabbit
New Features
Collapsiblecomponent allowing users to expand and contract content sections with customizable triggers and titles.Collapsiblecomponent, showcasing various configurations and enhancing developer visibility.Buttoncomponent to accept standard HTML button attributes and improved prop handling for better usability.Bug Fixes
sizeprop in theButtoncomponent defaults to 'medium' for consistent appearance.