Skip to content

doc(Extensions): update Drawer extensions method comments#7840

Merged
ArgoZhang merged 4 commits intomainfrom
doc-xml
Apr 5, 2026
Merged

doc(Extensions): update Drawer extensions method comments#7840
ArgoZhang merged 4 commits intomainfrom
doc-xml

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Apr 4, 2026

Link issues

fixes #7839

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

Clarify XML documentation for dynamic object and drawer-related extension methods by adding detailed bilingual parameter descriptions.

Documentation:

  • Improve XML comments for DynamicObjectContext extension methods with explicit Chinese and English parameter descriptions.
  • Document DrawerService and Drawer-related extension method parameters, including component types, parameter dictionaries, and option instances, in both Chinese and English.

Copilot AI review requested due to automatic review settings April 4, 2026 15:49
@bb-auto bb-auto bot added the documentation Improvements or additions to documentation label Apr 4, 2026
@bb-auto bb-auto bot added this to the v10.5.0 milestone Apr 4, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Apr 4, 2026

Reviewer's Guide

Updates XML documentation comments for several extension methods related to DynamicObjectContext and Drawer components, providing clearer bilingual parameter descriptions without changing runtime behavior.

File-Level Changes

Change Details Files
Clarified XML documentation for DynamicObjectContext attribute-related extension methods.
  • Expanded param tags for AddRequiredAttribute to describe context, columnName, errorMessage, and allowEmptyStrings in Chinese and English.
  • Documented parameters for AddAutoGenerateColumnAttribute and AddDisplayAttribute as dictionaries of attribute parameters.
  • Documented shared AddMultipleParameterAttribute and AddAttribute generic helpers with detailed descriptions of constructor and property parameter arrays.
  • Reformatted SetValue XML docs into multiline bilingual param descriptions.
src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs
Improved XML documentation for DrawerService-related extension methods.
  • Refined Show documentation to explain DrawerService, DrawerOption, and component parameters dictionary.
  • Updated non-generic Show overload docs to describe the component Type and parameters dictionary in both languages.
  • Reformatted DrawerExtensions.ShowEditDrawer documentation into multiline bilingual parameter blocks.
src/BootstrapBlazor/Extensions/DrawerServiceExtensions.cs
src/BootstrapBlazor/Extensions/DrawerExtensions.cs
Documented DrawerOptionExtensions GetContent parameter.
  • Added bilingual description for the drawerOption parameter as a DrawerOption instance.
src/BootstrapBlazor/Extensions/DrawerOptionExtensions.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7839 Update XML documentation comments for Drawer-related extension methods (DrawerServiceExtensions, DrawerExtensions, DrawerOptionExtensions) to clearly describe the involved components and parameters.
#7839 Ensure the updated Drawer extensions documentation is provided in both Chinese and English for all relevant parameters.

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

Copy link
Copy Markdown
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:

  • For parameters that are optional or nullable (e.g., errorMessage, parameters, option, propertyInfos, propertyValues), consider explicitly calling out in the XML comments that they are optional and/or may be null to make the API behavior clearer to consumers.
  • In DrawerServiceExtensions.Show<TComponent> and the non-generic Show, you might want to mention that when option is null a new DrawerOption is created internally, so callers understand that passing null is equivalent to using default drawer options.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- For parameters that are optional or nullable (e.g., `errorMessage`, `parameters`, `option`, `propertyInfos`, `propertyValues`), consider explicitly calling out in the XML comments that they are optional and/or may be null to make the API behavior clearer to consumers.
- In `DrawerServiceExtensions.Show<TComponent>` and the non-generic `Show`, you might want to mention that when `option` is null a new `DrawerOption` is created internally, so callers understand that passing null is equivalent to using default drawer options.

## Individual Comments

### Comment 1
<location path="src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs" line_range="166-173" />
<code_context>
+    ///   <para lang="zh">列名</para>
+    ///   <para lang="en">Column name</para>
+    /// </param>
+    /// <param name="types">
+    ///   <para lang="zh">构造函数参数类型数组</para>
+    ///   <para lang="en">Array of constructor parameter types</para>
+    /// </param>
+    /// <param name="constructorArgs">
</code_context>
<issue_to_address>
**suggestion:** Clarify that the `types` and `constructorArgs` arrays should be aligned in order and length.

For `AddAttribute<TAttribute>`, the docs for `types` and `constructorArgs` should explicitly say that each entry corresponds positionally and that the arrays must have the same length, matching how they’re used with `GetConstructor`/`Invoke`. This helps prevent subtle runtime errors from mismatched arguments.

```suggestion
    /// <param name="types">
    ///   <para lang="zh">
    ///     构造函数参数类型数组。该数组必须与 <paramref name="constructorArgs"/> 在长度和顺序上保持一致,
    ///     每个索引位置的类型与对应位置的参数值一一对应,用于构造函数匹配(GetConstructor)和调用(Invoke)。
    ///   </para>
    ///   <para lang="en">
    ///     Array of constructor parameter types. This array must have the same length and positional order
    ///     as <paramref name="constructorArgs"/>, where each index corresponds to the type of the argument
    ///     value at the same position, for constructor resolution (GetConstructor) and invocation (Invoke).
    ///   </para>
    /// </param>
    /// <param name="constructorArgs">
    ///   <para lang="zh">
    ///     构造函数参数值数组。该数组必须与 <paramref name="types"/> 在长度和顺序上保持一致,
    ///     每个索引位置的参数值与对应位置的类型一一对应,用于构造函数匹配(GetConstructor)和调用(Invoke)。
    ///   </para>
    ///   <para lang="en">
    ///     Array of constructor parameter values. This array must have the same length and positional order
    ///     as <paramref name="types"/>, where each index corresponds to the value for the type at the same
    ///     position, for constructor resolution (GetConstructor) and invocation (Invoke).
    ///   </para>
    /// </param>
```
</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.

Copy link
Copy Markdown
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

This PR updates XML documentation comments for several extension methods, primarily around Drawer-related extensions, to provide more detailed bilingual parameter descriptions.

Changes:

  • Expanded <param> documentation blocks for DrawerServiceExtensions and DrawerExtensions methods.
  • Added/standardized <param> documentation in DrawerOptionExtensions.
  • Expanded <param> documentation across several methods in DynamicObjectContextExtensions.

Reviewed changes

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

File Description
src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs Expands XML <param> docs for DynamicObjectContext-related extension methods.
src/BootstrapBlazor/Extensions/DrawerServiceExtensions.cs Expands XML <param> docs for DrawerService Show overloads.
src/BootstrapBlazor/Extensions/DrawerOptionExtensions.cs Adds detailed <param> docs for DrawerOption.GetContent.
src/BootstrapBlazor/Extensions/DrawerExtensions.cs Expands XML <param> docs for ShowEditDrawer.

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

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7840   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          764       764           
  Lines        34165     34165           
  Branches      4704      4704           
=========================================
  Hits         34165     34165           
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.

@ArgoZhang ArgoZhang merged commit 04cff2b into main Apr 5, 2026
10 checks passed
@ArgoZhang ArgoZhang deleted the doc-xml branch April 5, 2026 02:20
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(Extensions): update Drawer extensions method comments

2 participants