XMarkdown footer node
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.2k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 2
Description
### 需求动机
当前 XMarkdown 在流式输出时无法动态展示尾缀(如“正在生成...”或品牌 Logo),导致用户需要在流结束后手动拼接。
### 🎯 核心目标
支持在流式渲染过程中**实时插入并更新尾部 ReactNode**,可用来展示:
- 加载动画
- 版权签名
- 参考链接
### 🚀 详细需求
| 条目 | 内容 | 约束 |
|---|---|---|
| 定位 | 新增 `footer` 参数,类型 `ReactNode`,随流式更新而实时渲染 | 非 breaking |
| 使用场景 | 流式回答、AI 生成、日志滚动 | — |
| 样式 | 默认无样式,用户通过 `footer` 完全自定义;组件保证尾节点始终位于文档末尾 | — |
| 更新策略 | 每次收到新 chunk 后重新渲染 `footer`,不破坏已有 Markdown 结构 | — |
| 性能 | 仅 diff footer 区域,不触发整篇重渲染 | — |
### 🧪 验收标准
- [ ] 支持 `} ... />`
- [ ] 流式过程中 footer 节点保持可见且位置固定
- [ ] footer 变化不导致已渲染 Markdown 区域重排
- [ ] 文档 & 示例同步更新
- [ ] 单测覆盖率 ≥ 90%
### 📋 任务流程
1. 接收任务
2. 按 [RFC 模板](https://github.com/ant-design/x/discussions/categories/rfc) 提交设计 → 评审
3. 开发 + 编写文档
4. 补充单测 & e2e
5. 提交 PR,关联本 issue
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the XMarkdown component API and review the linked RFC template before choosing an implementation approach. The work is complete when a footer ReactNode updates during streaming, stays at the document end without disturbing rendered Markdown, and the documentation, examples, unit tests, and end-to-end tests cover the stated acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100