Skip to content

doc(Comment): update commnet of components #7596

Merged
ArgoZhang merged 2 commits intomainfrom
doc-xml
Jan 29, 2026
Merged

doc(Comment): update commnet of components #7596
ArgoZhang merged 2 commits intomainfrom
doc-xml

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Jan 29, 2026

Link issues

fixes #7595

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 drag-and-drop and drawer components.

Documentation:

  • Improve bilingual XML comments for DragDropService, documenting properties and lifecycle methods.
  • Update Drawer component summary comment to more clearly describe the drawer UI component.

Copilot AI review requested due to automatic review settings January 29, 2026 06:43
@bb-auto bb-auto Bot added the documentation Improvements or additions to documentation label Jan 29, 2026
@bb-auto bb-auto Bot added this to the v10.2.0 milestone Jan 29, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jan 29, 2026

Reviewer's Guide

Updates XML documentation comments for the DragDropService and Drawer components to improve clarity, bilingual consistency, and property/method descriptions without changing runtime behavior.

File-Level Changes

Change Details Files
Improve DragDropService XML documentation and add method comments.
  • Clarified class-level summary to explicitly name DragDropService in both Chinese and English.
  • Updated property comments (ActiveItem, DragTargetItem, Items, ActiveSpacerId, OldIndex, StateHasChanged) to use consistent 'gets or sets' phrasing in both languages.
  • Added XML documentation summaries for Reset and Commit methods describing their roles in resetting and committing drag-drop state.
src/BootstrapBlazor/Components/DragDrap/DragDropService.cs
Adjust Drawer component XML documentation and remove redundant comments on private computed properties.
  • Refined the class summary Chinese description to specify 'Drawer 抽屉组件' while keeping the English description unchanged.
  • Removed XML documentation comments from private computed properties (ClassString, DrawerStyleString, DrawerClassString) to reduce noise and avoid over-documenting internal implementation details.
src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7595 Update and clarify the documentation/comments for the relevant components to better describe the component and its members.

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 1f79baf into main Jan 29, 2026
7 checks passed
@ArgoZhang ArgoZhang deleted the doc-xml branch January 29, 2026 06:43
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:

  • In DragDropService<T>, the English summary and XML comments refer to it as a "component"; consider renaming this to "service" or "service class" in the comments to better reflect its role and avoid confusion with UI components.
  • The new Reset and Commit method summaries in DragDropService<T> are very generic; expanding them to briefly describe their side effects (e.g., how they manipulate Items, ActiveItem, and indices) would make the documentation more useful to readers.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `DragDropService<T>`, the English summary and XML comments refer to it as a "component"; consider renaming this to "service" or "service class" in the comments to better reflect its role and avoid confusion with UI components.
- The new `Reset` and `Commit` method summaries in `DragDropService<T>` are very generic; expanding them to briefly describe their side effects (e.g., how they manipulate `Items`, `ActiveItem`, and indices) would make the documentation more useful to readers.

## Individual Comments

### Comment 1
<location> `src/BootstrapBlazor/Components/DragDrap/DragDropService.cs:8-11` </location>
<code_context>
-/// <para lang="zh">拖拽服务</para>
-/// <para lang="en">Drag Drop Service</para>
+/// <para lang="zh">DragDropService 拖拽服务</para>
+/// <para lang="en">DragDropService component</para>
 /// </summary>
 /// <typeparam name="T"></typeparam>
</code_context>

<issue_to_address>
**suggestion (typo):** Consider changing the English summary to call this a "service" rather than a "component" for consistency with the class role.

Since this is an internal service (`DragDropService<T>`) rather than a UI component, calling it a “component” in the English XML doc is a bit misleading. Using wording like “DragDropService service” or simply “drag and drop service” would more accurately describe its role.

```suggestion
/// <summary>
/// <para lang="zh">DragDropService 拖拽服务</para>
/// <para lang="en">DragDropService drag and drop service</para>
/// </summary>
```
</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 8 to 11
/// <summary>
/// <para lang="zh">拖拽服务</para>
/// <para lang="en">Drag Drop Service</para>
/// <para lang="zh">DragDropService 拖拽服务</para>
/// <para lang="en">DragDropService component</para>
/// </summary>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion (typo): Consider changing the English summary to call this a "service" rather than a "component" for consistency with the class role.

Since this is an internal service (DragDropService<T>) rather than a UI component, calling it a “component” in the English XML doc is a bit misleading. Using wording like “DragDropService service” or simply “drag and drop service” would more accurately describe its role.

Suggested change
/// <summary>
/// <para lang="zh">拖拽服务</para>
/// <para lang="en">Drag Drop Service</para>
/// <para lang="zh">DragDropService 拖拽服务</para>
/// <para lang="en">DragDropService component</para>
/// </summary>
/// <summary>
/// <para lang="zh">DragDropService 拖拽服务</para>
/// <para lang="en">DragDropService drag and drop service</para>
/// </summary>

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 29, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7596   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          749       749           
  Lines        32988     32988           
  Branches      4578      4578           
=========================================
  Hits         32988     32988           
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.

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 pull request updates documentation comments for components as part of fixing issue #7595. The changes focus on improving bilingual (Chinese and English) XML documentation comments across the codebase.

Changes:

  • Removed XML documentation comments from private property accessors in Drawer.razor.cs (consistent with codebase conventions)
  • Updated Chinese class-level comment in Drawer.razor.cs
  • Enhanced XML comments in DragDropService.cs by adding "获得/设置" (Get/Set) prefix to property comments and added missing method documentation

Reviewed changes

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

File Description
src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs Updated class-level Chinese comment; removed XML comments from private properties ClassString, DrawerStyleString, and DrawerClassString (aligns with codebase pattern)
src/BootstrapBlazor/Components/DragDrap/DragDropService.cs Updated class-level comments; added "获得/设置" prefix to all property comments; added XML documentation for Reset and Commit methods

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


/// <summary>
/// <para lang="zh">Drawer component</para>
/// <para lang="zh">Drawer 抽屉组件</para>
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The Chinese comment has a typo or spacing issue. There's an extra space between "Drawer" and "抽屉组件". It should either be "Drawer抽屉组件" or "Drawer 组件" for consistency. Based on the pattern in DragDropService.cs where the component name is included (e.g., "DragDropService 拖拽服务"), this should likely be "Drawer 组件" to be consistent.

Suggested change
/// <para lang="zh">Drawer 抽屉组件</para>
/// <para lang="zh">Drawer 组件</para>

Copilot uses AI. Check for mistakes.
/// <para lang="zh">拖拽服务</para>
/// <para lang="en">Drag Drop Service</para>
/// <para lang="zh">DragDropService 拖拽服务</para>
/// <para lang="en">DragDropService component</para>
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The English translation appears to be a placeholder. It says "DragDropService component" but should say something like "Drag and Drop Service" or "Drag Drop Service" to properly describe the functionality in English, similar to the original comment.

Suggested change
/// <para lang="en">DragDropService component</para>
/// <para lang="en">Drag and Drop Service</para>

Copilot uses AI. Check for mistakes.
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(Comment): update commnet of components

2 participants