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

docs: revamp library website #166

Merged
merged 49 commits into from
Nov 21, 2024
Merged

docs: revamp library website #166

merged 49 commits into from
Nov 21, 2024

Conversation

YumoImer
Copy link
Collaborator

@YumoImer YumoImer commented Oct 23, 2024

Summary by CodeRabbit

版本更新说明

  • 新功能

    • 引入了多个新的 React 组件,如 ContainerCustomizationProviderCustomizationSenderIntroduction,以增强用户界面和交互体验。
    • 更新了加载指示器的图像源和 favicon,以改善视觉表现。
    • 增加了 CSS 变量支持,提升了主题定制能力。
  • 文档

    • 更新了多个文档,包括 README 和介绍文档,提供了更清晰的功能描述和使用示例。
    • 新增了关于意图设计、角色设计和对话设计的详细指南,以帮助开发者理解和实现更好的用户交互。
  • 修复

    • 修复了与组件样式和布局相关的问题,确保在不同设备上的一致性和可用性。

Copy link
Contributor

coderabbitai bot commented Oct 23, 2024

📝 Walkthrough

Walkthrough

此次更改涉及多个文件的修改和删除,主要集中在代码结构和文档内容的优化。重要的更新包括移除不再使用的状态和组件,简化状态管理,更新文档以更好地反映功能和设计原则,添加新的组件和钩子以增强应用程序的功能。此外,README文件和其他文档进行了内容扩展,以提供更清晰的指导和示例。

Changes

文件路径 更改摘要
.dumi/theme/layouts/GlobalLayout.tsx 移除bannerVisible状态,简化状态管理,更新useEffect钩子以排除与bannerVisible相关的逻辑。
.dumi/theme/common/Loading.tsx 更新加载指示器的图像源URL。
.dumirc.ts 更新favicon数组中的图像URL。
README-zh_CN.md 更新图像源URL,添加“功能”部分,扩展文档结构和内容。
README.md 更新图像源URL,重命名和扩展“使用”部分,添加新的子部分和示例。
docs/react/introduce.en-US.md 更新内容,强调@ant-design/x库的功能,更新图像源URL。
docs/react/introduce.zh-CN.md 更新内容,强调@ant-design/x库的功能,更新图像源URL。
.dumi/hooks/useScrollY.ts 添加自定义钩子useScrollY以跟踪垂直滚动位置和方向。
.dumi/pages/index/common/Container.tsx 添加新的Container组件,定义响应式样式。
.dumi/pages/index/common/CustomizationProvider.tsx 添加CustomizationProvider组件,定义样式和本地化字符串。
.dumi/pages/index/common/CustomizationSender.tsx 添加CustomizationSender组件,处理用户输入和样式。
.dumi/pages/index/common/Introduction.tsx 添加Introduction组件,显示可自定义的项目网格。
.dumi/pages/index/components/BannerRecommends.tsx 删除BannerRecommends组件。
.dumi/pages/index/components/CompIntroduction/Customization.tsx 添加多个自定义组件以增强用户界面。
.dumi/pages/index/components/SceneIntroduction/Assistant.tsx 添加AssistantScene组件,提供交互式聊天界面。
.dumi/pages/index/components/SceneIntroduction/Independent.tsx 添加IndependentScene组件,提供交互式聊天界面。
.dumi/pages/index/components/SceneIntroduction/Nest.tsx 添加NestScene组件,提供用户输入界面。
.dumi/pages/index/components/SceneIntroduction/index.tsx 添加SceneBanner组件,管理多个场景的显示。
.dumi/pages/index/components/SiteContext.ts 重构SiteContext,简化上下文定义。
.dumi/pages/index/components/util.ts 删除多个与站点数据管理相关的接口和函数。
.dumi/pages/index/index.tsx 更新主页组件,重构布局。
.dumi/pages/theme-editor/index.tsx 添加useStyle钩子,增强主题编辑器的样式。
.dumi/theme/SiteThemeProvider.tsx 更新NewToken接口,添加新属性。
.dumi/theme/builtins/ResourceArticles/index.tsx 删除Articles组件。
.dumi/theme/layouts/IndexLayout/index.tsx 修改IndexLayout组件,简化返回结构。
.dumi/theme/layouts/SidebarLayout/index.tsx 修改SidebarLayout的样式逻辑。
.dumi/theme/slots/Header/Actions.tsx 添加HeaderActions组件,管理头部操作按钮。
.dumi/theme/slots/Header/Logo.tsx 更新Logo组件的样式和属性。
.dumi/theme/slots/Header/Navigation.tsx 重构HeaderNavigation组件,简化导航逻辑。
.dumi/theme/slots/Header/SwitchBtn.tsx 修改LangBtn组件的样式逻辑。
.dumi/theme/slots/Header/index.tsx 重大重构,简化头部组件的状态管理和布局。
.dumi/theme/slots/Header/interface.ts 添加新属性以增强SharedProps接口。
.dumi/theme/slots/Sidebar/index.tsx 修改Sidebar组件的样式逻辑。
.dumi/theme/slots/SiteContext.ts 移除bannerVisible属性。
.dumi/theme/utils.ts 修改getLocalizedPathname函数以增强错误处理。
components/index.ts 更新导出结构,添加新的组件和类型。
package.json 添加新依赖lottie-web,修改predeploy脚本。
.dumi/hooks/useLottie.ts 添加自定义钩子useLottie以集成Lottie动画。
.dumi/theme/common/ThemeSwitch/index.tsx 修改ThemeSwitch组件的渲染逻辑。
.dumi/theme/slots/Content/index.tsx 修改Content组件以增强布局和调试能力。
components/conversations/style/index.ts 添加overflowY: 'auto'样式以支持滚动。
docs/playground/independent.en-US.md 添加新的markdown文件以描述独立聊天界面。
docs/playground/independent.zh-CN.md 添加新的markdown文件以描述独立聊天界面。
docs/spec/introduce.en-US.md 更新内容以介绍RICH设计范式。
docs/spec/introduce.zh-CN.md 更新内容以介绍RICH设计范式。
index-with-locales.js 删除文件,简化本地化处理。
tests/dekko/dist.test.js 删除注释的断言以简化测试。
webpack.config.js 删除addLocales函数以简化webpack配置。
docs/react/common-props.en-US.md 删除文件,移除通用属性文档。
docs/react/common-props.zh-CN.md 删除文件,移除通用属性文档。
docs/react/css-variables.en-US.md 删除文件,移除CSS变量文档。
docs/react/css-variables.zh-CN.md 删除文件,移除CSS变量文档。
docs/react/recommendation.en-US.md 删除文件,移除推荐组件和产品文档。
docs/react/recommendation.zh-CN.md 删除文件,移除推荐组件和产品文档。

Poem

在代码的世界里,兔子欢跳,
新组件、新文档,皆在这里找到。
状态简化,逻辑更清晰,
用户体验,真是美丽。
兔子欢呼,庆祝这变化,
让我们一起,迎接新未来! 🐇✨


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

github-actions bot commented Oct 23, 2024

Preview is ready

@YumoImer YumoImer changed the title docs: revamp library website [WIP] docs: revamp library website Oct 23, 2024
Copy link

cloudflare-workers-and-pages bot commented Oct 23, 2024

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1611f87
Status: ✅  Deploy successful!
Preview URL: https://710c06bf.ant-design-x.pages.dev
Branch Preview URL: https://docs-site-homepage.ant-design-x.pages.dev

View logs

@YumoImer YumoImer changed the title [WIP] docs: revamp library website docs: revamp library website Nov 14, 2024
@afc163
Copy link
Member

afc163 commented Nov 15, 2024

图片

背后这个图感觉比较大?加载过程中长时间是白的。

@@ -169,7 +168,7 @@ const MainBanner: React.FC = () => {
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice',
},
path: 'https://mdn.alipayobjects.com/huamei_k0vkmw/afts/file/A*Zd4ZQKnIfi4AAAAAAAAAAAAADsR-AQ',
path: 'https://mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*3QcuQpaOguQAAAAAAAAAAAAADgCCAQ',
Copy link
Member

Choose a reason for hiding this comment

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

底下垫一个 fallback 的 css 渐变 background 好一点。

Copy link

socket-security bot commented Nov 15, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@afc163
Copy link
Member

afc163 commented Nov 18, 2024

图片

颜色是不是有问题。

@YumoImer YumoImer merged commit 8d021b6 into main Nov 21, 2024
10 checks passed
@YumoImer YumoImer deleted the docs/site-homepage branch November 21, 2024 09:44
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.

3 participants