Skip to content

doc(Comments): update components documentation#7741

Merged
ArgoZhang merged 9 commits intomainfrom
doc-misc
Mar 1, 2026
Merged

doc(Comments): update components documentation#7741
ArgoZhang merged 9 commits intomainfrom
doc-misc

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Mar 1, 2026

Link issues

fixes #7740

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 component documentation and samples while fixing a minor CSS builder bug.

Bug Fixes:

  • Correct an internal CssBuilder state flag name to ensure CSS class concatenation works reliably.

Enhancements:

  • Clarify and localize XML documentation for input-related components, layout routing configuration, and logout avatar options.
  • Simplify or remove redundant private XML comments in AutoFill for cleaner internal documentation.

Documentation:

  • Extend the Breadcrumbs sample to include an attribute table for the Breadcrumb component.

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

sourcery-ai bot commented Mar 1, 2026

Reviewer's Guide

Updates XML documentation comments and samples for several components (Input base, AutoFill, OTP input, Layout, Logout, Breadcrumb demo) and fixes a small bug in CssBuilder’s internal state flag, aligning Chinese/English docs and adding an attribute table demo.

Class diagram for updated CssBuilder internal state handling

classDiagram
    class CssBuilder {
        - StringBuilder _builder
        - bool _hasContent
        + CssBuilder()
        + CssBuilder(string value)
        + static CssBuilder Default(string value)
        + static CssBuilder Default()
        + CssBuilder AddClass(string value)
        + CssBuilder AddClass(string value, bool condition)
        + CssBuilder AddClass(string value, Func<bool> condition)
        + CssBuilder AddClassFromAttributes(IDictionary additionalAttributes)
        + CssBuilder AddStyleFromAttributes(IDictionary additionalAttributes)
        + string Build()
    }
Loading

Flow diagram for CssBuilder AddClass and Build behavior

flowchart TD
    A[Create CssBuilder instance] --> B[Call AddClass with value]
    B --> C{value is null or empty?}
    C -- Yes --> D[Do nothing
_keep _hasContent unchanged_]
    C -- No --> E{_hasContent is true?}
    E -- Yes --> F[Append space to _builder]
    E -- No --> G[Set _hasContent to true]
    F --> H[Append value to _builder]
    G --> H[Append value to _builder]
    D --> I[Later call Build]
    H --> I[Later call Build]
    I --> J{_hasContent is true?}
    J -- Yes --> K[Return _builder as string]
    J -- No --> L[Return null]
Loading

File-Level Changes

Change Details Files
Improve and correct XML documentation for the generic Bootstrap input base component.
  • Refine Chinese summaries and property descriptions to be more natural and precise while keeping English text intact.
  • Clarify behavior of focus, text selection, trimming, and keyboard (Enter/Esc) callbacks in property XML docs.
  • Change the input Type member docs from get-only to get/set to match its behavior.
  • Simplify DisposeAsync XML comment to a single tag.
  • Improve method-level summaries for focus, select-all, blur, Enter/Esc JS callbacks, and value parsing.
src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs
Tighten internal private member documentation/noise in AutoFill component backing code.
  • Remove redundant XML-doc comments from purely private helper properties and methods that are self-explanatory from naming.
  • Keep behavior unchanged for CSS class composition, clear-ability logic, and item click handling.
src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs
Clarify OTP input component’s public API documentation.
  • Refine Chinese XML docs for Digits, IsReadonly, Type, and Placeholder to be concise and consistent with English descriptions.
  • Clarify that the value-changed callback is triggered by JavaScript in both language docs.
src/BootstrapBlazor/Components/Input/OtpInput.razor.cs
Fix typo in CssBuilder internal state flag that tracks whether it contains content.
  • Rename private field _hasConent to _hasContent and update all references.
  • Ensure Build() and AddClass() use the corrected flag, preserving existing behavior but improving readability and preventing future confusion.
src/BootstrapBlazor/Utils/CssBuilder.cs
Clarify documentation for additional assemblies in Layout component routing configuration.
  • Rewrite Chinese XML doc for AdditionalAssemblies to clearly explain that these assemblies are searched for URI-matching components.
  • Remove duplicated phrase in the English documentation text.
src/BootstrapBlazor/Components/Layout/Layout.razor.cs
Enhance Breadcrumb sample page documentation.
  • Add an AttributeTable section to the Breadcrumbs demo so users can see component parameters and attributes in the docs UI.
src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor
Clarify Logout component avatar border radius documentation.
  • Refine the Chinese XML summary for AvatarBorderRadius to describe default behavior and meaning of null more clearly while keeping English text the same.
src/BootstrapBlazor/Components/Logout/Logout.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7740 Update and improve the documentation/comments for relevant components (including inline XML documentation and usage samples) as requested in the issue.

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
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 reviewed your changes and they look great!


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
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 improves documentation quality across several BootstrapBlazor components, fixing mixed-language comments (English text embedded in Chinese XML doc comments) and correcting a longstanding field name typo.

Changes:

  • Fixes typo in CssBuilder.cs: _hasConent renamed to _hasContent across all usages
  • Updates XML doc comments from mixed Chinese/English to pure Chinese in zh lang tags for BootstrapInputBase.cs, OtpInput.razor.cs, AutoFill.razor.cs, Layout.razor.cs, and Logout.razor.cs
  • Adds an <AttributeTable> to the Breadcrumbs.razor sample page

Reviewed changes

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

Show a summary per file
File Description
src/BootstrapBlazor/Utils/CssBuilder.cs Fixes _hasConent typo to _hasContent throughout the class
src/BootstrapBlazor/Components/Logout/Logout.razor.cs Fixes Chinese doc that was incorrectly in English
src/BootstrapBlazor/Components/Layout/Layout.razor.cs Fixes Chinese doc that was a duplicate/mix of English
src/BootstrapBlazor/Components/Input/OtpInput.razor.cs Translates mixed-language zh doc comments to pure Chinese
src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs Translates mixed-language zh doc comments to pure Chinese; also changes Type property docs from "Gets" to "Gets or sets" (correct, as the property has a public setter)
src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs Removes XML doc comments from private fields/methods, consistent with codebase convention
src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor Adds <AttributeTable> for the Breadcrumb component

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

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7741   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          750       750           
  Lines        33269     33269           
  Branches      4612      4612           
=========================================
  Hits         33269     33269           
Flag Coverage Δ
BB 100.00% <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 2fbddbd into main Mar 1, 2026
4 checks passed
@ArgoZhang ArgoZhang deleted the doc-misc branch March 1, 2026 03:34
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(Comments): update components documentation

2 participants