Skip to content
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

fix: Tour panel token & home support dark mode #44428

Merged
merged 5 commits into from Aug 25, 2023
Merged

fix: Tour panel token & home support dark mode #44428

merged 5 commits into from Aug 25, 2023

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Aug 25, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

Home page support dark mode and show the components on the right

截屏2023-08-25 17 17 30

📝 Changelog

Language Changelog
🇺🇸 English Fix Tour panel use wrong design token.
🇨🇳 Chinese 修复 Tour 面板使用的 design token 错误的问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at b6aa120

This pull request refactors and updates the documentation site of antd to support a dark theme feature. It adds a custom hook useDark and a context DarkContext to detect and provide the theme type, and modifies the homepage and layout components to use them. It also improves the code organization and readability of several files by grouping imports and using custom hooks for styles. Additionally, it changes the background color of the tour popup component and adds a new PreviewBanner component to showcase antd components.

🔍 Walkthrough

🤖 Generated by Copilot at b6aa120

  • Add a custom hook useDark and a context DarkContext to get and provide the root theme value (link)
  • Use the useDark hook to conditionally set the styles for the components list and the design framework cards (link, link)
  • Add a new component ComponentsBlock that renders a preview of various antd components (link)
  • Add a new component PreviewBanner that renders a banner with a title, a slogan, a modal panel, and a components block (link)
  • Replace the Banner component with PreviewBanner and remove the ConfigProvider wrapper in the index page (link)
  • Add a DarkContext.Provider wrapper that sets the value based on the theme in the global layout (link)
  • Reorder the import statements and remove unused or add missing imports in several files (link, link, link, link, link, link, link)
  • Replace the colorBgContainer token with colorBgElevated token for the tour popup styles (link, link, link)
  • Add an empty line at the beginning of the components/tour/style/index.ts file (link)

@stackblitz
Copy link

stackblitz bot commented Aug 25, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 388.19 KB (-1 B 🔽)
./dist/antd-with-locales.min.js 447.17 KB (-2 B 🔽)

@argos-ci
Copy link

argos-ci bot commented Aug 25, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Aug 25, 2023, 10:07 AM

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d7d493e) 100.00% compared to head (0609180) 100.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #44428   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          660       660           
  Lines        11218     11218           
  Branches      3041      3041           
=========================================
  Hits         11218     11218           
Files Changed Coverage Δ
components/tour/style/index.ts 100.00% <ø> (ø)

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

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.

None yet

4 participants