Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ private static List<AttributeItem> GetAttributeCore(Type type)
/// </summary>
private static string? GetVersion(XDocument? xmlDoc, PropertyInfo property)
{
if (xmlDoc == null) return null;

var memberName = $"P:{property.DeclaringType?.FullName}.{property.Name}";
var memberElement = xmlDoc.Descendants("member")
var memberElement = xmlDoc?.Descendants("member")
.FirstOrDefault(x => x.Attribute("name")?.Value == memberName)
?? _xmlDoc?.Descendants("member")
.FirstOrDefault(x => x.Attribute("name")?.Value == memberName);
Comment on lines 122 to 126
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 extractor (GetVersion) does not follow chains the way GetSummary/FindSummaryElement does, so properties whose XML docs are inherited from an interface/base type will never surface a version even if the referenced member has a tag (e.g., ITableEditDialogOption.ShowConfirmCloseSwal has , but EditDialogOption.ShowConfirmCloseSwal uses ). Consider reusing FindSummaryElement (and its inheritdoc resolution) here before extracting the element.

Copilot uses AI. Check for mistakes.

// 在 summary 节点下查找包含 version 的 para 节点
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <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>
public class CheckboxListSearchMetadata : MultipleSelectSearchMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <summary>
/// <para lang="zh">时间区间搜索元数据类</para>
/// <para lang="en">DateTime range 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>
public class DateTimeRangeSearchMetadata : SearchFormItemMetadataBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <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.
/// </summary>
public class DateTimeSearchMetadata : SearchFormItemMetadataBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace BootstrapBlazor.Components;
/// <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>
public interface ISearchFormItemMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <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>
public class MultipleSelectSearchMetadata : SelectSearchMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <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>
public class MultipleStringSearchMetadata : StringSearchMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <summary>
/// <para lang="zh">数字类型搜索元数据类</para>
/// <para lang="en">Number 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>
public class NumberSearchMetadata : SearchFormItemMetadataBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace BootstrapBlazor.Components;
/// <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>
public abstract class SearchFormItemMetadataBase : ISearchFormItemMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <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>
public class SelectSearchMetadata : StringSearchMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BootstrapBlazor.Components;
/// <summary>
/// <para lang="zh">字符串搜索元数据类</para>
/// <para lang="en">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>
public class StringSearchMetadata : SearchFormItemMetadataBase
{
Expand Down
1 change: 1 addition & 0 deletions src/BootstrapBlazor/Components/Table/ITableColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public interface ITableColumn : IEditorItem
/// <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.
/// </summary>
ISearchFormItemMetadata? SearchFormItemMetadata { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/BootstrapBlazor/Components/Table/Table.razor.Search.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,23 @@ public partial class Table<TItem>
/// <summary>
/// <para lang="zh">获得/设置 是否使用搜索表单 默认为 false 开启本功能后 CustomerSearchTemplate 与 SearchTemplate 均不生效</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>
Comment on lines 119 to 121
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.
[Parameter]
public bool UseSearchForm { get; set; }

/// <summary>
/// <para lang="zh">获得/设置 搜索表单项集合</para>
/// <para lang="en">Gets or sets Search Form Items collection</para>
/// <para>v<version>10.5.0</version></para>
/// </summary>
Comment on lines 127 to 129
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.
[Parameter]
public IEnumerable<ISearchItem>? SearchItems { get; set; }

/// <summary>
/// <para lang="zh">获得/设置 搜索表单本地化配置项</para>
/// <para lang="en">Gets or sets Search Form Localization Options</para>
/// <para>v<version>10.5.0</version></para>
/// </summary>
Comment on lines 135 to 137
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.
[Parameter]
public SearchFormLocalizerOptions? SearchFormLocalizerOptions { get; set; }
Expand Down
Loading