Skip to content

feat: Tour add actionsRender prop#53067

Merged
zombieJ merged 6 commits intoant-design:featurefrom
dengfuping:feat-tour-buttonsRender
Apr 29, 2025
Merged

feat: Tour add actionsRender prop#53067
zombieJ merged 6 commits intoant-design:featurefrom
dengfuping:feat-tour-buttonsRender

Conversation

@dengfuping
Copy link
Copy Markdown
Contributor

@dengfuping dengfuping commented Mar 5, 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

  • None

💡 Background and Solution

  • actionsRender usage example:
Step 1 Step 2
image image

📝 Change Log

Language Changelog
🇺🇸 English - 🆕 Tour add actionsRender prop to custom action button.
🇨🇳 Chinese - 🆕 Tour 新增 actionsRender 属性,用于自定义操作按钮。

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2025

Preview is ready

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2025

👁 Visual Regression Report for PR #53067 Failed ❌

🎯 Target branch: feature (c3c5e4d)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 6 changed, 🆕 7 added

Expected (Branch feature) Actual (Current PR) Diff
statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.png
statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.css-var.png statistic-timer.compact.css-var.png
statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.png
statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.css-var.png statistic-timer.dark.css-var.png
statistic-timer.default.png statistic-timer.default.png statistic-timer.default.png statistic-timer.default.png
statistic-timer.default.png statistic-timer.default.png statistic-timer.default.css-var.png statistic-timer.default.css-var.png
select-basic.mobile.png select-basic.mobile.png 🆕🆕🆕 Added 🆕🆕🆕
tour-actions-render.compact.css-var.png tour-actions-render.compact.css-var.png 🆕🆕🆕 Added 🆕🆕🆕

Warning

There are more diffs not shown in the table. Please check the Full Report for details.


Important

There are 13 diffs found in this PR: 🔄 6 changed, 🆕 7 added.
Please check all items:

  • Checked all diffs in the full report
  • Visual diff is acceptable

@petercat-assistant
Copy link
Copy Markdown

Walkthrough

This pull request introduces a new feature to the Tour component by adding a buttonsRender prop. This prop allows developers to customize the rendering of buttons within the Tour component, enhancing flexibility and control over the UI.

Changes

Files Summary
components/tour/demo/basic.tsx, components/tour/demo/mask.tsx, components/tour/demo/non-modal.tsx Minor adjustment to button spacing by removing extra space in button labels.
components/tour/demo/buttons-render.md, components/tour/demo/buttons-render.tsx Added new demo files to showcase the buttonsRender feature, including a markdown description and a TypeScript example.
components/tour/index.en-US.md, components/tour/index.zh-CN.md Updated documentation to include the new buttonsRender prop in both English and Chinese.
components/tour/index.tsx Integrated the buttonsRender prop into the Tour component's main file.
components/tour/interface.ts Updated the interface to define the new buttonsRender prop.
components/tour/panelRender.tsx Modified the panel rendering logic to utilize the buttonsRender prop, allowing for custom button rendering.

Comment thread components/tour/panelRender.tsx Outdated
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 5, 2025

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2025

Bundle Report

Changes will increase total bundle size by 524 bytes (0.02%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.4MB 524 bytes (0.02%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js 262 bytes 1.85MB 0.01%
antd.min.js 262 bytes 1.54MB 0.02%

Comment thread components/tour/interface.ts Outdated
Comment thread components/tour/interface.ts Outdated
@dengfuping dengfuping force-pushed the feat-tour-buttonsRender branch from 33fa6dc to a883221 Compare March 6, 2025 02:20
@dengfuping dengfuping changed the title feat: Tour add buttonsRender prop feat: Tour add actionsRender prop Mar 6, 2025
@dengfuping dengfuping force-pushed the feat-tour-buttonsRender branch 2 times, most recently from 22202c8 to 7ee2365 Compare March 6, 2025 02:37
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7a0a76e) to head (fbfef34).
Report is 15 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #53067   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          772       772           
  Lines        13937     13945    +8     
  Branches      3674      3678    +4     
=========================================
+ Hits         13937     13945    +8     

☔ 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.

@dengfuping
Copy link
Copy Markdown
Contributor Author

@zombieJ @thinkasany All comments are resolved and please take a look again, thanks!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

Comment thread components/tour/index.en-US.md Outdated
@dengfuping dengfuping force-pushed the feat-tour-buttonsRender branch from 75fcd0a to 83b3a12 Compare March 22, 2025 12:52
Comment thread components/tour/panelRender.tsx
@dengfuping dengfuping requested a review from thinkasany April 14, 2025 03:03
@dengfuping
Copy link
Copy Markdown
Contributor Author

@thinkasany 问题都已解决,能否帮忙再 CR 下。

@thinkasany thinkasany requested a review from afc163 April 14, 2025 03:05
@zombieJ
Copy link
Copy Markdown
Member

zombieJ commented Apr 16, 2025

方便挪到 next 不?这个 actions dom 的概念在 v5 里其实还不存在。

@github-actions
Copy link
Copy Markdown
Contributor

Hi @dengfuping. Thanks for your contribution. But, we don't have plan to add README of more languages. This current PR will be closed and team members will help on this.

Comment thread components/_util/hooks/useClosable.tsx Outdated
@dengfuping dengfuping requested a review from zombieJ April 28, 2025 02:29
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 29, 2025
@zombieJ zombieJ merged commit 53965b8 into ant-design:feature Apr 29, 2025
41 of 42 checks passed
This was referenced May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants