Skip to content

doc(Region): update documentation#942

Merged
ArgoZhang merged 3 commits intomasterfrom
dev-region
Mar 7, 2026
Merged

doc(Region): update documentation#942
ArgoZhang merged 3 commits intomasterfrom
dev-region

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Mar 7, 2026

Link issues

fixes #941

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 XML documentation for Region components and services with bilingual (Chinese/English) summaries and parameter descriptions.

Documentation:

  • Add bilingual XML documentation to SelectRegionBase and related Select* components describing their purpose and key parameters.
  • Document IRegionService methods and region data model types (ProvinceItem, CityItem, CountyItem) with clearer descriptions.
  • Clarify the BootstrapBlazor Region service registration extension method documentation.

Copilot AI review requested due to automatic review settings March 7, 2026 08:51
@bb-auto bb-auto bot added the documentation Improvements or additions to documentation label Mar 7, 2026
@bb-auto bb-auto bot added this to the v9.2.0 milestone Mar 7, 2026
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 7, 2026

Reviewer's Guide

Updates XML documentation across the Region components and services to provide clearer, bilingual (Chinese/English) API docs and align comment style with the rest of the codebase, without changing runtime behavior.

File-Level Changes

Change Details Files
Add and normalize bilingual XML documentation for Region-related base components and their UI properties/styles.
  • Convert existing Chinese-only class and property summaries to bilingual and XML comments
  • Clarify descriptions for visual properties such as placeholder text, color, dropdown icon, clear icon, and input/append/clear CSS class builders
  • Document injected services with bilingual descriptions while keeping injection behavior unchanged
src/components/BootstrapBlazor.Region/Components/SelectRegionBase.cs
Improve documentation and clean up XML comment noise for SelectCity component lifecycle and parameters.
  • Convert class and parameter summaries to bilingual XML comments, clarifying defaults and interaction with IsMultiple and AutoClose
  • Remove redundant tags from void/Task-returning overrides and JS-invokable methods
  • Add bilingual documentation for the JS-triggered TriggerSearch method
src/components/BootstrapBlazor.Region/Components/SelectCity.razor.cs
Enhance documentation for Region service contracts and data model records to describe their purpose and members in both Chinese and English.
  • Rewrite IRegionService interface and method summaries into bilingual XML comments describing each data retrieval method and its arguments
  • Add new bilingual XML documentation for ProvinceItem, CityItem, and CountyItem record structs, including property-level descriptions
  • Rename the CountyItem summary from a generic Region description to a specific county-focused description while keeping the type unchanged
src/components/BootstrapBlazor.Region/Services/IRegionService.cs
src/components/BootstrapBlazor.Region/Data/ProvinceItem.cs
src/components/BootstrapBlazor.Region/Data/CityItem.cs
src/components/BootstrapBlazor.Region/Data/CountyItem.cs
Document the Region service DI extension method and Region-related selection components in a consistent bilingual format.
  • Add bilingual XML comments to the AddBootstrapBlazorRegionService extension method explaining its purpose
  • Add bilingual summaries for SelectProvince, SelectRegion, and the IsMultiple parameter, clarifying selection behavior and defaults
src/components/BootstrapBlazor.Region/Extensions/ServiceCollectionExtension.cs
src/components/BootstrapBlazor.Region/Components/SelectProvince.razor.cs
src/components/BootstrapBlazor.Region/Components/SelectRegion.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#941 Improve and update the documentation/comments for Region-related components and services (SelectRegion, SelectProvince, SelectCity, SelectRegionBase, IRegionService, Region data items, and service registration) to clearly describe their purpose and behavior.

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

@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

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/components/BootstrapBlazor.Region/Data/CountyItem.cs" line_range="14-21" />
<code_context>
 {
     /// <summary>
-    /// 城市编码
+    /// <para lang="zh">获得 城市编码</para>
+    /// <para lang="en">Gets the city code</para>
     /// </summary>
     public string Code { get; init; }

     /// <summary>
-    /// 城市名称
+    /// <para lang="zh">获得 城市名称</para>
+    /// <para lang="en">Gets the city name</para>
     /// </summary>
     public string Name { get; init; }
</code_context>
<issue_to_address>
**issue:** The XML documentation refers to city code/name, but this type represents a county item, which may cause confusion.

Since `CountyItem` represents a county, but the XML docs say "城市编码" / "city code" and "城市名称" / "city name", please update the wording to county-level terms (for example, "区县编码" / "county code" and "区县名称" / "county name") to keep the documentation consistent with the type’s meaning.
</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.

@ArgoZhang ArgoZhang merged commit 53cc3e6 into master Mar 7, 2026
4 checks passed
@ArgoZhang ArgoZhang deleted the dev-region branch March 7, 2026 08:52
Copy link

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 the BootstrapBlazor.Region component’s XML documentation (including bilingual zh/en summaries) and bumps the package version, addressing issue #941.

Changes:

  • Convert/expand XML docs to bilingual <para lang="zh"> + <para lang="en"> format across Region services, components, and data models.
  • Clean up/standardize header formatting at file starts.
  • Bump BootstrapBlazor.Region package version from 10.0.1 to 10.0.2.

Reviewed changes

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

Show a summary per file
File Description
src/components/BootstrapBlazor.Region/Services/IRegionService.cs Updates interface XML docs to bilingual zh/en.
src/components/BootstrapBlazor.Region/Extensions/ServiceCollectionExtension.cs Updates extension XML docs to bilingual zh/en.
src/components/BootstrapBlazor.Region/Data/ProvinceItem.cs Adds bilingual docs for ProvinceItem and its properties.
src/components/BootstrapBlazor.Region/Data/CityItem.cs Adds bilingual docs for CityItem and its properties.
src/components/BootstrapBlazor.Region/Data/CountyItem.cs Replaces incorrect summary (“Region 类”) with proper bilingual docs.
src/components/BootstrapBlazor.Region/Components/SelectRegionBase.cs Adds bilingual docs for base component members (some defaults currently documented inaccurately).
src/components/BootstrapBlazor.Region/Components/SelectRegion.razor.cs Updates component summary docs to bilingual zh/en.
src/components/BootstrapBlazor.Region/Components/SelectProvince.razor.cs Updates component/parameter docs to bilingual zh/en.
src/components/BootstrapBlazor.Region/Components/SelectCity.razor.cs Updates component/parameter/method docs to bilingual zh/en and removes empty <returns> tags.
src/components/BootstrapBlazor.Region/BootstrapBlazor.Region.csproj Version bump to 10.0.2.

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

Comment on lines 27 to 33
/// <summary>
/// Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up".
/// <para lang="zh">获得/设置 下拉图标,默认为 fa-solid fa-angle-up</para>
/// <para lang="en">Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up"</para>
/// </summary>
[Parameter]
[NotNull]
public string? DropdownIcon { get; set; }
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

The XML docs claim the default DropdownIcon is the literal CSS class "fa-solid fa-angle-up", but the actual default is resolved at runtime via IconTheme.GetIconByKey(ComponentIcons.SelectDropdownIcon). Please update the docs to reflect the real default behavior (theme key-based), otherwise the documentation will be misleading when icon themes change.

Copilot uses AI. Check for mistakes.
Comment on lines 42 to 48
/// <summary>
/// Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up.
/// <para lang="zh">获得/设置 右侧清空图标,默认为 fa-solid fa-angle-up</para>
/// <para lang="en">Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up</para>
/// </summary>
[Parameter]
[NotNull]
public string? ClearIcon { get; set; }
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

The XML docs claim the default ClearIcon is "fa-solid fa-angle-up", but the actual default is pulled from IconTheme using ComponentIcons.SelectClearIcon. Please align the docs with the implementation (theme key-based default), so consumers don’t hardcode the wrong icon class.

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(Region): update documentation

2 participants