-
Notifications
You must be signed in to change notification settings - Fork 470
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
Fixes #1941 - Implement panel component with collapse ability #1948
Conversation
Pull Request Test Coverage Report for Build 2488
💛 - Coveralls |
Just started reviewing :) |
hey @bryceosterhaus this component looks good to me but I'm not sure if we should follow with Panel implemented with Collapse or just a hook for the Collapse, I do not know what use cases it had or if it was used. But it's fine with me if we go with that, since it no longer makes sense in the context of React to write as it was before. |
@matuzalemsteles I think we just keep collapse prop for panel. We can extract the transition height logic to its own hook and share it throughout clay though. I will wait for Diegos PR for navigation bar since he has a similar hook for transitioning height. |
@matuzalemsteles updated. I went ahead and extracted |
} | ||
} | ||
|
||
export function useTransitionHeight( |
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.
I decided to make this explicit to only "height" right now. In the future I can imagine this being expanded to all transitions, but wanted to narrow our scope now and not make it generic until we actually need it for other use cases.
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.
Yeah, makes sense. You did well.
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.
No problem Bryce, we can go with it that way. Thanks for this, I just left a comment to add warnings.
packages/clay-shared/README.md
Outdated
# clay-shared | ||
|
||
Shared utilities and hooks used across clay components | ||
|
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.
hey @bryceosterhaus you can put some warnings that this package for a moment is only for internal use and that the API's are unstable and can be modified at any time and that "use at your own risk".
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.
Good call, I went ahead and updated the README.
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.
LGTM!
I haven't added the animation for the height expanding yet. Wanted to make sure this was the route we wanted to go first.