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

Steve/fix-v3-bricks #1388

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Steve/fix-v3-bricks #1388

merged 2 commits into from
Nov 5, 2024

Conversation

weareoutman
Copy link
Member

@weareoutman weareoutman commented Nov 5, 2024

依赖检查

组件之间的依赖声明,是微服务组件架构下的重要信息,请确保其正确性。

请勾选以下两组选项其中之一:

  • 本次 MR 没有使用上游组件(例如框架、后台组件等)的较新版本提供的特性。

或者:

  • 本次 MR 使用了上游组件(例如框架、后台组件等)的较新版本提供的特性。
  • 在对应的文件中更新了该上游组件的依赖版本(或确认了当前声明的依赖版本已包含本次 MR 使用的新特性)。

提交信息检查

Git 提交信息将决定包的版本发布及自动生成的 CHANGELOG,请检查工作内容与提交信息是否相符,并在以下每组选项中都依次确认。

破坏性变更是针对于下游使用者而言,可以通过本次改动对下游使用者的影响来识别变更类型:

  • 下游使用者不做任何改动,仍可以正常工作时,那么它属于普通变更。
  • 反之,下游使用者不做改动就无法正常工作时,那么它属于破坏性变更。

例如,构件修改了一个属性名,小产品 Storyboard 中需要使用新属性名才能工作,那么它就是破坏性变更。
又例如,构件还没有任何下游使用者,那么它的任何变更都是普通变更。

破坏性变更:

  • ⚠️ 本次 MR 包含破坏性变更的提交,请继续确认以下所有选项:
  • 没有更好的兼容方案,必须做破坏性变更。
  • 使用了 feat 作为提交类型。
  • 标注了 BREAKING CHANGE: 你的变更说明
  • 同时更新了本仓库中所有下游使用者的调用。
  • 同时更新了本仓库中所有下游使用者对该子包的依赖为即将发布的 major 版本。
  • 同时为其它仓库的 Migrating 做好了准备,例如文档或批量改动的方法。
  • 手动验证过破坏性变更在 Migrate 后可以正常工作。
  • 破坏性变更所在的提交没有意外携带其它子包的改动。

新特性:

  • 本次 MR 包含新特性的提交,且该提交不带有破坏性变更,并使用了 feat 作为提交类型。
  • 给新特性添加了单元测试。
  • 手动验证过新特性可以正常工作。

问题修复:

  • 本次 MR 包含问题修复的提交,且该提交不带有新特性或破坏性变更,并使用了 fix 作为提交类型。
  • 给问题修复添加了单元测试。
  • 手动验证过问题修复得到解决。

杂项工作:

即所有对下游使用者无任何影响、且没有必要显示在 CHANGELOG 中的改动,例如修改注释、测试用例、开发文档等:

  • 本次 MR 包含杂项工作的提交,且该提交不带有问题修复、新特性或破坏性变更,并使用了 chore, docs, test 等作为提交类型。

Summary by CodeRabbit

  • 新功能

    • 为表格组件添加了 .ant-table-wrapper 类,提供自定义背景和内边距样式。
    • 更新了选择组件的焦点事件处理,使用 onSelectFocus 代替 onFocus,以避免与原生焦点事件冲突。
  • 样式

    • 更新了表格的样式,确保在扩展行中应用新的 CSS 变量。
  • 文档

    • 更新了选择组件的事件处理逻辑,以反映新的属性名称和方法。

Copy link

coderabbitai bot commented Nov 5, 2024

Walkthrough

本次更改包括对 styles.shadow.css 文件的 CSS 样式进行修改,新增了 .ant-table-wrapper.ant-table-expanded-row eo-next-table 类,定义了相关的 CSS 变量。与此同时,对 Select 组件的 index.tsx 文件进行了更新,主要是将 onFocus 属性重命名为 onSelectFocus,并相应调整了事件处理和方法名称,以避免与原生焦点事件冲突。

Changes

文件路径 更改摘要
bricks/advanced/src/next-table/styles.shadow.css 新增类 .ant-table-wrapper.ant-table-expanded-row eo-next-table,定义 CSS 变量。
bricks/form/src/select/index.tsx SelectProps 接口中的 onFocus 属性重命名为 onSelectFocus,更新事件处理逻辑和方法名称。

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?

❤️ Share
🪧 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

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.12%. Comparing base (b7644ba) to head (7493fc2).
Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1388   +/-   ##
=======================================
  Coverage   85.12%   85.12%           
=======================================
  Files         503      503           
  Lines       14834    14834           
  Branches     2214     2214           
=======================================
  Hits        12628    12628           
  Misses       1775     1775           
  Partials      431      431           
Files with missing lines Coverage Δ
bricks/form/src/select/index.tsx 63.92% <100.00%> (ø)

Copy link

@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

🧹 Outside diff range and nitpick comments (1)
bricks/form/src/select/index.tsx (1)

270-271: 使用现代 JS 私有字段语法

_handleOptionsChange 重命名为 #handleOptionsChange 符合现代 JavaScript 的私有字段语法规范。

建议在其他私有方法上也采用相同的命名约定,例如:

- private handleChange
+ #handleChange
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b7644ba and 7493fc2.

📒 Files selected for processing (2)
  • bricks/advanced/src/next-table/styles.shadow.css (2 hunks)
  • bricks/form/src/select/index.tsx (7 hunks)
🔇 Additional comments (4)
bricks/advanced/src/next-table/styles.shadow.css (1)

38-41: 表格包装器样式设计合理!

使用 CSS 变量来控制背景和内边距,便于主题定制,符合最佳实践。

bricks/form/src/select/index.tsx (3)

91-91: 属性重命名以避免与原生事件冲突

onFocus 重命名为 onSelectFocus 是一个很好的改进,这样可以避免与原生的 focus 事件混淆。


241-244: 事件类型更新以避免重复触发

将事件类型从 "focus" 更新为 "select.focus" 是一个很好的改进,可以避免与原生事件冲突导致的多次触发问题。注释中清晰地说明了这个更改的原因。


289-291: 事件处理方法重命名与使用更新

handleFocus 重命名为 handleSelectFocus 并更新了相关调用,保持了命名的一致性。但建议检查是否有遗漏的调用点。

Also applies to: 392-399

✅ Verification successful

Let me search for any references to the old method name specifically in the select component to verify if there are any missed call sites.


Let me try to search for any references to both the old and new method names in the select component to ensure we have a complete picture.


方法重命名验证完成:更改已正确实施

根据代码搜索结果,handleFocus 已被完全重命名为 handleSelectFocus,且在组件内部的调用点也已正确更新为 onSelectFocus={this.handleSelectFocus}。没有发现任何遗漏的旧方法名称的使用。其他文件中的 handleFocus 都属于不同组件的独立实现,不受此更改影响。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查是否还有其他地方使用了旧的方法名
rg "handleFocus" --type ts

Length of output: 1460


Script:

#!/bin/bash
# Search for handleFocus specifically in the select component files
rg "handleFocus" bricks/form/src/select/ -A 3

Length of output: 45


Script:

#!/bin/bash
# Search for both old and new method names in select component
rg "handle.*Focus" bricks/form/src/select/ -A 3

# Also check for any focus-related event bindings
rg "onFocus" bricks/form/src/select/ -A 3

Length of output: 490

Copy link

github-actions bot commented Nov 5, 2024

@github-actions github-actions bot temporarily deployed to pull request November 5, 2024 09:01 Inactive
Copy link

github-actions bot commented Nov 5, 2024

📐🤏 Size check result (b7644ba...fee1355):

See full diff

Load all bricks together

Name Prev Now Diff
All bricks 4,600.88 KB 4,600.94 KB

Critical changes: None.

See full changes
Name Prev Now Diff
<core> 295.11 KB 295.08 KB
<react> 53.61 KB 53.61 KB 🟰
advanced 511.38 KB 511.41 KB
ai 287.46 KB 287.43 KB
api-market 10.61 KB 10.61 KB 🟰
basic 175.13 KB 175.13 KB 🟰
containers 92.7 KB 92.7 KB 🟰
data-view 787.39 KB 787.41 KB
diagram 172.94 KB 172.91 KB
form 311.13 KB 311.14 KB
form-platform 12.89 KB 12.89 KB 🟰
icons 15.21 KB 15.21 KB 🟰
illustrations 17.18 KB 17.18 KB 🟰
inject 56.45 KB 56.45 KB 🟰
markdown 239.62 KB 239.66 KB
mini-chart 10.66 KB 10.66 KB 🟰
nav 115.85 KB 115.85 KB 🟰
presentational 131.72 KB 131.72 KB 🟰
recent-history 32.71 KB 32.71 KB 🟰
shoelace 326.27 KB 326.27 KB 🟰
visual-builder 400.89 KB 400.84 KB
vs 839.08 KB 839.15 KB

Load bricks by each package

Critical changes: None.

See full changes
Name Prev Now Diff
advanced 743.74 KB 743.76 KB
ai 499.49 KB 499.51 KB
api-market 206.65 KB 206.66 KB
basic 321.99 KB 322 KB
containers 231.04 KB 231.04 KB 🟰
data-view 869.73 KB 869.65 KB
diagram 243.75 KB 243.75 KB 🟰
form 479.59 KB 479.57 KB
form-platform 175.28 KB 175.29 KB
icons 72.87 KB 72.87 KB 🟰
illustrations 77.33 KB 77.33 KB 🟰
inject 56.45 KB 56.45 KB 🟰
markdown 328.92 KB 328.97 KB
mini-chart 76.3 KB 76.3 KB 🟰
nav 390.98 KB 390.98 KB 🟰
presentational 342.32 KB 342.32 KB 🟰
recent-history 169.41 KB 169.41 KB 🟰
shoelace 326.27 KB 326.27 KB 🟰
visual-builder 1,491.82 KB 1,491.83 KB
vs 1,013.76 KB 1,013.76 KB 🟰
widget-editors 0 KB 0 KB 🟰

Load by each brick

Critical changes: None.

See full changes
Name Prev Now Diff
advanced.capture-snapshot 52.74 KB 52.73 KB
advanced.general-cascader 215.63 KB 215.59 KB
advanced.general-table 326.63 KB 326.61 KB
advanced.pdf-viewer 199.48 KB 199.47 KB
ai.chat-agent 68.07 KB 68.07 KB 🟰
ai.chat-view 494.75 KB 494.75 KB 🟰
api-market.apis-directory-tree 206.65 KB 206.66 KB
basic.active-element-blur 8.93 KB 8.93 KB 🟰
basic.change-language 8.92 KB 8.92 KB 🟰
basic.copy-to-clipboard 9.08 KB 9.08 KB 🟰
basic.dropdown-button 154.42 KB 154.42 KB 🟰
basic.general-button 128.18 KB 128.18 KB 🟰
basic.general-image 88.94 KB 88.94 KB 🟰
basic.general-link 122.87 KB 122.87 KB 🟰
basic.general-menu 69.15 KB 69.15 KB 🟰
basic.general-menu-item 83.79 KB 83.79 KB 🟰
basic.general-popover 101.37 KB 101.37 KB 🟰
basic.general-tag 85.87 KB 85.87 KB 🟰
basic.general-tag-list 90.24 KB 90.24 KB 🟰
basic.general-text 161.43 KB 161.43 KB 🟰
basic.get-language 8.91 KB 8.91 KB 🟰
basic.home-redirect 14.37 KB 14.37 KB 🟰
basic.http-proxy-request 8.99 KB 8.99 KB 🟰
basic.http-request 8.91 KB 8.91 KB 🟰
basic.lock-body-scroll 10.66 KB 10.66 KB 🟰
basic.set-theme-by-apps 8.93 KB 8.93 KB 🟰
basic.set-timeout 8.92 KB 8.92 KB 🟰
basic.show-dialog 180.74 KB 180.75 KB
basic.show-notification 148.31 KB 148.31 KB 🟰
basic.show-watermark 10.66 KB 10.66 KB 🟰
basic.v3-widget-mate 8.9 KB 8.9 KB 🟰
containers.easy-view 67.31 KB 67.31 KB 🟰
containers.flex-layout 67.06 KB 67.06 KB 🟰
containers.general-card 140.06 KB 140.06 KB 🟰
containers.general-category 67.68 KB 67.68 KB 🟰
containers.general-drawer 93.92 KB 93.92 KB 🟰
containers.general-modal 142.02 KB 142.02 KB 🟰
containers.grid-layout 68.14 KB 68.14 KB 🟰
containers.micro-view 79.13 KB 79.13 KB 🟰
containers.search-bar 67.18 KB 67.18 KB 🟰
containers.tab-group 72.37 KB 72.37 KB 🟰
containers.tab-item 99.14 KB 99.14 KB 🟰
containers.tab-list 99.14 KB 99.14 KB 🟰
data-view.app-wall-card-item 69.87 KB 69.87 KB 🟰
data-view.app-wall-relation-line 69.56 KB 69.56 KB 🟰
data-view.app-wall-system-card 84.03 KB 84.03 KB 🟰
data-view.basic-index-group 69.15 KB 69.15 KB 🟰
data-view.battery-chart 69.88 KB 69.88 KB 🟰
data-view.brick-notification 83.25 KB 83.21 KB
data-view.cabinet-app-layer 69.55 KB 69.55 KB 🟰
data-view.cabinet-button 69.16 KB 69.16 KB 🟰
data-view.cabinet-container 79.43 KB 79.43 KB 🟰
data-view.cabinet-graph 93.59 KB 93.59 KB 🟰
data-view.cabinet-node 69.96 KB 69.96 KB 🟰
data-view.cabinet-thumbnail 83.24 KB 83.24 KB 🟰
data-view.china-map-chart 562.28 KB 562.22 KB
data-view.complex-search 95.72 KB 95.72 KB 🟰
data-view.data-display-flipper 69.1 KB 69.1 KB 🟰
data-view.data-display-flipper-fifth 68.97 KB 68.97 KB 🟰
data-view.data-display-flipper-sixth 68.82 KB 68.82 KB 🟰
data-view.dropdown-menu 85.32 KB 85.36 KB
data-view.gauge-chart 70.02 KB 70.02 KB 🟰
data-view.gear-background 115.13 KB 115.13 KB 🟰
data-view.graph-layout-grid 86.34 KB 86.34 KB 🟰
data-view.graph-node 69.03 KB 69.03 KB 🟰
data-view.graph-text 77.49 KB 77.49 KB 🟰
data-view.grid-background 104.36 KB 104.36 KB 🟰
data-view.hi-tech-button 69.79 KB 69.79 KB 🟰
data-view.indicator-card 69.27 KB 69.27 KB 🟰
data-view.lights-component-title 68.7 KB 68.7 KB 🟰
data-view.loading-panel 73.07 KB 73.07 KB 🟰
data-view.modern-style-component-title 69.76 KB 69.76 KB 🟰
data-view.modern-style-page-title 69.79 KB 69.79 KB 🟰
data-view.modern-style-treemap 80.28 KB 80.28 KB 🟰
data-view.particle-animation 69.69 KB 69.69 KB 🟰
data-view.progress-bar-list 71.85 KB 71.85 KB 🟰
data-view.radar-chart 70.73 KB 70.73 KB 🟰
data-view.simple-card-item 69.37 KB 69.37 KB 🟰
data-view.tabs-drawer 85.18 KB 85.18 KB 🟰
data-view.tabs-page-title 71.92 KB 71.92 KB 🟰
data-view.tech-mesh-base-view 68.26 KB 68.26 KB 🟰
data-view.title-text 69.45 KB 69.45 KB 🟰
data-view.top-title-bar 80.63 KB 80.63 KB 🟰
diagram.editable-label 67.86 KB 67.86 KB 🟰
diagram.experimental-node 67.4 KB 67.4 KB 🟰
eo-actions 141.73 KB 141.73 KB 🟰
eo-alert 88.03 KB 88.03 KB 🟰
eo-antd-icon 71.7 KB 71.7 KB 🟰
eo-app-bar-wrapper 68.39 KB 68.39 KB 🟰
eo-auto-complete 102.43 KB 102.43 KB 🟰
eo-avatar 105.91 KB 105.91 KB 🟰
eo-avatar-group 104.47 KB 104.47 KB 🟰
eo-banner 83.3 KB 83.3 KB 🟰
eo-breadcrumb 127.13 KB 127.13 KB 🟰
eo-breadcrumb-item 126.7 KB 126.7 KB 🟰
eo-broadcast-channel 69.56 KB 69.56 KB 🟰
eo-button 128.18 KB 128.18 KB 🟰
eo-card 140.06 KB 140.06 KB 🟰
eo-card-item 167.42 KB 167.42 KB 🟰
eo-carousel-text 72.68 KB 72.68 KB 🟰
eo-cascader 215.59 KB 215.59 KB 🟰
eo-category 67.68 KB 67.68 KB 🟰
eo-checkbox 106.67 KB 106.68 KB
eo-code-display 232.43 KB 232.43 KB 🟰
eo-color-picker 223.87 KB 223.88 KB
eo-content-layout 66.62 KB 66.62 KB 🟰
eo-context-menu 148.24 KB 148.24 KB 🟰
eo-counter-badge 84.42 KB 84.42 KB 🟰
eo-current-time 86.71 KB 86.71 KB 🟰
eo-date-picker 223.91 KB 223.87 KB
eo-descriptions 164.12 KB 164.12 KB 🟰
eo-diagram 121.45 KB 121.45 KB 🟰
eo-directory 132.03 KB 132.03 KB 🟰
eo-directory-tree 120.82 KB 120.82 KB 🟰
eo-directory-tree-internal-node 69.02 KB 69.02 KB 🟰
eo-directory-tree-leaf 68.22 KB 68.22 KB 🟰
eo-display-canvas 211.63 KB 211.63 KB 🟰
eo-divider 73.55 KB 73.55 KB 🟰
eo-draw-canvas 219.18 KB 219.18 KB 🟰
eo-drawer 93.92 KB 93.92 KB 🟰
eo-dropdown-actions 145.44 KB 145.44 KB 🟰
eo-dropdown-button 154.42 KB 154.42 KB 🟰
eo-dynamic-form-item 165.64 KB 165.65 KB
eo-easy-view 67.31 KB 67.31 KB 🟰
eo-easyops-avatar 110.03 KB 110.03 KB 🟰
eo-easyops-icon 71.7 KB 71.7 KB 🟰
eo-event-agent 13.91 KB 13.91 KB 🟰
eo-fa-icon 71.7 KB 71.7 KB 🟰
eo-flex-layout 67.06 KB 67.06 KB 🟰
eo-form 69.54 KB 69.55 KB
eo-form-item 75.26 KB 75.26 KB 🟰
eo-formatter-number 69.61 KB 69.61 KB 🟰
eo-frame-breadcrumb 143.91 KB 143.91 KB 🟰
eo-grid-layout 68.14 KB 68.14 KB 🟰
eo-humanize-time 139.5 KB 139.5 KB 🟰
eo-icon 71.7 KB 71.7 KB 🟰
eo-icon-select 195.33 KB 195.33 KB 🟰
eo-iframe 69.61 KB 69.61 KB 🟰
eo-image 88.94 KB 88.94 KB 🟰
eo-img-icon 71.7 KB 71.7 KB 🟰
eo-info-card-item 137.22 KB 137.22 KB 🟰
eo-input 96.43 KB 96.43 KB 🟰
eo-launchpad-button 161.26 KB 161.26 KB 🟰
eo-launchpad-button-v2 215.5 KB 215.5 KB 🟰
eo-launchpad-quick-access 202.13 KB 202.14 KB
eo-launchpad-recent-visits 200.94 KB 200.94 KB 🟰
eo-link 122.87 KB 122.87 KB 🟰
eo-loading-step 101.29 KB 101.29 KB 🟰
eo-main-view 83.3 KB 83.3 KB 🟰
eo-markdown-display 132.75 KB 132.75 KB 🟰
eo-markdown-editor 299.01 KB 299.02 KB
eo-menu 69.15 KB 69.15 KB 🟰
eo-menu-group 68.93 KB 68.93 KB 🟰
eo-menu-item 83.79 KB 83.79 KB 🟰
eo-menu-item-sub-menu 84.26 KB 84.26 KB 🟰
eo-message-listener 69.34 KB 69.34 KB 🟰
eo-micro-view 79.13 KB 79.13 KB 🟰
eo-mini-actions 146.32 KB 146.32 KB 🟰
eo-mini-line-chart 76.3 KB 76.3 KB 🟰
eo-modal 142.02 KB 142.02 KB 🟰
eo-narrow-view 71.48 KB 71.48 KB 🟰
eo-nav-menu 192.48 KB 192.49 KB
eo-next-table 376.76 KB 376.82 KB
eo-page-title 69.48 KB 69.48 KB 🟰
eo-page-view 71.48 KB 71.48 KB 🟰
eo-pagination 172.35 KB 172.35 KB 🟰
eo-popover 101.37 KB 101.37 KB 🟰
eo-popup 97.19 KB 97.19 KB 🟰
eo-radio 97.75 KB 97.75 KB 🟰
eo-resizable-box 69.02 KB 69.02 KB 🟰
eo-search 100.4 KB 100.41 KB
eo-search-bar 67.18 KB 67.18 KB 🟰
eo-search-launchpad 204.79 KB 204.79 KB 🟰
eo-select 114.25 KB 114.26 KB
eo-sidebar 167.86 KB 167.86 KB 🟰
eo-sidebar-menu 148.91 KB 148.91 KB 🟰
eo-sidebar-menu-group 148.91 KB 148.91 KB 🟰
eo-sidebar-menu-item 133.77 KB 133.77 KB 🟰
eo-sidebar-menu-submenu 148.91 KB 148.91 KB 🟰
eo-sidebar-sub-menu 148.88 KB 148.88 KB 🟰
eo-spin 67.51 KB 67.51 KB 🟰
eo-statistics-card 87.9 KB 87.9 KB 🟰
eo-submit-buttons 150.2 KB 150.21 KB
eo-svg-icon 71.7 KB 71.7 KB 🟰
eo-switch 94.64 KB 94.64 KB 🟰
eo-tab-group 72.37 KB 72.37 KB 🟰
eo-tab-item 99.14 KB 99.14 KB 🟰
eo-tab-list 99.14 KB 99.14 KB 🟰
eo-table 326.62 KB 326.62 KB 🟰
eo-tag 85.87 KB 85.87 KB 🟰
eo-tag-list 90.24 KB 90.24 KB 🟰
eo-text 161.43 KB 161.43 KB 🟰
eo-text-tooltip 141.09 KB 141.08 KB
eo-textarea 84.31 KB 84.31 KB 🟰
eo-time-picker 205.87 KB 205.87 KB 🟰
eo-time-range-picker 222.83 KB 222.83 KB 🟰
eo-tooltip 117.91 KB 117.91 KB 🟰
eo-tree 140.68 KB 140.68 KB 🟰
eo-tree-select 227.69 KB 227.69 KB 🟰
eo-upload-file 162.21 KB 162.22 KB
eo-upload-image 170.83 KB 170.83 KB 🟰
eo-user-or-user-group-select 175.28 KB 175.29 KB
eo-workbench-layout 260.11 KB 260.11 KB 🟰
eo-workbench-layout-v2 261.6 KB 261.6 KB 🟰
form.dynamic-form-item 165.64 KB 165.65 KB
form.general-checkbox 106.68 KB 106.68 KB 🟰
form.general-form 69.54 KB 69.55 KB
form.general-form-item 75.26 KB 75.26 KB 🟰
form.general-input 96.43 KB 96.43 KB 🟰
form.general-radio 97.74 KB 97.75 KB
form.general-search 100.41 KB 100.41 KB 🟰
form.general-select 114.25 KB 114.26 KB
form.general-switch 94.64 KB 94.64 KB 🟰
form.general-textarea 84.31 KB 84.31 KB 🟰
form.icon-select 195.33 KB 195.33 KB 🟰
form.submit-buttons 150.2 KB 150.21 KB
form.upload-image 170.83 KB 170.83 KB 🟰
icons.antd-icon 71.7 KB 71.7 KB 🟰
icons.easyops-icon 71.7 KB 71.7 KB 🟰
icons.fa-icon 71.7 KB 71.7 KB 🟰
icons.general-icon 71.7 KB 71.7 KB 🟰
icons.get-antd-icons 6.83 KB 6.83 KB 🟰
icons.get-easyops-icons 6.83 KB 6.83 KB 🟰
icons.get-fa-icons 6.83 KB 6.83 KB 🟰
icons.get-libs 6.83 KB 6.83 KB 🟰
icons.search-icons 6.83 KB 6.83 KB 🟰
illustrations.error-message 73.13 KB 73.13 KB 🟰
illustrations.get-illustration 9.35 KB 9.35 KB 🟰
illustrations.get-illustrations-by-category 6.25 KB 6.25 KB 🟰
illustrations.loading-transition 66.82 KB 66.82 KB 🟰
illustrations.translate-illustration-config 9.35 KB 9.35 KB 🟰
inject.visual-builder-preview-agent 56.45 KB 56.45 KB 🟰
markdown.markdown-editor 299.01 KB 299.02 KB
nav.app-bar-wrapper 68.39 KB 68.39 KB 🟰
nav.easyops-navbar-alerts 136.21 KB 136.21 KB 🟰
nav.launchpad-config 215.41 KB 215.41 KB 🟰
nav.nav-logo 132.8 KB 132.8 KB 🟰
nav.poll-announce 168.78 KB 168.78 KB 🟰
presentational.code-display 232.43 KB 232.43 KB 🟰
presentational.general-alert 88.03 KB 88.03 KB 🟰
presentational.general-descriptions 164.12 KB 164.12 KB 🟰
presentational.humanize-time 139.5 KB 139.5 KB 🟰
recent-history.clear-history 28.44 KB 28.44 KB 🟰
recent-history.get-all-history 28.44 KB 28.44 KB 🟰
recent-history.push-history 28.44 KB 28.44 KB 🟰
recent-history.recent-visit 168.22 KB 168.22 KB 🟰
sl-alert 30.13 KB 30.13 KB 🟰
sl-animated-image 24.88 KB 24.88 KB 🟰
sl-animation 25.05 KB 25.05 KB 🟰
sl-avatar 25.35 KB 25.35 KB 🟰
sl-badge 21.92 KB 21.92 KB 🟰
sl-breadcrumb 27.29 KB 27.29 KB 🟰
sl-breadcrumb-item 27.29 KB 27.29 KB 🟰
sl-button 32.75 KB 32.75 KB 🟰
sl-button-group 21.17 KB 21.17 KB 🟰
sl-card 22.18 KB 22.18 KB 🟰
sl-carousel 31.31 KB 31.31 KB 🟰
sl-carousel-item 31.31 KB 31.31 KB 🟰
sl-checkbox 29.79 KB 29.79 KB 🟰
sl-color-picker 63.98 KB 63.98 KB 🟰
sl-details 27.57 KB 27.57 KB 🟰
sl-dialog 32.51 KB 32.51 KB 🟰
sl-divider 21.01 KB 21.01 KB 🟰
sl-drawer 33.6 KB 33.6 KB 🟰
sl-dropdown 35.61 KB 35.61 KB 🟰
sl-format-bytes 21.83 KB 21.83 KB 🟰
sl-format-date 21.88 KB 21.88 KB 🟰
sl-format-number 21.89 KB 21.89 KB 🟰
sl-icon 24.01 KB 24.01 KB 🟰
sl-icon-button 26.61 KB 26.61 KB 🟰
sl-image-comparer 27.27 KB 27.27 KB 🟰
sl-input 33.31 KB 33.31 KB 🟰
sl-menu 41.13 KB 41.13 KB 🟰
sl-menu-item 41.13 KB 41.13 KB 🟰
sl-menu-label 20.74 KB 20.74 KB 🟰
sl-mutation-observer 21.23 KB 21.23 KB 🟰
sl-option 26.87 KB 26.87 KB 🟰
sl-popup 30.29 KB 30.29 KB 🟰
sl-progress-bar 23.48 KB 23.48 KB 🟰
sl-progress-ring 22.57 KB 22.57 KB 🟰
sl-qr-code 26.48 KB 26.48 KB 🟰
sl-radio 25.77 KB 25.77 KB 🟰
sl-radio-button 25.53 KB 25.53 KB 🟰
sl-radio-group 25.86 KB 25.86 KB 🟰
sl-range 28.57 KB 28.57 KB 🟰
sl-rating 27.93 KB 27.93 KB 🟰
sl-relative-time 22.16 KB 22.16 KB 🟰
sl-resize-observer 21.09 KB 21.09 KB 🟰
sl-select 47.9 KB 47.9 KB 🟰
sl-skeleton 21.73 KB 21.73 KB 🟰
sl-spinner 22.18 KB 22.18 KB 🟰
sl-split-panel 23.8 KB 23.8 KB 🟰
sl-switch 26.7 KB 26.7 KB 🟰
sl-tab 32.6 KB 32.6 KB 🟰
sl-tab-group 32.6 KB 32.6 KB 🟰
sl-tab-panel 32.6 KB 32.6 KB 🟰
sl-tag 28.76 KB 28.76 KB 🟰
sl-textarea 27.21 KB 27.21 KB 🟰
sl-tooltip 33.69 KB 33.69 KB 🟰
sl-tree 36.75 KB 36.75 KB 🟰
sl-tree-item 36.75 KB 36.75 KB 🟰
sl-visually-hidden 20.71 KB 20.71 KB 🟰
visual-builder.batch-update-raw-data-generated-view 7.83 KB 7.83 KB 🟰
visual-builder.chat-conversation 184.01 KB 184.01 KB 🟰
visual-builder.chat-preview 69.81 KB 69.81 KB 🟰
visual-builder.check-editor-by-name 7.44 KB 7.44 KB 🟰
visual-builder.contract-select 123.16 KB 123.2 KB
visual-builder.generate-snippets-context-menu 146.6 KB 146.6 KB 🟰
visual-builder.get-data-deps 7.46 KB 7.46 KB 🟰
visual-builder.get-dependency-tree 7.83 KB 7.83 KB 🟰
visual-builder.get-raw-data-system-prompts 11.81 KB 11.81 KB 🟰
visual-builder.inject-chat-preview-agent 8.41 KB 8.41 KB 🟰
visual-builder.page-arch-node 130.98 KB 130.98 KB 🟰
visual-builder.parse-path 9.07 KB 9.07 KB 🟰
visual-builder.pre-generated-container 70.19 KB 70.19 KB 🟰
visual-builder.pre-generated-preview 69.77 KB 69.77 KB 🟰
visual-builder.pre-generated-table-view 67.43 KB 67.43 KB 🟰
visual-builder.property-editor 1,299.06 KB 1,299.12 KB
visual-builder.raw-data-preview 72.65 KB 72.65 KB 🟰
visual-builder.workbench-action 134.72 KB 134.72 KB 🟰
visual-builder.workbench-action-list 140.15 KB 140.15 KB 🟰
visual-builder.workbench-history-action 168.19 KB 168.19 KB 🟰
visual-builder.workbench-pane 83.51 KB 83.51 KB 🟰
visual-builder.workbench-sidebar 68.3 KB 68.3 KB 🟰
visual-builder.workbench-tree 140.18 KB 140.18 KB 🟰
vs.code-editor 1,013.73 KB 1,013.69 KB

Copy link

@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

🧹 Outside diff range and nitpick comments (2)
bricks/advanced/src/next-table/styles.shadow.css (1)

38-41: 建议为CSS变量添加默认值

.ant-table-wrapper 的样式使用了 CSS 变量来控制背景和内边距,这种做法很灵活。不过建议为这些变量设置默认值,以防变量未定义的情况。

建议按照以下方式修改:

 .ant-table-wrapper {
-  background: var(--eo-table-wrapper-background);
-  padding: var(--eo-table-wrapper-padding);
+  background: var(--eo-table-wrapper-background, transparent);
+  padding: var(--eo-table-wrapper-padding, 0);
 }
bricks/form/src/select/index.tsx (1)

392-399: 建议优化点击处理函数的条件逻辑

当前的条件逻辑结构可以进行优化,建议重构以提高可读性。

建议按照以下方式重构:

-  if (!value) {
-    setIsDropHidden(false);
-    setIsFocused(true);
-    onSelectFocus?.();
-    inputRef.current && inputRef.current.focus();
-  } else if (!disabled) {
-    setIsDropHidden(!isDropHidden);
-    setIsFocused(true);
-    inputRef.current && inputRef.current.focus();
-  }
+  if (disabled) {
+    return;
+  }
+  
+  setIsFocused(true);
+  onSelectFocus?.();
+  inputRef.current?.focus();
+  
+  setIsDropHidden(value ? !isDropHidden : false);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b7644ba and 7493fc2.

📒 Files selected for processing (2)
  • bricks/advanced/src/next-table/styles.shadow.css (2 hunks)
  • bricks/form/src/select/index.tsx (7 hunks)
🔇 Additional comments (5)
bricks/advanced/src/next-table/styles.shadow.css (1)

89-92: 确认嵌套表格样式的兼容性

嵌套表格的样式设置合理,使用了语义化的变量名。但需要验证在不同层级嵌套时的表现。

运行以下脚本检查是否存在多层嵌套表格的使用场景:

✅ Verification successful

Let me gather more information about the nested table implementation to verify the compatibility.


Let me check one more aspect about the nested table implementation to ensure we have a complete picture.


嵌套表格样式设置已验证完成

根据代码分析,当前的嵌套表格样式实现是合理的:

  • 使用 --eo-table-wrapper-background--eo-table-wrapper-padding 变量正确设置了嵌套表格的样式
  • 样式作用域限定在 .ant-table-expanded-row eo-next-table 选择器内,不会影响其他场景
  • 组件提供了完整的展开行功能支持,包括 expandableexpandedRowKeys 等属性
  • 测试用例中包含了基础的展开功能测试
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 描述:检查代码库中是否存在多层嵌套表格的使用场景

# 搜索包含多个 .ant-table-expanded-row 的模板
rg -l "ant-table-expanded-row.*ant-table-expanded-row"

# 搜索相关的文档或测试用例
fd -e md -e test.tsx -e spec.tsx | xargs rg "table.*expand"

Length of output: 996


Script:

#!/bin/bash
# 检查嵌套表格的具体实现和测试用例
ast-grep --pattern 'expandedRowRender'

# 检查表格样式文件中的嵌套相关样式
rg -A 3 "ant-table-expanded-row" bricks/advanced/src/next-table/styles.shadow.css

# 检查表格组件的测试用例中关于嵌套的测试
rg -A 5 "describe.*expand" bricks/advanced/src/next-table/index.spec.tsx

Length of output: 732


Script:

#!/bin/bash
# 检查嵌套表格的实现细节
rg -A 10 "expandable" bricks/advanced/src/next-table/index.tsx

# 检查是否有其他相关的样式变量定义
rg "antd-table-row-expand" bricks/advanced/src/next-table/

Length of output: 876

bricks/form/src/select/index.tsx (4)

91-91: 属性重命名符合最佳实践

onFocus 重命名为 onSelectFocus 可以避免与原生 focus 事件的命名冲突,这是一个很好的改进。


241-244: 事件类型重命名提供了更好的语义

将事件类型从 focus 改为 select.focus 不仅避免了与原生事件的冲突,还通过命名空间提供了更清晰的语义,表明这是 select 组件特有的 focus 事件。


289-291: 处理函数重命名保持一致性

处理函数的重命名与属性和事件类型的变更保持一致,维护了代码的一致性。


321-323: 属性传递完整性验证

确保所有必要的属性都已正确传递给组件。

@weareoutman weareoutman merged commit bd52315 into master Nov 5, 2024
9 checks passed
@weareoutman weareoutman deleted the steve/fix-v3-bricks branch November 5, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants