docs(site): ant-task-list-simple embed padding and collapsed content#9608
docs(site): ant-task-list-simple embed padding and collapsed content#9608chenshuai2144 wants to merge 1 commit intomasterfrom
Conversation
- Set .ant-task-list-simple padding to 0 4px - Collapse .ant-task-list-simple-content height to 0 when parent or content has a -collapsed modifier, with overflow hidden 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 |
There was a problem hiding this comment.
Code Review
This pull request registers a new LESS file, antTaskListSimpleSiteDefaults.less, within the site plugin and defines styles for the .ant-task-list-simple component. Feedback was provided to replace height: 0 and overflow: hidden with display: none for the collapsed state to improve accessibility and ensure the content is properly hidden from the layout.
| height: 0; | ||
| overflow: hidden; |
There was a problem hiding this comment.
Using height: 0 and overflow: hidden to hide collapsed content can cause accessibility issues, as interactive elements inside the collapsed area remain focusable via keyboard. Additionally, if the content node has padding or borders, height: 0 alone will not fully collapse the space, which contradicts the goal of not reserving space when folded. Since there is no CSS transition defined, display: none; is a more robust and accessible way to ensure the content is hidden and removed from the layout.
display: none;
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9608 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 368 368
Lines 11257 11257
Branches 4157 4154 -3
=======================================
Hits 9966 9966
Misses 1139 1139
Partials 152 152 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Adds site-level Less defaults for embedded Agentic task list UI (
.ant-task-list-simple).Changes
site/theme/antTaskListSimpleSiteDefaults.less.ant-task-list-simpleusespadding: 0 4px.ant-task-list-simple-collapsedon the root, or.ant-task-list-simple-content-collapsedon the content node),.ant-task-list-simple-contentusesheight: 0andoverflow: hiddenso the body does not reserve space when foldedsite-dumi-plugin.ts: import the new Less file through the existing entry pipeline (same pattern asmarkdownExternalLink.less)If the embed only toggles a class on the root, use
ant-task-list-simple-collapsedon.ant-task-list-simple. If it only marks the content node, useant-task-list-simple-content-collapsedon.ant-task-list-simple-content.