Skip to content

doc(Xml): update component comment#7654

Merged
ArgoZhang merged 8 commits intomainfrom
doc-xml
Feb 11, 2026
Merged

doc(Xml): update component comment#7654
ArgoZhang merged 8 commits intomainfrom
doc-xml

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Feb 11, 2026

Link issues

fixes #7653

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

Align component and layout documentation comments and localization keys, and clean up unused comments and minor code issues.

Enhancements:

  • Switch MainLayout to use a dedicated IStringLocalizer with an UpdateTooltip resource and wire it to the update tooltip button.
  • Remove unused/incorrectly localized Title property and related localization usage from MainLayout.
  • Tidy up internal comments and unused documentation in validation-related code without changing behavior.

Documentation:

  • Standardize XML documentation comments in EditorItem to reference shared interface documentation.
  • Improve English XML comments and summaries in ValidateForm and ExceptionExtensions for clarity and correctness.

Chores:

  • Remove an unnecessary BaseLayout localizer injection from App.razor and minor BOM/license header adjustments.

Copilot AI review requested due to automatic review settings February 11, 2026 06:18
@bb-auto bb-auto bot added the documentation Improvements or additions to documentation label Feb 11, 2026
@bb-auto bb-auto bot added this to the v10.3.0 milestone Feb 11, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Feb 11, 2026

Reviewer's Guide

Refines XML documentation comments across several components, aligns EditorItem properties with their interface contracts, improves validation and exception docstrings, and updates MainLayout localization keys and tooltips to use clearer names and the correct resource type.

Class diagram for updated MainLayout localization fields

classDiagram
class MainLayout {
  -IStringLocalizer_MainLayout Localizer
  -string UpdateTooltip
  -string ChatTooltip
  -string SearchTooltip
  -string ColorModeTooltip
  +void Dispose()
  +void OnInitialized()
}

class IStringLocalizer_MainLayout {
  +string Item(string name)
}

MainLayout ..> IStringLocalizer_MainLayout : uses
Loading

File-Level Changes

Change Details Files
Align EditorItem documentation with IEditorItem/ILookup contracts and tidy member ordering.
  • Move PropertyType property below FieldExpression and document it via cref to IEditorItem.PropertyType while keeping [NotNull].
  • Replace inline bilingual XML summaries on multiple EditorItem properties (Ignore, Readonly, Required, RequiredErrorMessage, SkipValidate, ShowLabelTooltip, Text, Step, Rows, Cols, ComponentType, ComponentParameters, PlaceHolder, Order, Items, Lookup, ShowSearchWhenSelect, IsFixedSearchWhenSelect, IsPopover, LookupStringComparison, LookupServiceKey, LookupServiceData, LookupService, ValidateRules, GroupName, GroupOrder) with references to their corresponding interface members.
  • Reorder the cascading EditorItems property to sit after the other documented properties and keep it private.
  • Update GetDisplayName and GetFieldName XML comments to from IEditorItem.
src/BootstrapBlazor/Components/EditorForm/EditorItem.cs
Clarify ValidateForm comments and remove redundant or misleading documentation and inline comments.
  • Fix English summary for ValidateForm component class and the DisableAutoSubmitFormByEnter parameter description for clarity and grammar.
  • Remove XML comments for the internal validator cache field to avoid leaking implementation details in public docs.
  • Improve the English description for the SetError method’s errorMessage parameter.
  • Strip numerous internal implementation comments inside validation helpers (ValidateDataAnnotations, ValidateProperty, ValidateAsync, OnValidSubmitForm) to reduce noise and keep logic unchanged.
  • Correct XML comments for ValueChangedFields and its obsolete alias, standardizing on ‘Gets the collection of properties whose values have changed in the current form’.
src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs
Fill in and refine ExceptionExtensions XML documentation.
  • Provide meaningful Chinese and English summaries for the ExceptionExtensions class.
  • Clarify both Format overloads’ XML comments, explicitly stating that they format exception information and that one overload returns a MarkupString.
src/BootstrapBlazor/Extensions/ExceptionExtensions.cs
Adjust MainLayout localization usage and tooltip semantics, and clean up layout/localization wiring.
  • Switch injected localizer from IStringLocalizer to IStringLocalizer so layout-specific resources resolve correctly.
  • Rename the Title backing field to UpdateTooltip and initialize it from the corresponding localized string instead of using Title.
  • Change the floating action dial button tooltip in MainLayout.razor to use UpdateTooltip rather than ChatTooltip, better matching the linked wiki icon purpose.
  • Remove the unused BaseLayout localizer injection from App.razor.
  • Normalize BOM/license header line in MainLayout.razor.cs to not include a leading BOM character.
src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor.cs
src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor
src/BootstrapBlazor.Server/Components/App.razor

Assessment against linked issues

Issue Objective Addressed Explanation
#7653 Update the XML documentation comments for the specified component so that the documentation clearly describes the component.
#7653 Add sample code for the specified component (e.g., in XML comments or related documentation) demonstrating how to use it. The PR only updates and refines XML documentation comments and related text; it does not add any sample code snippets or usage examples for the component.

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 left some high level feedback:

  • In MainLayout, since UpdateTooltip is only used to pass a localized string into the tooltip, consider resolving it inline in the razor (Title="@Localizer[nameof(UpdateTooltip)]") and dropping the backing property to simplify the component state.
  • Renaming the localized key from Title to UpdateTooltip in MainLayout changes the resource lookup contract; if existing locale files or other components rely on the old key, consider either preserving the original key name or adding a compatibility alias in the resource files to avoid breaking existing translations.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `MainLayout`, since `UpdateTooltip` is only used to pass a localized string into the tooltip, consider resolving it inline in the razor (`Title="@Localizer[nameof(UpdateTooltip)]"`) and dropping the backing property to simplify the component state.
- Renaming the localized key from `Title` to `UpdateTooltip` in `MainLayout` changes the resource lookup contract; if existing locale files or other components rely on the old key, consider either preserving the original key name or adding a compatibility alias in the resource files to avoid breaking existing translations.

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7654   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          750       750           
  Lines        33186     33185    -1     
  Branches      4605      4605           
=========================================
- Hits         33186     33185    -1     
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 disabled auto-merge February 11, 2026 06:22
@ArgoZhang ArgoZhang merged commit b568e89 into main Feb 11, 2026
10 checks passed
@ArgoZhang ArgoZhang deleted the doc-xml branch February 11, 2026 06:22
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

Updates XML documentation and localization text for several components, including adding localized tooltip strings for the Server MainLayout, aligning documentation with interface members via <inheritdoc>, and cleaning up mixed-language/awkward English in comments.

Changes:

  • Improve/standardize XML docs (zh/en) in ExceptionExtensions and ValidateForm, and switch many EditorItem docs to <inheritdoc cref="...">.
  • Add MainLayout tooltip localization entries in en-US.json/zh-CN.json and use IStringLocalizer<MainLayout> with new UpdateTooltip property.
  • Remove an unused localizer injection from App.razor.

Reviewed changes

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

Show a summary per file
File Description
src/BootstrapBlazor/Extensions/ExceptionExtensions.cs Fills in missing zh/en XML summary text and improves English phrasing.
src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs Cleans up English XML docs and removes some inline comments.
src/BootstrapBlazor/Components/EditorForm/EditorItem.cs Replaces many duplicated XML docs with interface-based <inheritdoc cref="...">.
src/BootstrapBlazor.Server/Locales/zh-CN.json Adds MainLayout tooltip strings (Chat/Update).
src/BootstrapBlazor.Server/Locales/en-US.json Adds MainLayout tooltip strings (Chat/Update).
src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor.cs Switches localizer to IStringLocalizer<MainLayout> and introduces UpdateTooltip.
src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor Uses UpdateTooltip for the update-log/releases link tooltip.
src/BootstrapBlazor.Server/Components/App.razor Removes unused IStringLocalizer<BaseLayout> injection.

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

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(Xml): update component comment

2 participants