doc(Table): add UseSearch parameter version para#7810
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAnnotates 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 fallbacksequenceDiagram
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
Class diagram for updated search metadata types and table column search metadataclassDiagram
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
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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>whileCheckboxListSearchMetadatauses<para version="10.5.0"/>); align these to a single format that matches whatGetVersionactually parses. - In
GetVersion, the new fallback to_xmlDocchanges 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-inxmlDocand_xmlDocfor 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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.GetVersionto 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> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
| /// <summary> | ||
| /// <para lang="zh">多选类型搜索元数据类</para> | ||
| /// <para lang="en">Multiple select type search metadata class</para> | ||
| /// <para>v<version>10.5.0</version></para> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
| /// <summary> | ||
| /// <para lang="zh">搜索元数据基类</para> | ||
| /// <para lang="en">Search meta data base class</para> | ||
| /// <para>v<version>10.5.0</version></para> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
| /// <summary> | ||
| /// <para lang="zh">多个字符串搜索元数据类</para> | ||
| /// <para lang="en">Multiple string search meta data class</para> | ||
| /// <para>v<version>10.5.0</version></para> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
| /// <summary> | ||
| /// <para lang="zh">搜索元数据接口</para> | ||
| /// <para lang="en">Search metadata interface</para> | ||
| /// <para>v<version>10.5.0</version></para> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
| /// <summary> | ||
| /// <para lang="zh">CheckboxList 搜索类型元数据类</para> | ||
| /// <para lang="en">CheckboxList search meta data class</para> | ||
| /// <para version="10.5.0"/> |
There was a problem hiding this comment.
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.
| /// <para version="10.5.0"/> | |
| /// <para><version>10.5.0</version></para> |
| /// <summary> | ||
| /// <para lang="zh">时间搜索元数据类</para> | ||
| /// <para lang="en">DateTime search meta data class</para> | ||
| /// <para>v<version>10.5.0</version></para> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
| /// <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> |
There was a problem hiding this comment.
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.
| /// <para lang="en">Gets or sets Search Form Localization Options</para> | ||
| /// <para>v<version>10.5.0</version></para> | ||
| /// </summary> |
There was a problem hiding this comment.
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.
| /// <summary> | ||
| /// <para lang="zh">获得/设置 搜索元数据</para> | ||
| /// <para lang="en">Gets or sets the search metadata</para> | ||
| /// <para>v<version>10.5.0</version></para> |
There was a problem hiding this comment.
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.
| /// <para>v<version>10.5.0</version></para> | |
| /// <para><version>10.5.0</version></para> |
Link issues
fixes #7809
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Document table search form parameters and search metadata with version information and improve XML documentation version lookup resilience.
Bug Fixes:
Documentation: