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
22 changes: 9 additions & 13 deletions src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,50 @@ namespace BootstrapBlazor.Components;

/// <summary>
/// <para lang="zh">Marquee 字幕滚动组件</para>
/// <para lang="en">Marquee 字幕滚动component</para>
/// <para lang="en">Marquee scrolling component</para>
/// </summary>
public partial class Marquee
{
/// <summary>
/// <para lang="zh">获得/设置 组件值 显示文本 默认 Empty</para>
/// <para lang="en">Gets or sets component值 display文本 Default is Empty</para>
/// <para lang="en">Gets or sets the component's display text. Default is Empty.</para>
/// </summary>
[Parameter]
public string? Text { get; set; }

/// <summary>
/// <para lang="zh">获得/设置 组件值 文本颜色 默认 #000 <para>支持16进制和颜色名称</para>
///</para>
/// <para lang="en">Gets or sets component值 文本color Default is #000 <para>支持16进制和color名称</para>
///</para>
/// <para lang="zh">获得/设置 组件值 文本颜色 默认 #000 支持16进制和颜色名称</para>
/// <para lang="en">Gets or sets the component's text color. Default is #000 Supports hexadecimal and color names</para>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick (typo): Minor grammar issue in the English description of the text color parameter.

Add punctuation to clearly separate the default value from the capability description, e.g. Default is #000. Supports hexadecimal and color names.

Suggested change
/// <para lang="en">Gets or sets the component's text color. Default is #000 Supports hexadecimal and color names</para>
/// <para lang="en">Gets or sets the component's text color. Default is #000. Supports hexadecimal and color names.</para>

/// </summary>
Comment on lines 21 to 24
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

In the English doc text for Color, there’s a missing sentence separator: "Default is #000 Supports..." reads as two sentences but lacks punctuation. Consider adding a period or rewriting so generated docs read cleanly.

Copilot uses AI. Check for mistakes.
[Parameter]
public string Color { get; set; } = "#000";

/// <summary>
/// <para lang="zh">获得/设置 组件值 背景颜色 默认 #fff <para>支持16进制和颜色名称</para>
///</para>
/// <para lang="en">Gets or sets component值 背景color Default is #fff <para>支持16进制和color名称</para>
///</para>
/// <para lang="zh">获得/设置 组件值 背景颜色 默认 #fff 支持16进制和颜色名称</para>
/// <para lang="en">Gets or sets the component's background color. Default is #fff Supports hexadecimal and color names</para>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick (typo): Minor grammar issue in the English description of the background color parameter.

You could mirror the text color description and update this to: Default is #fff. Supports hexadecimal and color names.

Suggested implementation:

    /// <summary>
    /// <para lang="zh">获得/设置 组件值 背景颜色 默认 #fff 支持16进制和颜色名称</para>
    /// <para lang="en">Gets or sets the component's background color. Default is #fff. Supports hexadecimal and color names.</para>
    /// </summary>
    [Parameter]
    public string? Text { get; set; }

    /// <summary>
    /// <para lang="zh">获得/设置 组件值 文本颜色 默认 #000 支持16进制和颜色名称</para>
    /// <para lang="en">Gets or sets the component's text color. Default is #000. Supports hexadecimal and color names.</para>
    /// </summary>

If the [Parameter] attribute for Text is already present elsewhere around this property in the actual file, remove the duplicate [Parameter] I added above and keep only one attribute on the property.

/// </summary>
Comment on lines 28 to 31
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

In the English doc text for BackgroundColor, there’s a missing sentence separator: "Default is #fff Supports..." would read better with a period (or similar) between the default value sentence and the supported formats sentence.

Copilot uses AI. Check for mistakes.
[Parameter]
public string BackgroundColor { get; set; } = "#fff";

/// <summary>
/// <para lang="zh">获得/设置 组件值 文本大小 默认 72px</para>
/// <para lang="en">Gets or sets component值 文本大小 Default is 72px</para>
/// <para lang="en">Gets or sets the component's text size. Default is 72px</para>
/// </summary>
[Parameter]
public int FontSize { get; set; } = 72;

/// <summary>
/// <para lang="zh">获得/设置 组件值 动画时间 默认 14s <para>值越小滚动越快</para>
///</para>
/// <para lang="en">Gets or sets component值 动画时间 Default is 14s <para>值越小滚动越快</para>
/// <para lang="en">Gets or sets the component's animation duration. Default is 14s <para>The smaller the value, the faster the scroll</para>
///</para>
Comment on lines 42 to 46
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The Duration XML docs still use nested <para> tags inside <para lang="..."> (and the closing tags are formatted as ///</para>), while other properties in this file were updated to a flatter style. Consider splitting this into separate <para lang="..."> blocks to keep the XML docs consistent and easier for doc tooling to parse.

Copilot uses AI. Check for mistakes.
/// </summary>
[Parameter]
public int Duration { get; set; } = 14;

/// <summary>
/// <para lang="zh">获得/设置 组件值 滚动方向 默认 LeftToRight</para>
/// <para lang="en">Gets or sets component值 滚动方向 Default is LeftToRight</para>
/// <para lang="en">Gets or sets the component's scroll direction. Default is LeftToRight</para>
/// </summary>
[Parameter]
public MarqueeDirection Direction { get; set; }
Expand Down
22 changes: 17 additions & 5 deletions src/BootstrapBlazor/Components/Mask/MaskService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,36 @@ namespace BootstrapBlazor.Components;

/// <summary>
/// <para lang="zh">MaskService 遮罩服务</para>
/// <para lang="en">MaskService</para>
/// <para lang="en">MaskService Mask Service</para>
/// </summary>
public class MaskService : BootstrapServiceBase<MaskOption?>
{
/// <summary>
/// <para lang="zh">显示 Mask 方法</para>
/// <para lang="en">Show Mask Method</para>
/// </summary>
/// <param name="option"><para lang="zh">遮罩配置信息实体类</para><para lang="en">Mask Configuration Information Entity Class</para></param>
/// <param name="mask"><para lang="zh"><see cref="Mask"/> 组件实例</para><para lang="en"><see cref="Mask"/> Component Instance</para></param>
/// <param name="option">
/// <para lang="zh">遮罩配置信息实体类</para>
/// <para lang="en">Mask Configuration Information Entity Class</para>
/// </param>
/// <param name="mask">
/// <para lang="zh"><see cref="Mask"/> 组件实例</para>
/// <para lang="en"><see cref="Mask"/> Component Instance</para>
/// </param>
public Task Show(MaskOption option, Mask? mask = null) => Invoke(option, mask);

/// <summary>
/// <para lang="zh">关闭 Mask 方法</para>
/// <para lang="en">Close Mask Method</para>
/// </summary>
/// <param name="mask"><para lang="zh"><see cref="Mask"/> 组件实例</para><para lang="en"><see cref="Mask"/> Component Instance</para></param>
/// <param name="all"><para lang="zh">是否关闭所有遮罩 默认 false 仅关闭当前或者指定遮罩</para><para lang="en">Whether to close all masks. Default false. Only close current or specified mask</para></param>
/// <param name="mask">
/// <para lang="zh"><see cref="Mask"/> 组件实例</para>
/// <para lang="en"><see cref="Mask"/> Component Instance</para>
/// </param>
/// <param name="all">
/// <para lang="zh">是否关闭所有遮罩 默认 false 仅关闭当前或者指定遮罩</para>
/// <para lang="en">Whether to close all masks. Default false. Only close current or specified mask</para>
/// </param>
public async Task Close(Mask? mask = null, bool all = false)
{
if (all)
Expand Down
9 changes: 4 additions & 5 deletions src/BootstrapBlazor/Components/Menu/Menu.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public partial class Menu
/// <para lang="en">Gets or sets Whether it is accordion effect. Default false</para>
/// </summary>
/// <remarks>
/// <para lang="zh">启用此功能时 <see cref="IsExpandAll" /> 参数不生效</para>
/// <para lang="en"><see cref="IsExpandAll" /> parameter does not take effect when this feature is enabled</para>
/// <para lang="zh">启用此功能时 <see cref="IsExpandAll" /> 参数不生效</para>
/// <para lang="en"><see cref="IsExpandAll" /> parameter does not take effect when this feature is enabled</para>
/// </remarks>
[Parameter]
public bool IsAccordion { get; set; }
Expand All @@ -59,8 +59,8 @@ public partial class Menu
/// <para lang="en">Gets or sets Whether to expand all. Default false</para>
/// </summary>
/// <remarks>
/// <para lang="zh">手风琴效果 <see cref="IsAccordion" /> 时此参数不生效</para>
/// <para lang="en">This parameter does not take effect when accordion effect <see cref="IsAccordion" /> is enabled</para>
/// <para lang="zh">手风琴效果 <see cref="IsAccordion" /> 时此参数不生效</para>
/// <para lang="en">This parameter does not take effect when accordion effect <see cref="IsAccordion" /> is enabled</para>
/// </remarks>
[Parameter]
public bool IsExpandAll { get; set; }
Expand All @@ -76,7 +76,6 @@ public partial class Menu
/// <para lang="zh">获得/设置 侧栏垂直模式 默认 false</para>
/// <para lang="en">Gets or sets Sidebar vertical mode. Default false</para>
/// </summary>
/// <value></value>
[Parameter]
public bool IsVertical { get; set; }

Expand Down
15 changes: 12 additions & 3 deletions src/BootstrapBlazor/Components/Menu/MenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,18 @@ public MenuItem() { }
/// <para lang="zh">带参数构造函数</para>
/// <para lang="en">Parameterized Constructor</para>
/// </summary>
/// <param name="text"><para lang="zh">显示文本</para><para lang="en">Display Text</para></param>
/// <param name="url"><para lang="zh">菜单地址</para><para lang="en">Menu Url</para></param>
/// <param name="icon"><para lang="zh">菜单图标</para><para lang="en">Menu Icon</para></param>
/// <param name="text">
/// <para lang="zh">显示文本</para>
/// <para lang="en">Display Text</para>
/// </param>
/// <param name="url">
/// <para lang="zh">菜单地址</para>
/// <para lang="en">Menu Url</para>
/// </param>
/// <param name="icon">
/// <para lang="zh">菜单图标</para>
/// <para lang="en">Menu Icon</para>
/// </param>
public MenuItem(string text, string? url = null, string? icon = null)
{
Text = text;
Expand Down
9 changes: 2 additions & 7 deletions src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
namespace BootstrapBlazor.Components;

/// <summary>
/// <para lang="zh"></para>
/// <para lang="en"></para>
/// <para lang="zh">子菜单组件内部使用不推荐直接使用此组件</para>
/// <para lang="en">SubMenu component for internal use only. Direct usage is not recommended.</para>
/// </summary>
public sealed partial class SubMenu
{
Expand Down Expand Up @@ -67,11 +67,6 @@ public sealed partial class SubMenu
[NotNull]
private IStringLocalizer<Menu>? Localizer { get; set; }

/// <summary>
/// <para lang="zh">获得 样式字符串</para>
/// <para lang="en">Get Style String</para>
/// </summary>
/// <param name="item"></param>
private static string? GetClassString(MenuItem item) => CssBuilder.Default()
.AddClass("active", !item.IsDisabled && item.IsActive)
.AddClass("disabled", item.IsDisabled)
Expand Down
8 changes: 1 addition & 7 deletions src/BootstrapBlazor/Components/Message/Message.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ public partial class Message
[Parameter]
public Placement Placement { get; set; } = Placement.Top;

/// <summary>
/// <para lang="zh">ToastServices 服务实例</para>
/// <para lang="en">MessageService Service Instance</para>
/// </summary>
[Inject]
[NotNull]
public MessageService? MessageService { get; set; }
private MessageService? MessageService { get; set; }
Comment on lines 36 to +38
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

Changing the injected MessageService property from public to private is a public API breaking change for consumers compiling against this library (the member is removed from the public surface). If the intent is only to hide the injected service, consider an alternative that preserves compatibility (e.g., keep it public but mark it non-browsable / internal via a wrapper) or explicitly call out the breaking change in release notes/PR description.

Copilot uses AI. Check for mistakes.

/// <summary>
/// <inheritdoc/>
Expand Down Expand Up @@ -92,7 +88,6 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
/// <para lang="zh">设置 容器位置方法</para>
/// <para lang="en">Set Container Placement Method</para>
/// </summary>
/// <param name="placement"></param>
public void SetPlacement(Placement placement)
{
Placement = placement;
Expand Down Expand Up @@ -134,7 +129,6 @@ public void Clear(string id)
/// <para lang="zh">OnDismiss 回调方法 由 JSInvoke 触发</para>
/// <para lang="en">OnDismiss Callback Method. Triggered by JSInvoke</para>
/// </summary>
/// <param name="id"></param>
[JSInvokable]
public async ValueTask Dismiss(string id)
{
Expand Down