fix(site): avoid default otk-agentic-bubble-list layout in docs#9606
fix(site): avoid default otk-agentic-bubble-list layout in docs#9606chenshuai2144 wants to merge 1 commit intomasterfrom
Conversation
Add site theme reset so embedded Agentic bubble list does not force flex column, gap, min-height, padding, and scroll on ProComponents docs. Co-authored-by: 陈帅 <wasd2144@hotmail.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9606 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 368 368
Lines 11257 11257
Branches 4157 4157
=======================================
Hits 9966 9966
Misses 1139 1139
Partials 152 152 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new style reset file, otkAgenticBubbleListReset.less, and registers it within the site-dumi-plugin.ts configuration to adjust the layout of Ant Design Agentic bubble lists. The review feedback suggests optimizing the CSS by removing redundant flexbox properties that are inactive under display: block and recommends using idiomatic LESS nesting for descendant selectors to improve maintainability.
| display: block; | ||
| flex-direction: initial; | ||
| gap: 0; |
There was a problem hiding this comment.
When display: block is applied, flex-specific properties like flex-direction and gap are ignored by the browser. While including them can be a defensive measure against other styles overriding the display property back to flex, they are technically redundant here. If the intention is to completely revert to a block layout, these lines can be removed to keep the CSS cleaner.
display: block;
min-height: 0;
| .otk-agentic-bubble-list .otk-agentic-bubble-list-content-list { | ||
| padding-top: 0; | ||
| padding-bottom: 0; | ||
| } |
Summary
The class
.otk-agentic-bubble-list(from Ant Design Agentic) applies a fixed flex column layout withgap: 32px,min-height: 200px, padding, and scroll overflow. This change adds a site-level override so the ProComponents dumi site does not inherit that behavior for embedded Agentic bubble lists.Changes
site/theme/otkAgenticBubbleListReset.lessto reset those properties to neutral values (display: block,gap: 0,min-height: 0, no extra padding,overflow: visible, and zero vertical padding on.otk-agentic-bubble-list-content-list).site-dumi-plugin.tsnext tomarkdownExternalLink.less.Note
pnpm run tscwas not run in this environment becausenode_modulesis not installed.