Skip to content

docs(bubble): update messageRender type desc and fix typo #1048

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wzc520pyfm
Copy link
Contributor

@wzc520pyfm wzc520pyfm commented Jul 20, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

中文文档中:为messageRender类型标注补充ContentType 范性来源和链接(和英文文档保持一致)。

Before:

image

After:

image

📝 Change Log

Language Changelog
🇺🇸 English update messageRender type desc
🇨🇳 Chinese 更新messageRender类型描述

Summary by CodeRabbit

  • 文档
    • 修正了 Bubble 组件文档中的类型声明语法错误,统一 TypeScript 类型定义格式,提升了示例的准确性和可读性。

Copy link
Contributor

coderabbitai bot commented Jul 20, 2025

📝 Walkthrough

Walkthrough

本次变更仅涉及 Bubble 组件文档的 TypeScript 类型定义示例修正与简化,包括 messageRender 属性类型签名的简化,以及示例中自定义类型声明语法的更正,未涉及实际代码实现或导出实体的变更。

Changes

文件/分组 变更摘要
components/bubble/index.en-US.md 修正了自定义类型声明语法(添加等号),更新了类型签名链接。
components/bubble/index.zh-CN.md 简化并泛型化了 messageRender 类型签名,修正了自定义类型声明语法。

Sequence Diagram(s)

(本次变更仅为文档类型示例修正,无需生成时序图。)

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • afc163

Poem

🐰
文档修正添等号,
泛型简化更明了。
气泡组件更易懂,
小兔欢喜跳一跳。
代码未动心意到,
细节完善真美妙!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ac2c81 and 687ad99.

📒 Files selected for processing (2)
  • components/bubble/index.en-US.md (2 hunks)
  • components/bubble/index.zh-CN.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • components/bubble/index.en-US.md
  • components/bubble/index.zh-CN.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: test / react component workflow
  • GitHub Check: size
  • GitHub Check: build preview
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Jul 20, 2025

Preview is ready

@dosubot dosubot bot added the documentation Improvements or additions to documentation label Jul 20, 2025
Copy link

codecov bot commented Jul 20, 2025

Bundle Report

Bundle size has no change ✅

Copy link

codecov bot commented Jul 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.54%. Comparing base (fc7a000) to head (687ad99).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1048   +/-   ##
=======================================
  Coverage   92.54%   92.54%           
=======================================
  Files          69       69           
  Lines        1556     1556           
  Branches      418      418           
=======================================
  Hits         1440     1440           
  Misses        116      116           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -56,7 +56,7 @@ Common props ref:[Common props](/docs/react/common-props)
| typing | Show message with typing motion | boolean \| { step?: number, interval?: number } | false | |
| variant | Style variant | `filled` \| `borderless` \| `outlined` \| `shadow` | `filled` | |
| loadingRender | Customize loading content | () => ReactNode | - | |
| messageRender | Customize display content | <ContentType extends [BubbleContentType](https://github.com/ant-design/x/blob/d3232c925a0dc61ad763c6664e16f07323ebca4a/components/bubble/interface.ts#L21) = string>(content?: ContentType) => ReactNode | - | |
| messageRender | Customize display content | (content?: ContentType) => ReactNode | - | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ContentType 最好留一个链接,不然看不出来里面有啥。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那我保留英文文档的链接,给中文文档补充下链接

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更新

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants