Skip to content
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

feat(FloatingPanel): support position attribute #6829

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

765477020
Copy link

实现#6827

Copy link
Contributor

github-actions bot commented Feb 17, 2025

Prepare preview

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.67%. Comparing base (18d3b83) to head (bb9816b).

Files with missing lines Patch % Lines
src/components/floating-panel/floating-panel.tsx 86.95% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6829      +/-   ##
==========================================
- Coverage   92.70%   92.67%   -0.03%     
==========================================
  Files         335      335              
  Lines        7199     7213      +14     
  Branches     1793     1814      +21     
==========================================
+ Hits         6674     6685      +11     
- Misses        490      492       +2     
- Partials       35       36       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -25,6 +26,7 @@ export type FloatingPanelProps = {
children: ReactNode
onHeightChange?: (height: number, animating: boolean) => void
handleDraggingOfContent?: boolean
position?: 'bottom' | 'top'
Copy link
Member

Choose a reason for hiding this comment

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

placement 吧~

<div className={`${classPrefix}-header`} ref={headerRef}>
<div className={`${classPrefix}-bar`} />
</div>
{position === 'bottom' && (
Copy link
Member

Choose a reason for hiding this comment

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

申明一个 headerNode 变量,然后条件填进来,不要重复写定义代码~

Copy link
Author

Choose a reason for hiding this comment

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

感谢指出问题,让我发现了编码时的“陋习”,已修改提交代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants