Skip to content

feat(Tour): support ConfigProvider#52250

Merged
zombieJ merged 2 commits intoant-design:nextfrom
thinkasany-forks:cp-tour
Mar 3, 2025
Merged

feat(Tour): support ConfigProvider#52250
zombieJ merged 2 commits intoant-design:nextfrom
thinkasany-forks:cp-tour

Conversation

@thinkasany
Copy link
Member

@thinkasany thinkasany commented Jan 6, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

🔗 Related Issues

wait for react-component/tour#70

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support Tour
🇨🇳 Chinese feat: ConfigProvider 支持 Tour 组件的配置

@bolt-new-by-stackblitz
Copy link

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2025

👁 Visual Regression Report for PR #52250 Passed ✅

🎯 Target branch: next (2055bcf)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Preview is ready

@petercat-assistant
Copy link

Walkthrough

This pull request introduces support for the Tour component in the ConfigProvider. It enhances the Tour component by adding customizable classNames and styles, allowing for more flexible styling options. Additionally, semantic DOM elements are introduced for better accessibility and styling.

Changes

Files Summary
.dumi/components/SemanticPreview.tsx Added component prop and logic to handle semantic class names.
components/config-provider/context.ts Extended TourConfig to include classNames and styles.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to reflect new Tour properties.
components/tour/TourContext.ts Created a new context for Tour component styles and classNames.
components/tour/__tests__/index.test.tsx Added tests for custom styles and classNames support.
components/tour/demo/_semantic.tsx Added a demo for semantic DOM elements.
components/tour/index.en-US.md, components/tour/index.zh-CN.md Added documentation for semantic DOM.
components/tour/index.tsx Integrated TourContext and merged styles/classNames logic.
components/tour/interface.ts Defined SemanticName type and extended TourProps.
components/tour/panelRender.tsx Applied context-based styles and classNames to panel elements.
components/tour/style/index.ts Updated styles to use semantic class names.

@thinkasany thinkasany mentioned this pull request Jan 6, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 6, 2025

@codecov
Copy link

codecov bot commented Jan 6, 2025

Bundle Report

Changes will increase total bundle size by 10.51kB (0.09%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 11.69MB 10.51kB (0.09%) ⬆️

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.js 5.25kB 6.15MB 0.09%
antd.js 5.25kB 5.54MB 0.09%

Files in antd-with-locales.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

  • ./components/tour/style/index.ts → Total Size: 7.29kB

Files in antd.js:

  • ./components/tour/style/index.ts → Total Size: 7.29kB

  • ./components/config-provider/context.ts → Total Size: 1.51kB

@codecov
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2055bcf) to head (8fec1bf).
Report is 13 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52250   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          766       766           
  Lines        13776     13781    +5     
  Branches      3615      3617    +2     
=========================================
+ Hits         13776     13781    +5     

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

@thinkasany thinkasany force-pushed the cp-tour branch 8 times, most recently from 5e90a15 to 1dd037c Compare January 26, 2025 13:23
@thinkasany thinkasany force-pushed the cp-tour branch 2 times, most recently from 7a5e647 to 1935264 Compare February 21, 2025 02:00
@zombieJ zombieJ self-assigned this Feb 24, 2025
@thinkasany thinkasany force-pushed the cp-tour branch 4 times, most recently from da3b88c to 74e0951 Compare February 27, 2025 14:21

import type { SemanticName } from './interface';

export interface TourContextProps {
Copy link
Member

Choose a reason for hiding this comment

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

这个好像没地方用到

Copy link
Member Author

Choose a reason for hiding this comment

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

已移除,确实用不上了,一开始是为了解决内部使用的调试面板。

@zombieJ zombieJ merged commit 7f11800 into ant-design:next Mar 3, 2025
37 checks passed
@Wxh16144 Wxh16144 changed the title feat: ConfigProvider support Tour feat(Tour): support ConfigProvider Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants