Skip to content

doc(Attributes): update components xml comments#7780

Merged
ArgoZhang merged 3 commits intomainfrom
doc-xml
Mar 21, 2026
Merged

doc(Attributes): update components xml comments#7780
ArgoZhang merged 3 commits intomainfrom
doc-xml

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Mar 21, 2026

Link issues

fixes #7779

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Update XML documentation comments for attribute classes to improve clarity and bilingual (zh/en) descriptions.

Documentation:

  • Clarify and consolidate XML documentation for TableMetadataForAttribute, including example usage and parameter description.
  • Reformat and expand XML documentation for JSModuleAutoLoaderAttribute and JSModuleNotInheritedAttribute to provide clearer intent and usage.

Copilot AI review requested due to automatic review settings March 21, 2026 01:33
@bb-auto bb-auto bot added the documentation Improvements or additions to documentation label Mar 21, 2026
@bb-auto bb-auto bot added this to the v10.4.0 milestone Mar 21, 2026
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 21, 2026

Reviewer's Guide

Updates XML documentation comments for several attribute classes to improve bilingual (Chinese/English) clarity, conciseness, and formatting, without changing runtime behavior.

File-Level Changes

Change Details Files
Refine and consolidate XML documentation for TableMetadataForAttribute, including example usage and parameter docs.
  • Collapsed multi-line bilingual description into clearer, consolidated zh/en paragraphs for the attribute summary.
  • Simplified and restructured the example code comments, combining Chinese and English explanations and clarifying registration usage.
  • Formatted the dataType parameter XML doc into a multi-line structure for better readability.
src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs
Improve XML documentation formatting for JSModuleAutoLoaderAttribute path parameter.
  • Reformatted the path parameter XML documentation to a multi-line structure with separate zh/en paragraphs for readability.
src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs
Clarify summary XML documentation for JSModuleNotInheritedAttribute.
  • Replaced vague bilingual summary with explicit description that the attribute indicates a class does not inherit JSModuleAutoLoaderAttribute.
src/BootstrapBlazor/Attributes/JSModuleNotInheritedAttribute.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7779 Update and clarify XML documentation comments for attribute-related components to better describe their purpose and usage.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit d3661a7 into main Mar 21, 2026
5 checks passed
@ArgoZhang ArgoZhang deleted the doc-xml branch March 21, 2026 01:34
@ArgoZhang ArgoZhang restored the doc-xml branch March 21, 2026 01:34
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • In the TableMetadataForAttribute XML comments, the example section now mixes Chinese and English in a single <para> without lang attributes; consider keeping separate <para lang="zh">/<para lang="en"> blocks for clearer localization and consistent rendering tooling.
  • For JSModuleNotInheritedAttribute, you could add a <see cref="JSModuleAutoLoaderAttribute"/> reference in the XML summary (e.g., “does not inherit from ”) to make the relationship more discoverable in IntelliSense.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `TableMetadataForAttribute` XML comments, the example section now mixes Chinese and English in a single `<para>` without `lang` attributes; consider keeping separate `<para lang="zh">`/`<para lang="en">` blocks for clearer localization and consistent rendering tooling.
- For `JSModuleNotInheritedAttribute`, you could add a `<see cref="JSModuleAutoLoaderAttribute"/>` reference in the XML summary (e.g., “does not inherit from <see cref="JSModuleAutoLoaderAttribute"/>”) to make the relationship more discoverable in IntelliSense.

## Individual Comments

### Comment 1
<location path="src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs" line_range="11-13" />
<code_context>
-/// <para lang="en">Example:</para>
-/// <para lang="en">the Pig data type is usually at biz or data layer</para>
-///     <code>
+/// <para>示例:Pig 数据类型通常位于业务层或数据层; Example: the Pig data type is usually at biz or data layer</para>
+/// <code>
 ///     public class Pig
</code_context>
<issue_to_address>
**suggestion:** Avoid mixing languages in a single XML doc paragraph to keep localization clearer.

Previously, zh/en text was split into separate `<para>` elements with `lang` attributes, which is better for localized tooling and for readers. Here both languages are merged into one `<para>` with a semicolon. Please restore separate `<para lang="zh">` and `<para lang="en">` entries so each audience has a clear sentence and tooling can distinguish them.

```suggestion
— We need to split the mixed-language `<para>` into two localized paragraphs, restoring `lang` attributes for tooling and clarity.

/// <example>
/// <para lang="zh">示例:Pig 数据类型通常位于业务层或数据层</para>
/// <para lang="en">Example: the Pig data type is usually at biz or data layer</para>
/// <code>
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 11 to +13
/// <example>
/// <para lang="zh">示例:</para>
/// <para lang="zh">Pig 数据类型通常位于业务层或数据层</para>
/// <para lang="en">Example:</para>
/// <para lang="en">the Pig data type is usually at biz or data layer</para>
/// <code>
/// <para>示例:Pig 数据类型通常位于业务层或数据层; Example: the Pig data type is usually at biz or data layer</para>
/// <code>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Avoid mixing languages in a single XML doc paragraph to keep localization clearer.

Previously, zh/en text was split into separate <para> elements with lang attributes, which is better for localized tooling and for readers. Here both languages are merged into one <para> with a semicolon. Please restore separate <para lang="zh"> and <para lang="en"> entries so each audience has a clear sentence and tooling can distinguish them.

Suggested change
/// <example>
/// <para lang="zh">示例:</para>
/// <para lang="zh">Pig 数据类型通常位于业务层或数据层</para>
/// <para lang="en">Example:</para>
/// <para lang="en">the Pig data type is usually at biz or data layer</para>
/// <code>
/// <para>示例:Pig 数据类型通常位于业务层或数据层; Example: the Pig data type is usually at biz or data layer</para>
/// <code>
We need to split the mixed-language `<para>` into two localized paragraphs, restoring `lang` attributes for tooling and clarity.
/// <example>
/// <para lang="zh">示例:Pig 数据类型通常位于业务层或数据层</para>
/// <para lang="en">Example: the Pig data type is usually at biz or data layer</para>
/// <code>

@ArgoZhang ArgoZhang deleted the doc-xml branch March 21, 2026 01:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates XML documentation comments for a few attribute types to improve clarity/formatting as part of the ongoing component attribute documentation work (fixes #7779).

Changes:

  • Refactors TableMetadataForAttribute XML docs (summary/example/param formatting).
  • Updates JSModuleNotInheritedAttribute summary text to be more descriptive.
  • Reflows JSModuleAutoLoaderAttribute parameter XML docs into a multi-line <param> block.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs Rewrites summary/example XML docs and reformats <param> documentation.
src/BootstrapBlazor/Attributes/JSModuleNotInheritedAttribute.cs Replaces placeholder summary with a descriptive zh/en summary.
src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs Reformats the path parameter XML docs for readability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 11 to +13
/// <example>
/// <para lang="zh">示例:</para>
/// <para lang="zh">Pig 数据类型通常位于业务层或数据层</para>
/// <para lang="en">Example:</para>
/// <para lang="en">the Pig data type is usually at biz or data layer</para>
/// <code>
/// <para>示例:Pig 数据类型通常位于业务层或数据层; Example: the Pig data type is usually at biz or data layer</para>
/// <code>
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

<example> section mixes Chinese and English in a single <para> without lang attributes. This is inconsistent with the rest of the repo’s bilingual XML-doc pattern (separate <para lang="zh"> / <para lang="en">, e.g. Attributes/AutoGenerateColumnAttribute.cs) and makes it harder for tooling/readers to select the right language. Please split these into separate localized <para> entries (and keep the languages separate).

Copilot uses AI. Check for mistakes.
/// <para lang="en">register metadata types in assembly</para>
/// <code>
/// </code>
/// <para>register metadata types in assembly</para>
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

The example text register metadata types in assembly is not localized (no lang attribute, and only English). To keep docs consistent and avoid mixed-language output, please provide both zh/en <para lang=...> entries here as well.

Suggested change
/// <para>register metadata types in assembly</para>
/// <para lang="zh">在程序集中注册元数据类型</para>
/// <para lang="en">Register metadata types in the assembly</para>

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +10
/// <para lang="zh">表示该类不继承 JSModuleAutoLoaderAttribute 的特性</para>
/// <para lang="en">Indicates that this class does not inherit the JSModuleAutoLoaderAttribute</para>
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

The summary text mentions JSModuleAutoLoaderAttribute as plain text. Using <see cref="JSModuleAutoLoaderAttribute"/> here (as done elsewhere in the codebase) would preserve clickable API links in generated docs and avoid drift between the zh/en summaries.

Suggested change
/// <para lang="zh">表示该类不继承 JSModuleAutoLoaderAttribute 的特性</para>
/// <para lang="en">Indicates that this class does not inherit the JSModuleAutoLoaderAttribute</para>
/// <para lang="zh">表示该类不继承 <see cref="JSModuleAutoLoaderAttribute"/> 的特性</para>
/// <para lang="en">Indicates that this class does not inherit the <see cref="JSModuleAutoLoaderAttribute"/>.</para>

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (67410a8) to head (7d607be).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7780   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          764       764           
  Lines        33960     33960           
  Branches      4675      4675           
=========================================
  Hits         33960     33960           
Flag Coverage Δ
BB 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc(Attributes): update components xml comments

2 participants