Skip to content

doc(Extensions): update extensions method coments#7838

Merged
ArgoZhang merged 1 commit intomainfrom
doc-comment
Apr 4, 2026
Merged

doc(Extensions): update extensions method coments#7838
ArgoZhang merged 1 commit intomainfrom
doc-comment

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Apr 4, 2026

Link issues

fixes #7837

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

Improve and clarify XML documentation comments for dialog and download extension methods.

Enhancements:

  • Standardize and enrich bilingual XML doc comments for DialogService extension methods, including parameter descriptions and usage of dialog components.
  • Clarify and complete XML documentation for DownloadService extension methods with explicit parameter semantics.
  • Correct and localize DirectoryInfoExtensions summary and parameter documentation for the Copy helper method.

Copilot AI review requested due to automatic review settings April 4, 2026 15:41
@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

Refactors and enriches XML documentation comments for dialog and download-related extension methods, standardizing bilingual (zh/en) parameter docs and clarifying semantics without changing runtime behavior.

File-Level Changes

Change Details Files
Reformat and clarify XML documentation for DialogService extension methods, adding structured bilingual parameter descriptions and consistent dialog semantics.
  • Wraps each element onto multiple lines with nested and blocks for readability and consistency.
  • Clarifies wording for dialog-related parameters such as title, option objects, and dialog component behavior, including defaulting to BootstrapBlazorRoot dialogs.
  • Adds missing Chinese/English descriptions for previously undocumented parameters like dialog, exception, fragment, and configuration callbacks across various dialog helpers.
src/BootstrapBlazor/Extensions/DialogServiceExtensions.cs
Improve XML docs for DownloadService extensions with clearer parameter descriptions and bilingual details.
  • Expands parameter documentation for DownloadService methods to include full zh/en descriptions of the service instance and arguments.
  • Standardizes terminology for file name, stream, folder path, URLs, physical file paths, and byte arrays.
  • Reformats comments to multi-line blocks to match the documentation style used elsewhere.
src/BootstrapBlazor/Extensions/DownloadServiceExtensions.cs
Align DirectoryInfoExtensions documentation with project style and provide bilingual parameter docs for the Copy helper.
  • Corrects the English summary to describe DirectoryInfo as an extensions class and fixes the Chinese description of the copy behavior.
  • Replaces the long English-only remarks block with structured zh/en descriptions on individual parameters.
  • Documents all parameters (dir, destinationDir, recursive) in both languages, clarifying recursive copy semantics.
src/BootstrapBlazor/Extensions/DirectoryInfoExtensions.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7837 Update and improve XML documentation comments for DialogServiceExtensions extension methods, including parameter descriptions in both Chinese and English.
#7837 Update and improve XML documentation comments for DownloadServiceExtensions extension methods, including descriptions for the DownloadService instance and parameters in both Chinese and English.
#7837 Update and improve XML documentation comments for DirectoryInfoExtensions, including the class and Copy method summaries and parameter descriptions in both Chinese and English.

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 3c468b6 into main Apr 4, 2026
5 checks passed
@ArgoZhang ArgoZhang deleted the doc-comment branch April 4, 2026 15:42
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 left some high level feedback:

  • In DownloadServiceExtensions.DownloadFromStreamAsync, the <param name="download"> documentation is still empty while other overloads now describe it; consider adding a matching bilingual description for consistency.
  • The updated XML docs for DirectoryInfoExtensions.Copy dropped the detailed <remarks> and <exception> information about directory creation, recursion, and thrown exceptions; if that behavior remains valid, it would be helpful to keep those details in the comments.
  • In DirectoryInfoExtensions summary, the English text "DirectoryInfo extensions method" is slightly ungrammatical; consider changing it to "DirectoryInfo extension methods" or similar for clarity.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `DownloadServiceExtensions.DownloadFromStreamAsync`, the `<param name="download">` documentation is still empty while other overloads now describe it; consider adding a matching bilingual description for consistency.
- The updated XML docs for `DirectoryInfoExtensions.Copy` dropped the detailed `<remarks>` and `<exception>` information about directory creation, recursion, and thrown exceptions; if that behavior remains valid, it would be helpful to keep those details in the comments.
- In `DirectoryInfoExtensions` summary, the English text "DirectoryInfo extensions method" is slightly ungrammatical; consider changing it to "DirectoryInfo extension methods" or similar for clarity.

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 across several Extensions classes to improve readability and provide clearer bilingual (zh/en) parameter descriptions.

Changes:

  • Reformats <param> XML docs into multi-line blocks with separate zh/en <para> entries.
  • Adds missing zh/en parameter descriptions for several extension methods.
  • Adjusts some English summary text in extension classes.

Reviewed changes

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

File Description
src/BootstrapBlazor/Extensions/DownloadServiceExtensions.cs Reformats parameter XML docs for download helper methods and expands several param descriptions.
src/BootstrapBlazor/Extensions/DirectoryInfoExtensions.cs Updates summary/param XML docs for DirectoryInfo.Copy and adds zh translations, but reduces previously present behavioral documentation.
src/BootstrapBlazor/Extensions/DialogServiceExtensions.cs Reformats and expands parameter XML docs for multiple DialogService extension methods.

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

Comment on lines 20 to +24
/// <param name="download"></param>
/// <param name="downloadFileName"><para lang="zh">文件名</para><para lang="en">File name</para></param>
/// <param name="stream"><para lang="zh">文件流</para><para lang="en">File stream</para></param>
/// <param name="downloadFileName">
/// <para lang="zh">文件名</para>
/// <para lang="en">File name</para>
/// </param>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The XML doc for this overload still leaves the download parameter description empty, while other methods in this class now document it bilingually. Please add a zh/en description for download here as well for consistency and to avoid incomplete generated docs.

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">DirectoryInfo 扩展方法</para>
/// <para lang="en">DirectoryInfo 扩展方法</para>
/// <para lang="en">DirectoryInfo extensions method</para>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

English summary text is grammatically incorrect: "DirectoryInfo extensions method" should be plural and use "extension" (e.g., "DirectoryInfo extension methods").

Suggested change
/// <para lang="en">DirectoryInfo extensions method</para>
/// <para lang="en">DirectoryInfo extension methods</para>

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 17
/// <summary>
/// <para lang="zh">Copies the 内容s of the current directory to a specified destination directory</para>
/// <para lang="zh">将当前目录的内容复制到指定的目标目录</para>
/// <para lang="en">Copies the contents of the current directory to a specified destination directory</para>
/// </summary>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The previous documentation included important behavioral details (destination directory is created if missing, and that a DirectoryNotFoundException is thrown when the source directory doesn’t exist). Those details are no longer documented. Please re-add this information via and an tag (preferably with zh/en content).

Copilot uses AI. Check for mistakes.
@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 (be9a680) to head (54366fc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7838   +/-   ##
=========================================
  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.

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 extensions method coments

2 participants