-
-
Notifications
You must be signed in to change notification settings - Fork 909
feat(x-markdown): 添加footer支持 #1348
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
base: next
Are you sure you want to change the base?
Conversation
- 新增footer相关props和样式 - 更新文档和测试用例 - 重构markdown容器结构
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ 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 |
Summary of ChangesHello @Samoy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求为 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
这次的 PR 很好地实现了一个新功能:为 XMarkdown 组件添加 footer 支持。这对于流式输出场景非常有用。代码结构清晰,包含了全面的测试用例、一个很好的演示以及相应的文档更新。整体实现质量很高。
我发现了一些可以改进的小地方,主要集中在 CSS 样式处理和演示代码的细节上,以提高组件的健壮性和易用性。请查看我的具体评论。
- 添加 CSS 变量控制页边距和内边距 - 重构页脚 DOM 结构和类名逻辑 - 移除 demo 中的冗余内联样式
- 移除冗余的 `ant-x-markdown-container` 类 - 统一使用 `x-markdown` 前缀的类名 - 更新相关测试用例
Bundle ReportChanges will increase total bundle size by 7.82MB (571.24%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: x-markdown-array-pushAssets Changed:
|

中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
#1296 #1347
💡 Background and Solution
当前 XMarkdown 在流式输出时无法动态展示尾缀(如"正在生成..."或品牌 Logo),导致用户需要在流结束后手动拼接。这影响了用户体验,特别是在 AI 对话、日志滚动等场景中。
为了解决此问题,实现以下功能:
支持在流式渲染过程中实时插入并更新尾部 ReactNode,可用来展示:
📝 Change Log
新增
footer属性用于在Markdown 末尾显示内容footerprop to display content at the end of Markdownfooter属性用于在Markdown 末尾显示内容