fix(desktop): collapse github-import cards with Disclosure to fix blank space#248
fix(desktop): collapse github-import cards with Disclosure to fix blank space#248Fldicoahkiin wants to merge 1 commit into
Conversation
…nk space The import-from-github panel collapsed each card body with a `grid grid-rows-[1fr]/[0fr]` animation. With a long scanned skill list inside the scrolling panel, the `1fr` row expanded past its content and left a large blank area below the list. Replace the hand-rolled grid collapse with HeroUI's `Disclosure` (controlled via isExpanded / onExpandedChange, plus isDisabled for not-yet-reached cards), which sizes to its content and keeps the expand/collapse animation. The card-2 select-all / deselect-all buttons move into the disclosure content, since a Disclosure.Trigger is itself a button and cannot nest buttons. Fixes #247
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesDisclosure-based card accordion refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
问题
ImportGithubSkillPanel扫描出长技能列表后,列表底部出现大片空白。根因
三张折叠卡片用
grid grid-rows-[1fr]/[0fr]动画。长列表在h-full overflow-y-auto滚动容器内,1frrow 撑得高于内容,内容下方留白。本地导入 / 新建面板没有这个折叠,因此没有此问题。修复
改用 HeroUI
Disclosure(受控):isExpanded+onExpandedChange(重新展开时 reset 下游状态)isExpanded+onExpandedChange+isDisabled(替代原先的 reached 门控)ChevronDownIcon→Disclosure.IndicatorDisclosure.Content(Disclosure.Trigger本身是 button,不能嵌 button)Disclosure 按内容高度渲染,消除留白,并保留展开 / 折叠动画。
验证
bun run typecheck:0 errorFixes #247
Summary by CodeRabbit