Skip to content

Conversation

@James-9696
Copy link
Collaborator

@James-9696 James-9696 commented Nov 13, 2025

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:
    补充文档

What is the current behavior?

Issue Number: #3810

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • [x PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:
    补充文档

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Documentation
    • Added comprehensive English translations for demo descriptions.
    • Enhanced formatting with code highlighting for technical terms and attributes.
    • Clarified and updated demo labels for consistency.
    • Standardized documentation structure and terminology across descriptions.

@github-actions github-actions bot added the bug Something isn't working label Nov 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Walkthrough

Updated demo metadata file to add English translations for query-builder demo descriptions, introduced inline code formatting for technical terms, and changed the display-only-field demo label from "Basic" to "Simple Mode".

Changes

Cohort / File(s) Summary
Query-Builder Demo Metadata
examples/sites/demos/pc/app/query-builder/webdoc/query-builder.js
Added en-US translations for multiple demo descriptions; wrapped technical terms (e.g., max-height, bindProps, fields, children) with <code>...</code> formatting; updated display-only-field demo label to "Simple Mode"; standardized description structure and terminology.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Review accuracy and completeness of en-US translations against zh-CN originals
  • Verify consistent code formatting applied across all attribute names and examples
  • Confirm display-only-field label change aligns with naming conventions
  • Check HTML structure integrity of reformatted description blocks

Poem

🐰 Translations blooming, code tags gleaming,
English descriptions now sweetly streaming,
Simple Mode shines where Basic once lay,
Demo docs dance in a fresh, formatted way! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(query-builder): document supplement' is partially related to the changeset. It references 'query-builder' and 'document supplement,' which align with the file being modified and the addition of English translations and documentation improvements. However, the term 'fix' in the conventional commit prefix may be misleading, as the changes primarily add/enhance documentation rather than fixing a bug.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76dbda7 and bbf110a.

📒 Files selected for processing (1)
  • examples/sites/demos/pc/app/query-builder/webdoc/query-builder.js (5 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). (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)

<code>autoSelectField</code>:范围域是否会默认选择,勾选则默认为第一个选项;反之则默认为----- \n <code>autoSelectOperator</code>:运算符是否会默认选择,勾选则默认选择第一个选项,反之则默认为----- \n <code>disabled</code>:禁用所有规则 \n <code>parseNumbers</code>:数字会被转化为 Number 类型,而非 String 类型 \n <code>showCloneButtons</code>:展示复制按钮,即整条规则可以被复制 \n <code>showCombinatorsBetweenRules</code>:组合子数组统一修改,且不再展示在连线上,以下拉选择形式出现 \n <code>showLockButtons</code>:展示锁定按钮,即整条规则可以被锁定 \n <code>showNotToggle</code>:展示 not 条件切换框 \n <code>displayOnlyField</code>:是否仅展示字段选择器 \n </div> \n 二、fields 数据配置 \n <pre> <code>\n fields 中的数据(只用于说明各字段含义,无业务特定性) \n { \n name: 'isMusician', //name:格式化数据中的值(形参) \n label: 'Is a musician', //label:范围域在规则生成器中对外展示名称 \n valueEditorType: 'checkbox', //placeholder:值域的默认缺省值 \n operators: [ //运算符自定义,name 为格式化数据中的值,label 为范围域对外展示的名称 \n { \n name: '=', \n label: '=' \n } \n ], \n bindProps: { // 通过 bindProps 参数可对某一类组件进行参数控制 \n input:{ \n clearable:true \n }, \n select:{ \n filterable:true \n } \n }, \n defaultValue: false, //defaultOperator:运算符的默认缺省选择 \n validator: (r) => !!r.value //validator:校验规则(该功能点还在迭代开发中……) \n inputType: 'number', //值域的数值类型 \n valueEditorType: 'radio' //值域编辑器的类型 \n defaultValue: false, //值域的默认值 \n values: [ //值域的可选域配置(下拉) \n { \n label: 'Percussion instruments', \n options: [ \n { \n name: 'Clapstick', \n label: 'Clapstick' \n } \n ] \n } \n ], \n values: [ //值域的可选域配置(单选) \n { \n name: 'M', \n label: 'Male' \n }, \n { \n name: 'F', \n label: 'Female' \n }, \n { \n name: 'O', \n label: 'Other' \n } \n ], \n valueSources: ['field', 'value'], //值域类型可选择 \n comparator: 'groupNumber', //分组时的比较器 \n groupNumber: 'group1', //分组的组别 \n }, \n // 组合子数组配置,label 为展示字符,name 为数据值 \n combinators: [ \n { \n name: 'and', \n label: '且' \n }, \n { \n name: 'or', \n label: '或' \n } \n ] \n </code></pre> <br>`,
'en-US': ''
<code>config</code>属性说明,<code>autoSelectField</code>:范围域是否会默认选择,勾选则默认为第一个选项;反之则默认为----- \n <code>autoSelectOperator</code>:运算符是否会默认选择,勾选则默认选择第一个选项,反之则默认为----- \n <code>disabled</code>:禁用所有规则 \n <code>parseNumbers</code>:数字会被转化为 Number 类型,而非 String 类型 \n <code>showCloneButtons</code>:展示复制按钮,即整条规则可以被复制 \n <code>showCombinatorsBetweenRules</code>:组合子数组统一修改,且不再展示在连线上,以下拉选择形式出现 \n <code>showLockButtons</code>:展示锁定按钮,即整条规则可以被锁定 \n <code>showNotToggle</code>:展示 not 条件切换框 \n <code>displayOnlyField</code>:是否仅展示字段选择器 \n </div> \n fields 数据配置 \n <pre> <code>fields 中的数据(只用于说明各字段含义,无业务特定性) \n { \n name: 'isMusician', //name:格式化数据中的值(形参) \n label: 'Is a musician', //label:范围域在规则生成器中对外展示名称 \n valueEditorType: 'checkbox', //placeholder:值域的默认缺省值 \n operators: [ //运算符自定义,name 为格式化数据中的值,label 为范围域对外展示的名称 \n { \n name: '=', \n label: '=' \n } \n ], \n bindProps: { // 通过 bindProps 参数可对某一类组件进行参数控制 \n input:{ \n clearable:true \n }, \n select:{ \n filterable:true \n } \n }, \n defaultValue: false, //defaultOperator:运算符的默认缺省选择 \n validator: (r) => !!r.value //validator:校验规则(该功能点还在迭代开发中……) \n inputType: 'number', //值域的数值类型 \n valueEditorType: 'radio' //值域编辑器的类型 \n defaultValue: false, //值域的默认值 \n values: [ //值域的可选域配置(下拉) \n { \n label: 'Percussion instruments', \n options: [ \n { \n name: 'Clapstick', \n label: 'Clapstick' \n } \n ] \n } \n ], \n values: [ //值域的可选域配置(单选) \n { \n name: 'M', \n label: 'Male' \n }, \n { \n name: 'F', \n label: 'Female' \n }, \n { \n name: 'O', \n label: 'Other' \n } \n ], \n valueSources: ['field', 'value'], //值域类型可选择 \n comparator: 'groupNumber', //分组时的比较器 \n groupNumber: 'group1', //分组的组别 \n }, \n // 组合子数组配置,label 为展示字符,name 为数据值 \n combinators: [ \n { \n name: 'and', \n label: '且' \n }, \n { \n name: 'or', \n label: '或' \n } \n ] \n </code></pre> <br>`,
'en-US': `<code>config</code> Attribute Description, <code>autoSelectField</code>: Whether the range field is automatically selected by default. If checked, the first option will be selected by default; otherwise, it defaults to ----- <code>autoSelectOperator</code>: Whether the operator is automatically selected by default. If checked, the first option will be selected by default; otherwise, it defaults to ----- <code>disabled</code>: Disable all rules <code>parseNumbers</code>: Numbers will be converted to the Number type, not the String type <code>showCloneButtons</code>: Display copy buttons, allowing the entire rule to be copied <code>showCombinatorsBetweenRules</code>: Uniformly modify the combinator array, which no longer appears on the connection line but instead appears as a dropdown selection <code>showLockButtons</code>: Display lock buttons, allowing the entire rule to be locked <code>showNotToggle</code>: Display the not condition toggle box <code>displayOnlyField</code>: Whether only the field selector is displayed. \n fields data configuration \n<pre><code>Data in fields (only used to explain the meaning of each field, no business specificity) \n {\n name: 'isMusician',//name: values (formal parameters) in formatted data \n label: 'Is a musician',//label: the external display name of the range field in the rule generator \n valueEditorType: 'checkbox',//placeholder: the default value of the value field \n operators: [//operator customization, name is the value in formatted data, label is the external display name of the range field \n {\n name: '=', \n label: '=' \n} \n], \n BindProps: {//The bindProps parameter can be used to control the parameters of a certain type of component\n input:{ \n clearable:true \n }, \n select:{ \n filterable:true \n } \n }, \n defaultValue: false, //defaultOperator: The default selection for operators is validator: (r)=>!! r. Value//validator: validation rules (this feature is still under iterative development...) \n inputType: 'number',//numeric type of value range \n valueEditorType: 'radio'//type of value range editor \n defaultValue: false,//default value of value range \n values: [//optional range configuration of value range (drop-down))\n { \n label: 'Percussion instruments', \n options: [ \n { \n name: 'Clapstick', \n label: 'Clapstick' \n } \n ] \n } \n ], \n values: [//Optional field configuration for value range (single choice)\n { \n name: 'M', \n label: 'Male' \n }, \n { \n name: 'F', \n label: 'Female' \n }, \n { \n name: 'O', \n label: 'Other' \n } \n ], \n valueSources: ['field', 'value'], //The range type can be selected as \n comparator:'groupNumber ',//comparator for grouping \n groupNumber:'group1',//grouping group \n}, \n//combination subarray configuration, label is the display character, name is the data value \n combiners: [\n {\n name: 'and', \n label: 'and' \n}, \n {\n name: 'or', \n label: 'or' \n} \n] \n</code></press><br>`
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Correct property name case and closing tag in en-US block.

BindProps should remain camelCased as bindProps, otherwise the doc instructs a non-existent option. The same string ends with </press>, which breaks the HTML block. Please fix both.

Apply this diff to address the issues:

-        'en-US': `<code>config</code> Attribute Description,  ... BindProps: {//The bindProps parameter ...\n</code></press><br>`
+        'en-US': `<code>config</code> Attribute Description,  ... <code>bindProps</code>: {//The <code>bindProps</code> parameter ...\n</code></pre><br>`

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In examples/sites/demos/pc/app/query-builder/webdoc/query-builder.js around line
14, change the incorrect property name BindProps to camelCase bindProps in the
en-US string and replace the erroneous closing tag </press> with the correct
</pre> to properly close the code block.

'en-US': ' '
'zh-CN': '<code>config</code>配置添加<code>displayOnlyField</code>属性,开启简易模式仅展示字段选择器功能',
'en-US':
'<code>config</code>Configure to add<code>showOnlyField</code>attribute, enable simple mode to only display field selector function'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Attribute name typo in en-US translation.

The English description tells users to set <code>showOnlyField</code>, but the actual option is displayOnlyField. This mismatch will cause the feature to fail for readers following the doc. Please align the attribute name.

Apply this diff to fix the typo:

-          '<code>config</code>Configure to add<code>showOnlyField</code>attribute, enable simple mode to only display field selector function'
+          '<code>config</code>Configure to add<code>displayOnlyField</code>attribute, enabling simple mode to only display the field selector'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'<code>config</code>Configure to add<code>showOnlyField</code>attribute, enable simple mode to only display field selector function'
'<code>config</code>Configure to add<code>displayOnlyField</code>attribute, enabling simple mode to only display the field selector'
🤖 Prompt for AI Agents
In examples/sites/demos/pc/app/query-builder/webdoc/query-builder.js around line
27, the en-US string mistakenly references the attribute name
<code>showOnlyField</code> while the actual option is displayOnlyField; update
the translation text to reference displayOnlyField (replace "showOnlyField" with
"displayOnlyField") so the docs match the real API and users won't be misled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant