-
-
Notifications
You must be signed in to change notification settings - Fork 382
doc(AttributeTable): support base type parameter #7554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,5 +8,6 @@ | |
| } | ||
|
|
||
| .table-attr-mark { | ||
| font-size: 90%; | ||
| font-size: 85%; | ||
| color: var(--bs-success); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -60,7 +60,9 @@ private static List<AttributeItem> GetAttributeCore(Type type) | |||||||||||||||||||
| { | ||||||||||||||||||||
| if (xmlDoc == null) return null; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| var memberName = $"P:{property.DeclaringType?.FullName}.{property.Name}"; | ||||||||||||||||||||
| var type = property.DeclaringType ?? property.PropertyType; | ||||||||||||||||||||
|
||||||||||||||||||||
| var type = property.DeclaringType ?? property.PropertyType; | |
| // DeclaringType is required to build the correct XML documentation member name. | |
| // If it is null, we cannot reliably locate the summary, so return null instead | |
| // of falling back to PropertyType (which represents the value type, not the owner). | |
| var type = property.DeclaringType; | |
| if (type == null) | |
| { | |
| return null; | |
| } |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback construction $"BootstrapBlazor.Components.{type.Name}" when type.FullName is null may not produce accurate member names for XML documentation lookup. This assumes all types without a FullName belong to the BootstrapBlazor.Components namespace, which may not always be true.
FullName can be null for generic type parameters and some special types. For generic types, you might want to handle them differently. Consider adding validation or a comment explaining which types are expected to have null FullName and why this fallback is appropriate for those specific cases.
| var typeName = type.FullName ?? $"BootstrapBlazor.Components.{type.Name}"; | |
| var typeName = type.FullName; | |
| // FullName can be null for generic type parameters and some special types. | |
| // In such cases we skip XML documentation lookup instead of fabricating a namespace, | |
| // as that may not produce an accurate member name. | |
| if (string.IsNullOrEmpty(typeName)) | |
| { | |
| return null; | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,13 +15,13 @@ namespace BootstrapBlazor.Components; | |||||||||||||
| public abstract class DisplayBase<TValue> : BootstrapModuleComponentBase | ||||||||||||||
| { | ||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">是否显示 标签</para> | ||||||||||||||
| /// <para lang="zh">是否显示标签</para> | ||||||||||||||
| /// <para lang="en">Whether to Show Label</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| protected bool IsShowLabel { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得 the <see cref="FieldIdentifier"/> for the bound value.</para> | ||||||||||||||
| /// <para lang="zh">获得绑定值的 <see cref="FieldIdentifier"/>。</para> | ||||||||||||||
| /// <para lang="en">Gets the <see cref="FieldIdentifier"/> for the bound value.</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| protected FieldIdentifier? FieldIdentifier { get; set; } | ||||||||||||||
|
|
@@ -40,7 +40,7 @@ public abstract class DisplayBase<TValue> : BootstrapModuleComponentBase | |||||||||||||
| protected Type? ValueType { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得/设置 the value of the input. This should be used with two-way binding.</para> | ||||||||||||||
| /// <para lang="zh">获得/设置 输入组件的值,支持双向绑定。</para> | ||||||||||||||
| /// <para lang="en">Gets or sets the value of the input. This should be used with two-way binding.</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| /// <example> | ||||||||||||||
|
|
@@ -51,28 +51,28 @@ public abstract class DisplayBase<TValue> : BootstrapModuleComponentBase | |||||||||||||
| public TValue? Value { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得/设置 a 回调 that updates the bound value.</para> | ||||||||||||||
| /// <para lang="zh">获得/设置 用于更新绑定值的回调。</para> | ||||||||||||||
| /// <para lang="en">Gets or sets a callback that updates the bound value.</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [Parameter] | ||||||||||||||
| public EventCallback<TValue?> ValueChanged { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得/设置 an expression that identifies the bound value.</para> | ||||||||||||||
| /// <para lang="zh">获得/设置 标识绑定值的表达式。</para> | ||||||||||||||
| /// <para lang="en">Gets or sets an expression that identifies the bound value.</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [Parameter] | ||||||||||||||
| public Expression<Func<TValue?>>? ValueExpression { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得/设置 是否显示前置标签 默认值为 null 为空时默认不显示标签</para> | ||||||||||||||
| /// <para lang="zh">获得/设置 是否显示前置标签,默认值为 null,为空时不显示标签</para> | ||||||||||||||
| /// <para lang="en">Gets or sets Whether to Show Label. Default is null, not show label when null</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [Parameter] | ||||||||||||||
| public bool? ShowLabel { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得/设置 是否显示 Tooltip 多用于文字过长导致裁减时使用 默认 null</para> | ||||||||||||||
| /// <para lang="zh">获得/设置 是否显示 Tooltip,多用于文字过长导致裁剪时使用,默认 null</para> | ||||||||||||||
| /// <para lang="en">Gets or sets Whether to Show Tooltip. Default is null</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [Parameter] | ||||||||||||||
|
|
@@ -93,29 +93,28 @@ public abstract class DisplayBase<TValue> : BootstrapModuleComponentBase | |||||||||||||
| protected ValidateForm? ValidateForm { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得 IShowLabel 实例</para> | ||||||||||||||
| /// <para lang="en">Get IShowLabel Instance</para> | ||||||||||||||
| /// <para lang="zh">获得 <see cref="IShowLabel"/> 实例</para> | ||||||||||||||
| /// <para lang="en">Get <see cref="IShowLabel"/> Instance</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [CascadingParameter(Name = "EditorForm")] | ||||||||||||||
| protected IShowLabel? EditorForm { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得 InputGroup 实例</para> | ||||||||||||||
| /// <para lang="en">Get InputGroup Instance</para> | ||||||||||||||
| /// <para lang="zh">获得 <see cref="BootstrapInputGroup"/> 实例</para> | ||||||||||||||
| /// <para lang="en">Get <see cref="BootstrapInputGroup"/> Instance</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [CascadingParameter] | ||||||||||||||
| protected BootstrapInputGroup? InputGroup { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">获得 IFilter 实例</para> | ||||||||||||||
| /// <para lang="en">Get IFilter Instance</para> | ||||||||||||||
| /// <para lang="zh">获得 <see cref="IFilter"/> 实例</para> | ||||||||||||||
| /// <para lang="en">Get <see cref="IFilter"/> Instance</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| [CascadingParameter] | ||||||||||||||
| protected IFilter? Filter { get; set; } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">SetParametersAsync 方法</para> | ||||||||||||||
| /// <para lang="en">SetParametersAsync Method</para> | ||||||||||||||
| /// <inheritdoc/> | ||||||||||||||
| /// </summary> | ||||||||||||||
| /// <param name="parameters"></param> | ||||||||||||||
| public override Task SetParametersAsync(ParameterView parameters) | ||||||||||||||
|
|
@@ -135,8 +134,7 @@ public override Task SetParametersAsync(ParameterView parameters) | |||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /// <summary> | ||||||||||||||
| /// <para lang="zh">OnParametersSet 方法</para> | ||||||||||||||
| /// <para lang="en">OnParametersSet Method</para> | ||||||||||||||
| /// <inheritdoc/> | ||||||||||||||
| /// </summary> | ||||||||||||||
| protected override void OnParametersSet() | ||||||||||||||
| { | ||||||||||||||
|
|
@@ -185,7 +183,6 @@ protected override void OnParametersSet() | |||||||||||||
| /// <para lang="en">Format Value to String Method</para> | ||||||||||||||
| /// </summary> | ||||||||||||||
| /// <param name="value">The value to format.</param> | ||||||||||||||
|
||||||||||||||
| /// <param name="value">The value to format.</param> | |
| /// <param name="value">The value to format.</param> | |
| /// <returns> | |
| /// <para lang="zh">值的字符串表示形式。</para> | |
| /// <para lang="en">A string representation of the value.</para> | |
| /// </returns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of
SkipUnchangedFiles="true"and theConditionattribute from the Copy task may cause unnecessary file copying on every build, potentially slowing down build times. The original attributes were performance optimizations:SkipUnchangedFiles="true"avoids copying files that haven't changedConditionprevents errors when files don't existUnless there's a specific reason these optimizations are causing issues (such as stale documentation not being updated), consider keeping them. If they must be removed to fix the issue mentioned in #7553, please add a comment explaining why.