Skip to content

doc(Table): add UseSearch parameter version para#7810

Merged
ArgoZhang merged 3 commits intomainfrom
doc-version
Mar 28, 2026
Merged

doc(Table): add UseSearch parameter version para#7810
ArgoZhang merged 3 commits intomainfrom
doc-version

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Mar 28, 2026

Link issues

fixes #7809

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

Document table search form parameters and search metadata with version information and improve XML documentation version lookup resilience.

Bug Fixes:

  • Prevent GetVersion from failing when the primary XML documentation source is null by falling back to a secondary cache.

Documentation:

  • Annotate table search form parameters and search metadata types with version 10.5.0 in XML documentation comments.

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

sourcery-ai bot commented Mar 28, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Annotates new and existing search-related table and search metadata APIs with version 10.5.0 in XML documentation and makes the component attribute cache more robust by falling back to a global XML documentation cache when a local document is unavailable.

Sequence diagram for ComponentAttributeCacheService GetVersion XML lookup fallback

sequenceDiagram
    participant Caller
    participant ComponentAttributeCacheService
    participant xmlDoc
    participant GlobalXmlDoc as _xmlDoc

    Caller->>ComponentAttributeCacheService: GetVersion(xmlDoc, property)
    ComponentAttributeCacheService->>ComponentAttributeCacheService: memberName = P:DeclaringType.FullName.PropertyName

    ComponentAttributeCacheService->>xmlDoc: Descendants(member)
    alt xmlDoc contains member
        xmlDoc-->>ComponentAttributeCacheService: memberElement
    else xmlDoc is null or does not contain member
        ComponentAttributeCacheService->>GlobalXmlDoc: Descendants(member)
        GlobalXmlDoc-->>ComponentAttributeCacheService: memberElement (fallback)
    end

    ComponentAttributeCacheService-->>Caller: version extracted from memberElement
Loading

Class diagram for updated search metadata types and table column search metadata

classDiagram
    direction LR

    class ISearchFormItemMetadata {
    }

    class SearchFormItemMetadataBase {
        <<abstract>>
    }

    class StringSearchMetadata {
    }

    class SelectSearchMetadata {
    }

    class MultipleSelectSearchMetadata {
    }

    class MultipleStringSearchMetadata {
    }

    class NumberSearchMetadata {
    }

    class DateTimeSearchMetadata {
    }

    class DateTimeRangeSearchMetadata {
    }

    class CheckboxListSearchMetadata {
    }

    class IEditorItem {
    }

    class ITableColumn {
        ISearchFormItemMetadata SearchFormItemMetadata
    }

    SearchFormItemMetadataBase ..|> ISearchFormItemMetadata
    StringSearchMetadata --|> SearchFormItemMetadataBase
    SelectSearchMetadata --|> StringSearchMetadata
    MultipleSelectSearchMetadata --|> SelectSearchMetadata
    MultipleStringSearchMetadata --|> StringSearchMetadata
    NumberSearchMetadata --|> SearchFormItemMetadataBase
    DateTimeSearchMetadata --|> SearchFormItemMetadataBase
    DateTimeRangeSearchMetadata --|> SearchFormItemMetadataBase
    CheckboxListSearchMetadata --|> MultipleSelectSearchMetadata

    ITableColumn ..|> IEditorItem
Loading

File-Level Changes

Change Details Files
Improve XML documentation version extraction to support a global fallback document.
  • Remove early null-return on the XML document parameter in GetVersion
  • Change member lookup to use the nullable xmlDoc parameter if present
  • Add fallback lookup using the static _xmlDoc cache when the parameter is null
src/BootstrapBlazor.Server/Services/ComponentAttributeCacheService.cs
Document the introduction version (10.5.0) for table UseSearchForm parameters and related search form metadata types.
  • Add version para tag to UseSearchForm-related parameters on Table
  • Annotate ISearchFormItemMetadata and concrete search metadata classes with version 10.5.0 in XML comments
  • Ensure the table column SearchFormItemMetadata property is tagged with version 10.5.0
src/BootstrapBlazor/Components/Table/Table.razor.Search.cs
src/BootstrapBlazor/Components/Searches/CheckboxListSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/DateTimeRangeSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/DateTimeSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/ISearchFormItemMetadata.cs
src/BootstrapBlazor/Components/Searches/MultipleSelectSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/MultipleStringSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/NumberSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/SearchFormItemMetadataBase.cs
src/BootstrapBlazor/Components/Searches/SelectSearchMetadata.cs
src/BootstrapBlazor/Components/Searches/StringSearchMetadata.cs
src/BootstrapBlazor/Components/Table/ITableColumn.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7809 Add XML documentation version tags for the Table UseSearch-related parameters (e.g., UseSearchForm, SearchItems, SearchFormLocalizerOptions) and associated search metadata types so their introduction version is documented.

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 b1ec468 into main Mar 28, 2026
4 checks passed
@ArgoZhang ArgoZhang deleted the doc-version branch March 28, 2026 08:51
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:

  • The XML doc version annotations are inconsistent (most use <para>v<version>10.5.0</version></para> while CheckboxListSearchMetadata uses <para version="10.5.0"/>); align these to a single format that matches what GetVersion actually parses.
  • In GetVersion, the new fallback to _xmlDoc changes behavior from "no XML => null" to "no XML => check global cache"; if this is intended, consider adding a brief comment explaining the precedence between the passed-in xmlDoc and _xmlDoc for future maintainers.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The XML doc version annotations are inconsistent (most use `<para>v<version>10.5.0</version></para>` while `CheckboxListSearchMetadata` uses `<para version="10.5.0"/>`); align these to a single format that matches what `GetVersion` actually parses.
- In `GetVersion`, the new fallback to `_xmlDoc` changes behavior from "no XML => null" to "no XML => check global cache"; if this is intended, consider adding a brief comment explaining the precedence between the passed-in `xmlDoc` and `_xmlDoc` for future maintainers.

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 Mar 28, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7810   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          764       764           
  Lines        34128     34128           
  Branches      4697      4697           
=========================================
  Hits         34128     34128           
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

Adds XML documentation version annotations for Table search-form–related APIs and updates server-side XML doc parsing to surface those versions in the component attribute cache (fixes #7809).

Changes:

  • Add <para>...<version>10.5.0</version>...</para> version entries to Table search-form parameters and search metadata types.
  • Add a version entry to ITableColumn.SearchFormItemMetadata.
  • Update ComponentAttributeCacheService.GetVersion to look up members from either an extension XML doc or the BootstrapBlazor XML doc.

Reviewed changes

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

Show a summary per file
File Description
src/BootstrapBlazor/Components/Table/Table.razor.Search.cs Adds version paras for UseSearchForm, SearchItems, SearchFormLocalizerOptions.
src/BootstrapBlazor/Components/Table/ITableColumn.cs Adds version para for SearchFormItemMetadata.
src/BootstrapBlazor/Components/Searches/SearchFormItemMetadataBase.cs Adds version para to the base search-metadata type docs.
src/BootstrapBlazor/Components/Searches/ISearchFormItemMetadata.cs Adds version para to the search-metadata interface docs.
src/BootstrapBlazor/Components/Searches/StringSearchMetadata.cs Adds version para to string search-metadata docs.
src/BootstrapBlazor/Components/Searches/SelectSearchMetadata.cs Adds version para to select search-metadata docs.
src/BootstrapBlazor/Components/Searches/NumberSearchMetadata.cs Adds version para to number search-metadata docs.
src/BootstrapBlazor/Components/Searches/DateTimeSearchMetadata.cs Adds version para to DateTime search-metadata docs.
src/BootstrapBlazor/Components/Searches/DateTimeRangeSearchMetadata.cs Adds version para to DateTime range search-metadata docs.
src/BootstrapBlazor/Components/Searches/MultipleStringSearchMetadata.cs Adds version para to multiple-string search-metadata docs.
src/BootstrapBlazor/Components/Searches/MultipleSelectSearchMetadata.cs Adds version para to multiple-select search-metadata docs.
src/BootstrapBlazor/Components/Searches/CheckboxListSearchMetadata.cs Adds a version marker (but with a different XML shape than the other files).
src/BootstrapBlazor.Server/Services/ComponentAttributeCacheService.cs Adjusts version lookup to use either the extension XML doc or the BootstrapBlazor XML doc.

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

/// <summary>
/// <para lang="zh">选择类型搜索元数据类</para>
/// <para lang="en">Select type search metadata class</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This file uses "v..." for the version para, but elsewhere the codebase uses x.y.z (e.g., EditDialog.razor.cs). Consider removing the leading "v" to keep the XML doc format consistent.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">多选类型搜索元数据类</para>
/// <para lang="en">Multiple select type search metadata class</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This file uses "v..." for the version para, but elsewhere the codebase uses x.y.z (e.g., EditDialog.razor.cs). Consider removing the leading "v" to keep the XML doc format consistent.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">搜索元数据基类</para>
/// <para lang="en">Search meta data base class</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This file uses "v..." for the version para, but elsewhere the codebase uses x.y.z (e.g., EditDialog.razor.cs). Consider removing the leading "v" to keep the XML doc format consistent.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">多个字符串搜索元数据类</para>
/// <para lang="en">Multiple string search meta data class</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This file uses "v..." for the version para, but elsewhere the codebase uses x.y.z (e.g., EditDialog.razor.cs). Consider removing the leading "v" to keep the XML doc format consistent.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">搜索元数据接口</para>
/// <para lang="en">Search metadata interface</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This file uses "v..." for the version para, but elsewhere the codebase uses x.y.z (e.g., EditDialog.razor.cs). Consider removing the leading "v" to keep the XML doc format consistent.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">CheckboxList 搜索类型元数据类</para>
/// <para lang="en">CheckboxList search meta data class</para>
/// <para version="10.5.0"/>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

The version para here uses a different XML shape () than the rest of the codebase and than what ComponentAttributeCacheService.GetVersion looks for (...). As written, this likely won’t be discoverable by tooling and also won’t render any text in summaryElement.Value fallback paths. Consider switching to the standard element inside the para.

Suggested change
/// <para version="10.5.0"/>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">时间搜索元数据类</para>
/// <para lang="en">DateTime search meta data class</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This file uses "v..." for the version para, but elsewhere the codebase uses x.y.z (e.g., EditDialog.razor.cs). Consider removing the leading "v" to keep the XML doc format consistent.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></para>

Copilot uses AI. Check for mistakes.
Comment on lines 119 to 121
/// <para lang="en">Gets or sets Whether to use search form. Default false. When enabled, both CustomerSearchTemplate and SearchTemplate are disabled</para>
/// <para>v<version>10.5.0</version></para>
/// </summary>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

In this repo, version annotations in XML docs appear to use the pattern x.y.z (see EditDialog.razor.cs). Using "v..." is inconsistent and may end up rendering as "v10.5.0" in any consumer that uses summaryElement.Value. Consider removing the leading "v" and keeping only the element inside the para.

Copilot uses AI. Check for mistakes.
Comment on lines 135 to 137
/// <para lang="en">Gets or sets Search Form Localization Options</para>
/// <para>v<version>10.5.0</version></para>
/// </summary>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

In this repo, version annotations in XML docs appear to use the pattern x.y.z (see EditDialog.razor.cs). Using "v..." is inconsistent and may end up rendering as "v10.5.0" in any consumer that uses summaryElement.Value. Consider removing the leading "v" and keeping only the element inside the para.

Copilot uses AI. Check for mistakes.
/// <summary>
/// <para lang="zh">获得/设置 搜索元数据</para>
/// <para lang="en">Gets or sets the search metadata</para>
/// <para>v<version>10.5.0</version></para>
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

In this repo, version annotations in XML docs appear to use the pattern x.y.z (see EditDialog.razor.cs). Using "v..." here is inconsistent; consider dropping the leading "v" so the version para matches the established format.

Suggested change
/// <para>v<version>10.5.0</version></para>
/// <para><version>10.5.0</version></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(Table): add UseSearch parameter version para

2 participants