-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[WEB-4934] dev: propel button implementation #7859
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
base: preview
Are you sure you want to change the base?
Conversation
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 92 files out of 199 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ 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 moves the Button component from @plane/ui
to @plane/propel
and refactors the button styling logic into helper functions. The change affects multiple applications including web, space, and admin.
- Moved Button component from
plane/ui
toplane/propel
package - Refactored button styling with new helper functions (
getButtonStyling
,getIconStyling
) - Updated all import statements across applications to use the new propel button component
Reviewed Changes
Copilot reviewed 199 out of 199 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/propel/src/button/index.ts | Added export for helper functions |
packages/propel/src/button/helper.tsx | New helper file with button styling logic and types |
packages/propel/src/button/button.tsx | Refactored button component using new helper functions |
packages/propel/src/button/button.stories.tsx | Updated Storybook stories with new variants and examples |
apps/web/core/layouts/auth-layout/workspace-wrapper.tsx | Updated import to use propel button |
[Multiple app files] | Updated button imports across web, space, and admin applications |
Comments suppressed due to low confidence (2)
packages/propel/src/button/helper.tsx:1
- The icon props should have more specific types instead of 'any'. Consider using 'React.ReactElement' or a more specific React component type for better type safety.
export type TButtonVariant =
packages/propel/src/button/helper.tsx:1
- Using React.cloneElement without checking if the element accepts strokeWidth prop could cause errors. Consider adding type checking or making strokeWidth application conditional based on element type.
export type TButtonVariant =
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sm = "h-3 w-3 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0", | ||
md = "h-3.5 w-3.5 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0", | ||
lg = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0", | ||
xl = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0 ", |
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.
There's a trailing space in the xl size string. This should be removed for consistency with other size definitions.
xl = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0 ", | |
xl = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0", |
Copilot uses AI. Check for mistakes.
Description
In this PR Button component has been moved from plane/ui to plane/propel, and the propel button component code has also been refactored.
Type of Change