Skip to content

Conversation

@nooooooom
Copy link
Contributor

@nooooooom nooooooom commented Nov 25, 2025

  • 新增 EffectPlayer 组件
  • 新增 CreativeSparkLottieCreativeRecommendationEffect 两种加载中动画组件
  • 替换 LoadingLottie 的动画效果
  • 增强 Loading 组件,新增 type 类型来切换动画效果

Summary by CodeRabbit

  • New Features

    • Loading 组件扩展为三种风格(loading / spark / recommendation),支持 autoplay、loop、可自定义尺寸与样式。
    • 新增通用效果播放器与多个效果组件,可渲染更丰富的 2D/3D 动画并提供降级回退。
    • 新增若干 Lottie 驱动的可复用动画组件(spark、loading 等)。
  • Refactor

    • 导出与组件组合调整,简化外部使用路径并统一 effects 接口。
  • Accessibility / UX

    • 任务列表支持可选点击回调与键盘交互,提升可访问性。
  • Documentation

    • 文档与演示重构为类型/配置导向,新增多类型、播放控制与尺寸示例。

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

新增基于 @galacean/effects 的 EffectPlayer、多个 Effect 组件与场景 JSON、Lottie 组件与三个 Loading 包装实现,更新文档与示例,添加依赖并调整若干导出与 Workspace Task 的状态/交互类型定义。

Changes

Cohort / File(s) 变更摘要
文档与示例
docs/components/loading.md, docs/demos/loading.tsx, docs/demos/workspace-demo.tsx
重写 loading 文档为三种风格说明;示例改为 DemoCard 布局并新增类型/播放/尺寸演示;workspace demo 将一项状态改为 loading
包与导出调整
package.json, src/Components/Loading/index.tsx, src/Components/effects/index.ts, src/Components/lotties/index.ts, src/Components/Robot/index.tsx
新增 @galacean/effects 依赖;Loading 入口改为显式 re-export 三个实现;effects 与 lotties 新增 barrel 导出;Robot 移除对 lotties 的 export * 重导出。
Effect 播放器与效果组件
src/Components/effects/EffectPlayer.tsx, src/Components/effects/LoadingEffect/index.tsx, src/Components/effects/CreativeRecommendationEffect/index.tsx, src/Components/effects/.../*.json
新增 EffectPlayer(封装 @galacean/effects 的 Player、scene 加载、autoplay、size、降级图像)并导出类型;基于其新增 LoadingEffect 与 CreativeRecommendationEffect;新增复杂场景 JSON 资源(loading.jsoncreativeRecommendation.json)。
Lottie 组件与 Loading 包装
src/Components/lotties/CreativeSparkLottie/index.tsx, src/Components/Loading/CreativeSparkLoading.tsx, src/Components/Loading/CreativeRecommendationLoading.tsx, src/Components/Loading/Loading.tsx
新增 CreativeSparkLottie Lottie 组件并在 lotties 索引导出;新增三个 Loading 包装组件(Loading、CreativeSparkLoading、CreativeRecommendationLoading),统一接收 LoadingLottieProps 并默认 size 为 1em
工作区 Task 重构与样式
src/Workspace/Task/index.tsx, src/Workspace/Task/style.ts
引入并导出 TaskItem/TaskListProps,TaskList 支持 onItemClick(鼠标/键盘交互);将 loading 状态图示替换为 LoadingEffect;调整状态字体大小。

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor App
    participant LoadingEntry as Loading 入口组件
    participant Lottie as Lottie 组件
    participant EffectComp as Effect 组件 (CreativeRecommendationEffect)
    participant Player as EffectPlayer

    App->>LoadingEntry: render({ type, size, autoplay, loop })
    LoadingEntry->>LoadingEntry: 根据 type 分发
    alt type == "spark"
        LoadingEntry->>Lottie: render CreativeSparkLottie(size,autoplay,loop)
        Lottie-->>App: DOM 渲染动画
    else type == "recommendation"
        LoadingEntry->>EffectComp: render CreativeRecommendationEffect(size,autoplay,loop)
        EffectComp->>Player: mount Player(sceneUrl, autoplay)
        Player-->>App: 渲染场景或显示降级图像
    else
        LoadingEntry->>Lottie: render LoadingLottie(size,autoplay,loop)
        Lottie-->>App: DOM 渲染默认 Loading
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • 建议重点审查:
    • src/Components/effects/EffectPlayer.tsx:Player 初始化/销毁、sceneUrl 重载、autoplay 控制、size 变更和降级图像逻辑。
    • 场景 JSON(loading.jsoncreativeRecommendation.json)与 @galacean/effects 字段兼容性及资源路径引用。
    • src/Components/Loading 的 re-export 改动对外部导入点(包括 Robot 模块移除 re-export)可能的影响。
    • src/Workspace/Task 中的键盘/鼠标交互实现与类型变更(TaskItem/TaskListProps、onItemClick)是否有回归或可访问性问题。

Poem

🐰 新场景铺草地,光影在代码里舞,
Player 唤起小舞台,Lottie 与我同祝贺,
三个 Loading 齐列队,尺寸随心不停歇,
我咬一口胡萝卜,笑看动画跳跃。

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 标题清晰准确地总结了主要变更:优化 Loading 组件动画效果。标题与变更内容高度相关,涵盖了新增多种动画效果、替换现有动画、以及增强 Loading 组件功能等核心改动。
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 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 7fa21be and 0e1da67.

📒 Files selected for processing (1)
  • docs/components/loading.md (1 hunks)
⏰ 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). (2)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: Run tests and collect coverage
🔇 Additional comments (1)
docs/components/loading.md (1)

11-11: 第 11 行的表述已修复,表达清晰。

语法问题已得到改进,从之前的"基于 Framer Motion 实现展示流畅的加载动画效果"修改为当前的"基于 Lottie 动画实现流畔的加载效果",表述更加准确和流畅。

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nooooooom, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在全面优化 Loading 组件的动画效果,通过引入新的动画播放器和多种动画类型,极大地提升了组件的灵活性和视觉表现力。现在,开发者可以根据不同的应用场景,轻松选择和配置多样化的加载动画,从而为用户提供更具吸引力和反馈感的界面体验。

Highlights

  • 新增 EffectPlayer 组件: 引入了一个新的 EffectPlayer 组件,用于封装和播放基于 @galacean/effects 库的动画资源,为更丰富的动画效果提供了基础支持。
  • 新增加载动画组件: 新增了 CreativeSparkLottieCreativeRecommendationEffect 两种加载动画组件。其中 CreativeSparkLottie 基于 Lottie 动画,而 CreativeRecommendationEffect 则利用了新的 EffectPlayer
  • 增强 Loading 组件: 核心 Loading 组件得到了增强,现在支持通过新增的 type 属性(可选值为 'loading' | 'spark' | 'recommendation')来切换不同的动画效果,提供了更灵活的加载体验。
  • 更新文档和示例: 更新了 Loading 组件的文档 (loading.md),详细说明了新增的属性和动画类型。同时,loading.tsx 示例文件也进行了重构和扩展,展示了不同动画类型、播放控制和尺寸自定义的用法。
  • 引入新依赖: 在 package.json 中新增了 @galacean/effects 依赖,以支持基于该库的动画播放功能。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

此次 Pull Request 通过引入新的动画类型(sparkrecommendation)和重构底层实现,成功地增强了 Loading 组件的功能。为支持 @galacean/effects 而新增的 EffectPlayer 组件以及新的 Lottie 动画组件都实现得很好。文档和演示也相应地得到了更新,这一点值得称赞。

我发现了一些可以改进的地方:

  • EffectPlayer 中的 loop 功能尚未实现,这与接口定义不符,需要补充完成。
  • 部分新文件中包含了应移除的 BOM 字符。
  • 一个用于调整样式的“魔法值”可以添加注释以提高代码清晰度。
  • 文档中有一处重复内容需要修正。

总体而言,这是一次出色的贡献,极大地提升了组件的灵活性和视觉效果。

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (8)
docs/components/loading.md (2)

11-12: 实现已改为多种动画管线,文档对底层技术栈的表述建议再核对

当前介绍仍然写着“基于 Framer Motion 实现展示流畅的加载动画效果”,而代码层面已经通过 LoadingLottieCreativeSparkLottie 以及 CreativeRecommendationEffect(基于 EffectPlayer)来渲染动画。建议确认一下 Loading 现有实现的真实依赖栈,如果已经从 Framer Motion 迁移到 Lottie / Effect 方案,文档这里可以改成更中性的“加载动画组件”或更新为新的技术栈描述,避免给使用者造成误解。

Also applies to: 40-45


40-45: 特性与使用说明存在“灵活尺寸”描述重复,中文语感也可微调

  • “特性”里有两条「📏 灵活尺寸」,其中第 42 行和第 44 行意义高度重叠,建议保留一条即可,把“通过 size/style.fontSize 控制整体大小”的新版描述合并进去,删除旧的仅提 fontSize 的那条,避免读者困惑。
  • 语句「一个优雅的加载动画组件,基于 Framer Motion 实现展示流畅的加载动画效果。」从中文语感上更自然的写法可以考虑改为「一个优雅地展示加载动画的组件,基于 … 实现流畅地加载动画效果。」(LanguageTool 的提示也有类似建议),可按团队文案风格酌情调整。

这些都不影响功能,仅作为文案层的小优化建议。

Also applies to: 48-52

src/Components/effects/LoadingEffect/index.tsx (1)

5-59: LoadingEffect 的 props 类型与实际透传行为不完全一致,建议同步收紧或透传

目前声明为:

export const LoadingEffect: React.FC<Omit<EffectPlayerProps, 'sceneUrl'>> = ({
  autoplay = true,
  loop = true,
  className,
  style,
  size,
}) => {
  return (
    <EffectPlayer
      sceneUrl={loadingEffect}
      size={size}
      style={style}
      autoplay={autoplay}
      loop={loop}
      className={className}
    />
  );
};

有两个小问题:

  1. 类型允许但实现中忽略的属性

    • EffectPlayerProps 除了 sceneUrl 外还包含 downgradeImage 和所有 HTMLAttributes<HTMLDivElement>(如 onClickaria-* 等)。
    • 但组件只解构了 autoplay/loop/className/style/size,其余 props 在运行时全部丢失。类型上看“支持”,实际却不生效,可能会让使用者误解。
  2. 若有意固定降级图,也建议在类型层面体现

    • 如果 LoadingEffect 不打算开放 downgradeImage 配置,建议在类型中一并排除,并同时透传其他 HTML 属性。

可以参考如下改法,使类型和行为对齐,并保留通用属性透传(供无障碍等场景使用):

-export const LoadingEffect: React.FC<Omit<EffectPlayerProps, 'sceneUrl'>> = ({
-  autoplay = true,
-  loop = true,
-  className,
-  style,
-  size,
-}) => {
-  return (
-    <EffectPlayer
-      sceneUrl={loadingEffect}
-      size={size}
-      style={style}
-      autoplay={autoplay}
-      loop={loop}
-      className={className}
-    />
-  );
-};
+export const LoadingEffect: React.FC<
+  Omit<EffectPlayerProps, 'sceneUrl' | 'downgradeImage'>
+> = ({ autoplay = true, loop = true, className, style, size, ...rest }) => {
+  return (
+    <EffectPlayer
+      sceneUrl={loadingEffect}
+      size={size}
+      style={style}
+      autoplay={autoplay}
+      loop={loop}
+      className={className}
+      {...rest}
+    />
+  );
+};

另外,注释中「使用 Lottie 动画展示加载动画的组件」的表述可以根据 EffectPlayer 实际依赖的引擎适当改成更通用的“特效动画”/“效果动画”,以免和 Lottie 组件混淆。

docs/demos/loading.tsx (1)

4-121: Demo 结构完善,建议同步更新「技术栈」描述以贴合新实现

  • 新增的 DemoCard 组件把各类 Loading 用法包装成卡片,结构清晰,配合 typeautoplayloopsize 的组合,基本把新 API 能力都演示到了,这块设计不错。
  • 不过当前文件底部仍然写着使用 Framer Motion 的 motion.svg / motion.ellipse 来实现动画,而新的实现已经切换到 LoadingLottie / CreativeSparkLottie / CreativeRecommendationEffect 这套体系上。建议和组件实际实现再对一遍,看是否需要将这里的“技术栈”文案更新为更符合现状的说明(比如强调 Lottie / EffectPlayer),避免阅读文档时产生错觉。
src/Components/Loading/index.tsx (1)

6-8: 基于 type 的多动画分支实现合理,建议同步更新组件注释

实现层面看:

  • LoadingProps 在原有 LoadingLottieProps 上增加了 type?: 'loading' | 'spark' | 'recommendation',并且在实现中通过 if/else 分支选择对应的动画组件,type 未指定时回退到 LoadingLottie,和文档中默认值 'loading' 保持一致。
  • lottieProps 默认 size: '1em',并允许用户通过 props.sizestyle.fontSize 调整,和文档对「灵活尺寸」的说明相符。
  • spark 分支通过 transform: 'scale(1.2)' 做了一点视觉强化,也保持了对原有 style 的合并。

唯一不太匹配的是头部 JSDoc 仍然在描述“两个旋转的椭圆形”等旧版实现细节。建议把注释改成更抽象的、与当前多动画实现一致的描述,例如强调:

  • 提供三种不同风格的加载动画(loading/spark/recommendation);
  • 默认类型及典型使用场景。

这样文档、注释和实现三者会更加一致。

Also applies to: 33-50

src/Components/effects/CreativeRecommendationEffect/index.tsx (1)

5-57: CreativeRecommendationEffect 同样存在 props 类型与实现不一致的问题

当前实现:

export const CreativeRecommendationEffect: React.FC<
  Omit<EffectPlayerProps, 'sceneUrl'>
> = ({ autoplay = true, loop = true, className, style, size }) => {
  return (
    <EffectPlayer
      sceneUrl={creativeRecommendation}
      downgradeImage="..."
      size={size}
      style={style}
      autoplay={autoplay}
      loop={loop}
      className={className}
    />
  );
};

问题与 LoadingEffect 类似:

  1. 类型允许传入但实现忽略的属性

    • Omit<EffectPlayerProps, 'sceneUrl'> 依然包含 downgradeImage 和所有 HTMLAttributes<HTMLDivElement>
    • 组件只解构并使用了 autoplay/loop/className/style/size,其余全部被丢弃,调用者若传入 downgradeImageonClick 等属性,行为上是无效的。
  2. 更符合意图的类型与实现建议

    • 如果这里是刻意固定 downgradeImage(看起来是统一的兜底图),建议在类型上也排除它,同时仍然透传其他 HTML 属性,避免“看起来可以传其实无效”的情况:
-export const CreativeRecommendationEffect: React.FC<
-  Omit<EffectPlayerProps, 'sceneUrl'>
-> = ({ autoplay = true, loop = true, className, style, size }) => {
-  return (
-    <EffectPlayer
-      sceneUrl={creativeRecommendation}
-      downgradeImage="..."
-      size={size}
-      style={style}
-      autoplay={autoplay}
-      loop={loop}
-      className={className}
-    />
-  );
-};
+export const CreativeRecommendationEffect: React.FC<
+  Omit<EffectPlayerProps, 'sceneUrl' | 'downgradeImage'>
+> = ({ autoplay = true, loop = true, className, style, size, ...rest }) => {
+  return (
+    <EffectPlayer
+      sceneUrl={creativeRecommendation}
+      downgradeImage="..."
+      size={size}
+      style={style}
+      autoplay={autoplay}
+      loop={loop}
+      className={className}
+      {...rest}
+    />
+  );
+};
  1. 注释中的“使用 Lottie 动画”表述
    • LoadingEffect 一样,建议根据 EffectPlayer 的实际实现适当调整 wording(例如“创意推荐特效动画组件”),避免和纯 Lottie 组件的概念混淆。

整体逻辑是 OK 的,上述调整主要是为了让类型、实现和文档保持一致。

src/Components/effects/EffectPlayer.tsx (2)

38-56: TODO: 实现 loop 功能

loop 属性已在接口中定义并有文档说明,但当前实现中被注释掉未使用。请确认是否需要在后续版本中实现此功能。

是否需要我帮助生成实现 loop 功能的代码,或者创建一个 issue 来跟踪此任务?


119-136: 可选:改进降级图片的可访问性

当前降级图片的 alt 属性值为 "fallback",比较通用。可以考虑使用更具描述性的文案,或者通过 props 传入自定义的 alt 文本。

此外,如果降级图片传达了重要信息,可以考虑添加 role="img"aria-label 来提升可访问性。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a09f1f and 46bffc4.

📒 Files selected for processing (13)
  • docs/components/loading.md (2 hunks)
  • docs/demos/loading.tsx (1 hunks)
  • package.json (1 hunks)
  • src/Components/Loading/index.tsx (2 hunks)
  • src/Components/Robot/index.tsx (0 hunks)
  • src/Components/effects/CreativeRecommendationEffect/creativeRecommendation.json (1 hunks)
  • src/Components/effects/CreativeRecommendationEffect/index.tsx (1 hunks)
  • src/Components/effects/EffectPlayer.tsx (1 hunks)
  • src/Components/effects/LoadingEffect/index.tsx (1 hunks)
  • src/Components/effects/LoadingEffect/loading.json (1 hunks)
  • src/Components/effects/index.ts (1 hunks)
  • src/Components/lotties/CreativeSparkLottie/index.tsx (1 hunks)
  • src/Components/lotties/index.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • src/Components/Robot/index.tsx
🧰 Additional context used
🧬 Code graph analysis (4)
src/Components/effects/CreativeRecommendationEffect/index.tsx (1)
src/Components/effects/EffectPlayer.tsx (1)
  • EffectPlayerProps (12-36)
src/Components/effects/LoadingEffect/index.tsx (1)
src/Components/effects/EffectPlayer.tsx (1)
  • EffectPlayerProps (12-36)
src/Components/Loading/index.tsx (3)
src/Components/lotties/LoadingLottie/index.tsx (2)
  • LoadingLottieProps (5-29)
  • LoadingLottie (68-95)
src/Components/lotties/CreativeSparkLottie/index.tsx (1)
  • CreativeSparkLottie (68-95)
src/Components/effects/CreativeRecommendationEffect/index.tsx (1)
  • CreativeRecommendationEffect (42-58)
docs/demos/loading.tsx (1)
src/Components/Loading/index.tsx (1)
  • Loading (33-51)
🪛 LanguageTool
docs/components/loading.md

[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:优雅"地"加
Context: ...e: 通用 order: 5 --- # Loading 加载 一个优雅的加载动画组件,基于 Framer Motion 实现展示流畅的加载动画效果。 ...

(wb4)


[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:流畅"地"加
Context: ... 加载 一个优雅的加载动画组件,基于 Framer Motion 实现展示流畅的加载动画效果。 ## 代码演示 <code src="../demos/lo...

(wb4)

⏰ 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). (1)
  • GitHub Check: Socket Security: Pull Request Alerts
🔇 Additional comments (11)
package.json (1)

54-54: 新增 @galacean/effects 依赖建议确认版本与体积影响

引入 @galacean/effects 作为运行时依赖是合理的(EffectPlayer 系列组件需要),但建议再确认下:目前选的 ^2.7.3 是否是团队期望的基线版本,以及在典型业务打包体积下是否可接受,避免对下游应用造成意外的 bundle 放大或运行环境兼容性问题。

src/Components/lotties/index.ts (1)

1-5: 统一导出 Lottie 组件的入口设计合理

通过 barrel 文件集中导出 CreativeSparkLottieDazingLottieLoadingLottieThinkingLottieTextLoading,有利于对外提供稳定、清晰的 API,使用上也更简洁,没有看到明显的问题。

src/Components/effects/index.ts (1)

1-3: Effect 组件集中导出方式清晰可用

CreativeRecommendationEffectEffectPlayerLoadingEffect 通过具名导出统一暴露,使上层组件可以从单一入口引入效果相关能力,结构清晰,没有发现问题。

src/Components/lotties/CreativeSparkLottie/index.tsx (3)

5-29: LGTM!

接口定义清晰,文档完善,Props 设计合理。


68-95: LGTM!

组件实现正确,样式合并顺序正确(用户样式覆盖默认样式),aria-hidden="true" 适用于装饰性动画。


1-3: 导入语句验证通过

creativeSpark.json 文件存在于正确的路径中。所有导入语句都有效且必要,无需修改。

src/Components/effects/EffectPlayer.tsx (3)

12-36: LGTM!

接口定义良好,正确排除了 ref 属性。注意到 loop 属性已定义但实现中有 TODO 标记(第 42-43 行)。


71-91: LGTM!

正确使用 useLayoutEffect 进行 Player 初始化,空依赖数组确保只在挂载时创建一次。通过 useLatest 保持 downgradeImage 引用新鲜,避免了闭包陈旧问题。清理函数正确释放资源。


94-111: 审查依赖数组的正确性

第 94-101 行的 useEffectsceneUrl 改变时重新加载场景并使用当前的 autoplay 值。如果 autoplay 改变而 sceneUrl 保持不变,场景不会重新加载。这可能是有意的设计,但请确认是否符合预期行为。

第 103-111 行的独立 autoplay effect 处理播放/暂停切换,设计合理。

src/Components/effects/LoadingEffect/loading.json (1)

1-922: LGTM!

加载效果配置结构合理,使用 8 个旋转段(0°-315°)和渐进延迟(0-0.87s)创建旋转动画效果。无外部依赖,完全基于形状渲染,有利于离线使用。

src/Components/effects/CreativeRecommendationEffect/creativeRecommendation.json (1)

6-13: 外部图片资源已验证可用

两个 CDN 图片 URL 均已成功验证:

  • 原始格式图片:HTTP 200 ✓
  • WebP 格式图片:HTTP 200 ✓

资源当前可正常访问,JSON 配置无问题。

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
src/Components/effects/EffectPlayer.tsx (2)

1-10: 依赖版本问题已在之前的评审中标记

之前的评审已经指出 @galacean/effects 版本 ^2.7.3 不存在,最新稳定版本是 2.6.5。请参考之前的评审意见更新依赖版本。


27-31: loop 属性未实现问题已在之前的评审中标记

之前的评审已经指出 loop 属性在接口中定义但未实现(实现部分被注释掉)。请参考之前的评审意见,要么实现该功能,要么暂时从接口中移除该属性。

🧹 Nitpick comments (3)
docs/components/loading.md (1)

40-43: 优化特性描述以减少与使用说明的重复。

第42行关于"灵活尺寸"的特性说明与第47-49行的使用说明存在内容重复。这与之前的代码评审意见一致——建议在特性部分保留高层特性描述,具体使用细节交由使用说明部分详细说明,以保持文档的简洁性和层次清晰。

建议修改第40-43行,将"灵活尺寸"特性的具体配置细节移至使用说明,或在特性部分仅保留概括性描述:

- 📏 **灵活尺寸**: 支持通过 `size` 属性或 `style` 中的 `fontSize` 控制整体大小
+ 📏 **灵活尺寸**: 支持多种方式调整动画尺寸
src/Components/effects/EffectPlayer.tsx (2)

71-91: 建议添加 ESLint 忽略注释或重新审视依赖数组

这个 useLayoutEffect 使用空依赖数组是有意为之,目的是只在组件挂载时创建一次 Player 实例。后续的 sceneUrlautoplay 变化由其他 effect 处理。

但是,React 的 exhaustive-deps ESLint 规则会标记缺少 onErrorsceneUrlautoplay 依赖。虽然当前实现逻辑正确,但建议添加 ESLint 忽略注释以明确这是有意的设计决策:

  // ==================== Create Player ====================
+ // eslint-disable-next-line react-hooks/exhaustive-deps
  useLayoutEffect(() => {

或者在注释中说明为什么使用空依赖数组。


94-101: 建议处理 exhaustive-deps 警告

这个 effect 在加载场景时使用了 autoplay(第 98 行),但 autoplay 不在依赖数组中。当前设计是有意为之:只在 sceneUrl 变化时重新加载场景,autoplay 的变化由单独的 effect(103-111 行)通过暂停/恢复来处理,避免不必要的场景重新加载。

exhaustive-deps 规则会标记这个问题。建议添加 ESLint 注释说明:

  useEffect(() => {
    if (playerRef.current) {
      setFallbackImage(undefined);
      playerRef.current.loadScene(sceneUrl, {
        autoplay,
      });
    }
+   // autoplay 的变化由单独的 effect 处理,避免不必要的场景重新加载
+   // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [sceneUrl]);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46bffc4 and cd5820f.

📒 Files selected for processing (2)
  • docs/components/loading.md (2 hunks)
  • src/Components/effects/EffectPlayer.tsx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/components/loading.md

[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:优雅"地"加
Context: ...e: 通用 order: 5 --- # Loading 加载 一个优雅的加载动画组件,基于 Framer Motion 实现展示流畅的加载动画效果。 ...

(wb4)


[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:流畅"地"加
Context: ... 加载 一个优雅的加载动画组件,基于 Framer Motion 实现展示流畅的加载动画效果。 ## 代码演示 <code src="../demos/lo...

(wb4)

🔇 Additional comments (1)
docs/components/loading.md (1)

21-50: API文档和新功能说明整体结构良好。

新增的 type 参数、动画类型分类、特性和使用说明都清晰准确地反映了Loading组件的增强功能。文档结构层次分明,易于用户理解和使用。

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
src/Workspace/Task/style.ts (1)

24-24: 可选:考虑提取为命名常量

根据编码规范,建议将硬编码的数值提取为命名常量以提高可读性。不过,由于这是单次使用的样式值,提取可能是可选的。

可以这样重构:

+const STATUS_FONT_SIZE = 16;
+
 const genStyle: GenerateStyle<ChatTokenType> = (token) => {
   return {
     [`${token.componentCls}`]: {
       // ...
       '&-status': {
         display: 'flex',
         alignItems: 'center',
         justifyContent: 'center',
         flexShrink: 0,
         marginTop: '2px',
-        fontSize: 16,
+        fontSize: STATUS_FONT_SIZE,
       },
src/Components/effects/EffectPlayer.tsx (1)

119-134: 建议使用 Tailwind 类进行样式设置

根据编码规范,应优先使用 Tailwind 类而非内联样式。虽然动态 size 属性需要内联样式,但其他静态样式可以改用 Tailwind 类。

可以这样重构:

  return (
-    <div {...attrs} ref={containerRef} style={containerStyle}>
+    <div 
+      {...attrs} 
+      ref={containerRef} 
+      className="relative flex justify-center items-center"
+      style={{ width: size, height: size, ...style }}
+    >
      {fallbackImage && (
        <img
          src={fallbackImage}
          alt="fallback"
-          style={{
-            position: 'absolute',
-            top: 0,
-            left: 0,
-            width: '100%',
-            height: '100%',
-          }}
+          className="absolute top-0 left-0 w-full h-full"
        />
      )}
    </div>
  );

根据编码规范。

src/Workspace/Task/index.tsx (2)

40-48: 可选:考虑使用 Tailwind 类

根据编码规范,建议使用 Tailwind 类替代内联样式。虽然 CSS 变量用于主题化是合适的,但 transform: scale(1.1) 可以使用 Tailwind 的 scale-110 类。

可以这样重构:

  case 'loading':
    return (
      <LoadingEffect
+        className="scale-110"
        style={{
          color: 'var(--color-gray-text-disabled)',
-          transform: 'scale(1.1)',
        }}
      />
    );

根据编码规范。


89-89: 可选:使用 Tailwind 类设置 cursor

根据编码规范,建议使用 Tailwind 类替代内联样式。

可以这样重构:

  <div
    key={item.key}
-    className={classNames(
+    className={classNames(
      `${prefixCls}-item`,
      `${prefixCls}-item-${item.status}`,
      hashId,
+      onItemClick && 'cursor-pointer',
    )}
    role={onItemClick ? 'button' : undefined}
    tabIndex={onItemClick ? 0 : undefined}
    onClick={onItemClick ? () => handleItemClick(item) : undefined}
    onKeyDown={...}
-    style={{ cursor: onItemClick ? 'pointer' : undefined }}
  >

根据编码规范。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd5820f and d075e9c.

📒 Files selected for processing (4)
  • docs/demos/workspace-demo.tsx (1 hunks)
  • src/Components/effects/EffectPlayer.tsx (1 hunks)
  • src/Workspace/Task/index.tsx (4 hunks)
  • src/Workspace/Task/style.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,tsx,jsx,py,java,cpp,c,cs,go,rb,php,scala,kotlin,swift}

📄 CodeRabbit inference engine (.cursor/rules/clean-code.mdc)

**/*.{js,ts,tsx,jsx,py,java,cpp,c,cs,go,rb,php,scala,kotlin,swift}: Replace hard-coded values with named constants. Use descriptive constant names that explain the value's purpose. Keep constants at the top of the file or in a dedicated constants file.
Variables, functions, and classes should reveal their purpose. Names should explain why something exists and how it's used. Avoid abbreviations unless they're universally understood.
Don't comment on what the code does - make the code self-documenting. Use comments to explain why something is done a certain way. Document APIs, complex algorithms, and non-obvious side effects.
Each function should do exactly one thing. Functions should be small and focused. If a function needs a comment to explain what it does, it should be split.
Extract repeated code into reusable functions. Share common logic through proper abstraction. Maintain single sources of truth.
Hide implementation details. Expose clear interfaces. Move nested conditionals into well-named functions.
If you need more than 3 levels of indentation, you should fix your program. Functions must be short and small, doing only one thing and doing it well.

Files:

  • docs/demos/workspace-demo.tsx
  • src/Components/effects/EffectPlayer.tsx
  • src/Workspace/Task/style.ts
  • src/Workspace/Task/index.tsx
**/*.{tsx,jsx,ts,js}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{tsx,jsx,ts,js}: Use early returns whenever possible to make code more readable in React/JavaScript/TypeScript components
Use descriptive variable and function/const names; event handlers should use 'handle' prefix (e.g., handleClick for onClick, handleKeyDown for onKeyDown)

Files:

  • docs/demos/workspace-demo.tsx
  • src/Components/effects/EffectPlayer.tsx
  • src/Workspace/Task/style.ts
  • src/Workspace/Task/index.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{tsx,jsx}: Always use Tailwind classes for styling HTML elements; avoid using CSS or tags in React components
Use 'class:' syntax instead of ternary operators in class tags whenever possible in React components
Implement accessibility features on elements including tabindex='0', aria-label, on:click, and on:keydown attributes where appropriate

Files:

  • docs/demos/workspace-demo.tsx
  • src/Components/effects/EffectPlayer.tsx
  • src/Workspace/Task/index.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

Use const arrow functions instead of function declarations (e.g., 'const toggle = () =>') and define types where possible in React/TypeScript

Files:

  • docs/demos/workspace-demo.tsx
  • src/Components/effects/EffectPlayer.tsx
  • src/Workspace/Task/style.ts
  • src/Workspace/Task/index.tsx
🧠 Learnings (1)
📚 Learning: 2025-11-26T06:59:43.211Z
Learnt from: CR
Repo: ant-design/agentic-ui PR: 0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-11-26T06:59:43.211Z
Learning: Applies to **/*.{tsx,jsx} : Implement accessibility features on elements including tabindex='0', aria-label, on:click, and on:keydown attributes where appropriate

Applied to files:

  • src/Workspace/Task/index.tsx
🧬 Code graph analysis (1)
src/Workspace/Task/index.tsx (3)
src/Components/effects/LoadingEffect/index.tsx (1)
  • LoadingEffect (42-59)
src/TaskList/index.tsx (1)
  • TaskList (199-254)
src/Workspace/Task/style.ts (1)
  • useTaskStyle (58-67)
🔇 Additional comments (6)
src/Components/effects/EffectPlayer.tsx (2)

71-91: Player 创建和销毁逻辑正确

使用空依赖数组的 useLayoutEffect 确保 Player 只在挂载时创建一次,并在卸载时正确销毁。后续的状态变化通过其他 useEffect 处理,这是合理的设计模式。


94-111: I apologize, but I'm encountering a technical issue accessing the repository to perform the verification. However, I can analyze the review comment based on the code snippet provided.

The review comment raises a legitimate concern about effect ordering. Let me provide a rewritten review based on the visible code pattern:


Potential redundant operations when both sceneUrl and autoplay change simultaneously.

The two effects may cause double operations: when sceneUrl changes, loadScene() is called with the current autoplay value (line 98); if autoplay also changed in the same render cycle, the second effect (lines 103-111) will separately call resume() or pause(). This could result in:

  • loadScene(sceneUrl, { autoplay: true }) followed by resume() (redundant)
  • Or potential state inconsistency if timing matters

Consider consolidating this logic: either pass autoplay only to loadScene() and rely on that, or verify that both effects running together produces the intended behavior.


However, to properly verify this concern, I would need access to:

  1. The playerRef API implementation (what does loadScene with { autoplay } do?)
  2. Usage patterns of this component (do both props change together frequently?)
  3. Whether the separate effects are intentional for decoupled concerns
src/Workspace/Task/index.tsx (3)

8-26: 类型定义清晰且结构良好

新增的 TaskStatusTaskItemTaskListProps 接口定义清晰,遵循 TypeScript 最佳实践。公开导出这些类型有助于外部使用。


57-64: 事件处理器实现规范

handleItemClick 遵循编码规范:

  • 使用 handle 前缀命名
  • 使用箭头函数
  • 简洁且职责单一

76-89: 优秀的无障碍访问实现

无障碍功能实现非常完善:

  • ✅ 正确设置 role="button" 语义
  • ✅ 使用 tabIndex={0} 支持键盘导航
  • ✅ 实现 Enter 和 Space 键交互
  • ✅ Space 键时调用 preventDefault() 防止页面滚动
  • ✅ 提供视觉反馈(cursor: pointer)
  • ✅ 所有属性按需条件渲染

这遵循了无障碍最佳实践并符合编码规范中的可访问性要求。

基于学习经验和编码规范。

docs/demos/workspace-demo.tsx (1)

205-205: 演示数据更新合理

将任务状态更改为 'loading' 以展示新的 LoadingEffect 动画效果,与 PR 目标一致。

@socket-security
Copy link

socket-security bot commented Nov 27, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​galacean/​effects@​2.7.48210080100100

View full report

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
src/Components/Loading/Loading.tsx (1)

4-28: 同步组件注释与实际 Lottie 实现并提取默认尺寸常量

当前 JSDoc 仍然描述为“两个旋转的椭圆形”,但实现已经换成 Lottie 动画,具体形态可能变化,建议改成更贴近实现的中性描述(例如“标准加载动画,基于 Lottie 实现”),以免后续换动画资源时文档再度失真。同时,'1em' 这个默认尺寸在 Loading / CreativeSparkLoading / CreativeRecommendationLoading 中都被硬编码使用,建议提取为一个统一的常量(例如 DEFAULT_LOADING_SIZE = '1em')并从三个组件复用,方便后续统一调整。

src/Components/Loading/CreativeSparkLoading.tsx (1)

27-34: 简化 props 写法并与其它 Loading 组件共享默认尺寸常量

这里的 ({ ...props }: LoadingLottieProps) 其实只是把参数对象浅拷贝了一次,写成 (props: LoadingLottieProps) 会更直观一些。另一个小建议是与 Loading / CreativeRecommendationLoading 统一使用同一个默认尺寸常量(例如 DEFAULT_LOADING_SIZE),避免在多个文件里重复硬编码 '1em',后续要改默认尺寸时只需要改一处即可。

src/Components/Loading/CreativeRecommendationLoading.tsx (1)

28-36: 对外统一为 Loading API 很合理,建议抽取共享默认尺寸常量

CreativeRecommendationLoading 暴露 LoadingLottieProps,内部再适配到 CreativeRecommendationEffect 的 props,这个设计很好地保证了三个 Loading 组件的 API 一致性。与前两个组件类似,这里也直接写死了 size: '1em',建议后续把默认尺寸提取为共享常量统一引用,减少魔法值分散在多个文件里的情况。

docs/demos/loading.tsx (1)

8-47: 抽取重复样式与尺寸为常量,避免散落的 magic number

Demo 里多处内联样式和尺寸值(如 width: 120gap: 24fontSize: 64demoSizes = [32, 48, 64, 80] 等)在不同块中重复出现,后续如果要统一调整展示密度/尺寸会比较费劲。建议:

  • 将常用布局样式(居中 flex、标题文本样式等)封装成常量或小的样式函数;
  • 将示例尺寸数组提到组件外,并命名为如 DEMO_SIZES 之类的常量;
  • 如果项目整体约定使用 Tailwind className 而尽量少用内联 style,可以考虑后续逐步把这些 style 替换为 Tailwind 类名(本 PR 可按需取舍)。

Also applies to: 55-63, 85-103, 105-125

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5d2041 and 7fa21be.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • docs/components/loading.md (1 hunks)
  • docs/demos/loading.tsx (1 hunks)
  • src/Components/Loading/CreativeRecommendationLoading.tsx (1 hunks)
  • src/Components/Loading/CreativeSparkLoading.tsx (1 hunks)
  • src/Components/Loading/Loading.tsx (1 hunks)
  • src/Components/Loading/index.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,tsx,jsx,py,java,cpp,c,cs,go,rb,php,scala,kotlin,swift}

📄 CodeRabbit inference engine (.cursor/rules/clean-code.mdc)

**/*.{js,ts,tsx,jsx,py,java,cpp,c,cs,go,rb,php,scala,kotlin,swift}: Replace hard-coded values with named constants. Use descriptive constant names that explain the value's purpose. Keep constants at the top of the file or in a dedicated constants file.
Variables, functions, and classes should reveal their purpose. Names should explain why something exists and how it's used. Avoid abbreviations unless they're universally understood.
Don't comment on what the code does - make the code self-documenting. Use comments to explain why something is done a certain way. Document APIs, complex algorithms, and non-obvious side effects.
Each function should do exactly one thing. Functions should be small and focused. If a function needs a comment to explain what it does, it should be split.
Extract repeated code into reusable functions. Share common logic through proper abstraction. Maintain single sources of truth.
Hide implementation details. Expose clear interfaces. Move nested conditionals into well-named functions.
If you need more than 3 levels of indentation, you should fix your program. Functions must be short and small, doing only one thing and doing it well.

Files:

  • src/Components/Loading/Loading.tsx
  • src/Components/Loading/CreativeRecommendationLoading.tsx
  • src/Components/Loading/CreativeSparkLoading.tsx
  • docs/demos/loading.tsx
  • src/Components/Loading/index.tsx
**/*.{tsx,jsx,ts,js}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{tsx,jsx,ts,js}: Use early returns whenever possible to make code more readable in React/JavaScript/TypeScript components
Use descriptive variable and function/const names; event handlers should use 'handle' prefix (e.g., handleClick for onClick, handleKeyDown for onKeyDown)

Files:

  • src/Components/Loading/Loading.tsx
  • src/Components/Loading/CreativeRecommendationLoading.tsx
  • src/Components/Loading/CreativeSparkLoading.tsx
  • docs/demos/loading.tsx
  • src/Components/Loading/index.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{tsx,jsx}: Always use Tailwind classes for styling HTML elements; avoid using CSS or tags in React components
Use 'class:' syntax instead of ternary operators in class tags whenever possible in React components
Implement accessibility features on elements including tabindex='0', aria-label, on:click, and on:keydown attributes where appropriate

Files:

  • src/Components/Loading/Loading.tsx
  • src/Components/Loading/CreativeRecommendationLoading.tsx
  • src/Components/Loading/CreativeSparkLoading.tsx
  • docs/demos/loading.tsx
  • src/Components/Loading/index.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

Use const arrow functions instead of function declarations (e.g., 'const toggle = () =>') and define types where possible in React/TypeScript

Files:

  • src/Components/Loading/Loading.tsx
  • src/Components/Loading/CreativeRecommendationLoading.tsx
  • src/Components/Loading/CreativeSparkLoading.tsx
  • docs/demos/loading.tsx
  • src/Components/Loading/index.tsx
🧬 Code graph analysis (4)
src/Components/Loading/Loading.tsx (2)
src/Components/Loading/index.tsx (1)
  • Loading (3-3)
src/Components/lotties/LoadingLottie/index.tsx (2)
  • LoadingLottieProps (5-29)
  • LoadingLottie (68-95)
src/Components/Loading/CreativeRecommendationLoading.tsx (2)
src/Components/lotties/LoadingLottie/index.tsx (1)
  • LoadingLottieProps (5-29)
src/Components/effects/CreativeRecommendationEffect/index.tsx (1)
  • CreativeRecommendationEffect (42-58)
src/Components/Loading/CreativeSparkLoading.tsx (3)
src/Components/Loading/index.tsx (1)
  • CreativeSparkLoading (2-2)
src/Components/lotties/LoadingLottie/index.tsx (1)
  • LoadingLottieProps (5-29)
src/Components/lotties/CreativeSparkLottie/index.tsx (1)
  • CreativeSparkLottie (68-95)
docs/demos/loading.tsx (3)
src/Components/Loading/Loading.tsx (1)
  • Loading (27-29)
src/Components/Loading/CreativeSparkLoading.tsx (1)
  • CreativeSparkLoading (27-34)
src/Components/Loading/CreativeRecommendationLoading.tsx (1)
  • CreativeRecommendationLoading (28-37)
⏰ 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). (1)
  • GitHub Check: Run tests and collect coverage
🔇 Additional comments (2)
src/Components/Loading/index.tsx (1)

1-3: Loading 相关组件的集中导出方式清晰易用

CreativeRecommendationLoadingCreativeSparkLoadingLoading 统一从同一入口导出,使外部引用路径更简洁,也方便后续扩展新的 Loading 变体,设计合理。

docs/demos/loading.tsx (1)

127-137: I encountered a repository access issue that prevents me from directly verifying the codebase. However, based on the information provided:

Review documentation mentions outdated tech stack details

The provided code snippet confirms the "技术栈" section (lines 127-137) currently documents "Framer Motion" and "CSS-in-JS" for the Loading component. The review comment indicates the implementation has been switched to use Lottie/EffectPlayer instead, making this documentation inconsistent with the actual implementation.

Without direct access to verify the current Loading component implementation and confirm it uses Lottie/EffectPlayer rather than Framer Motion, I cannot definitively confirm or refute whether this documentation is outdated. Manual verification of the Loading component code would be needed to confirm the tech stack section should be updated as suggested.

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.

1 participant