-
Notifications
You must be signed in to change notification settings - Fork 10
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(): add textContent into props if brick has default slot #4583
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/build-next-bricks/src/makeBrickManifest.jsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "@next-core/eslint-config-next" to extend from. Please check that the name of the config is correct. The config "@next-core/eslint-config-next" was referenced from the config file in "/.eslintrc". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. 概述代码变更步骤Walkthrough本次变更涉及两个主要文件: 变更详情
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
Files not reviewed (1)
- package.json: Language not supported
There was a problem hiding this 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 (2)
packages/build-next-bricks/src/makeBrickManifest.js (2)
108-121
: 代码实现良好,建议补充文档说明事件标签的处理逻辑实现完整,包含了适当的错误处理。建议在代码注释中添加示例,说明如何正确使用
@event
标签。建议添加如下示例注释:
// 主动声明原生事件,例如 eo-button 构件的 click 事件 +/** + * 示例: + * @event click - 当按钮被点击时触发 + */
135-143
: 建议完善 textContent 属性的实现当前实现有以下几点可以改进:
- 建议将描述文本抽取为常量,便于后续国际化
- 需要在 manifest.types 中添加对应的类型注解
建议按如下方式修改:
+const TEXT_CONTENT_DESCRIPTION = "文本内容"; + // 如果有默认插槽,代表有默认属性 textContent const hasDefaultSlot = manifest.slots.some((slot) => !slot.name); if (hasDefaultSlot) { manifest.properties.push({ name: "textContent", type: "string", - description: "文本内容", + description: TEXT_CONTENT_DESCRIPTION, }); + manifest.types.properties.push({ + name: "textContent", + annotation: { + type: "keyword", + value: "string", + }, + }); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (2)
package.json
(1 hunks)packages/build-next-bricks/src/makeBrickManifest.js
(2 hunks)
🔇 Additional comments (1)
package.json (1)
46-46
: 建议验证是否有更新的版本可用
@types/doctrine 的版本 0.0.9 相对较旧,建议检查是否有更新的版本以获得更完整的类型定义支持。
✅ Verification successful
@types/doctrine 0.0.9 是最新版本,无需更新
经验证,@types/doctrine 的最新版本就是 0.0.9,虽然版本号较低但确实是当前最新的类型定义包。主包 doctrine 当前版本为 3.0.0,保持稳定。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# 检查 @types/doctrine 的最新版本
npm view @types/doctrine versions --json | jq -r '.[-1]'
# 检查主包 doctrine 的最新版本
npm view doctrine version
Length of output: 98
next-core Run #10842
Run Properties:
|
Project |
next-core
|
Branch Review |
steve/v3-refine-docs
|
Run status |
Passed #10842
|
Run duration | 00m 25s |
Commit |
47a5d11ee8 ℹ️: Merge 79a40ec50c5f7192323cff271781218205b0173b into 05dcac875a88ec5420199db23156...
|
Committer | Shenwei Wang |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
16
|
View all changes introduced in this branch ↗︎ |
Also support event tags in brick doc comment
6199dc4
to
79a40ec
Compare
Also support event tags in brick doc comment
依赖检查
组件之间的依赖声明,是微服务组件架构下的重要信息,请确保其正确性。
请勾选以下两组选项其中之一:
或者:
提交信息检查
Git 提交信息将决定包的版本发布及自动生成的 CHANGELOG,请检查工作内容与提交信息是否相符,并在以下每组选项中都依次确认。
破坏性变更:
feat
作为提交类型。BREAKING CHANGE: 你的变更说明
。新特性:
feat
作为提交类型。问题修复:
fix
作为提交类型。杂项工作:
即所有对下游使用者无任何影响、且没有必要显示在 CHANGELOG 中的改动,例如修改注释、测试用例、开发文档等:
chore
,docs
,test
等作为提交类型。Summary by CodeRabbit
新功能
依赖更新
devDependencies
中添加了新的开发依赖@types/doctrine
,版本为^0.0.9
。