Skip to content

Commit 087bff0

Browse files
authored
Update grid docs, metadata, and add new screenshots (#1235)
* Update grid docs, metadata, and add new screenshots Standardize XML docs for Blazor grid parameters, add API metadata attributes, and improve type safety by making parameters nullable where appropriate. Remove obsolete PaginationAlignment parameter. Update demo screenshot references and add new image files for grid features, nested grids, and translations. No functional changes; all updates are documentation, API surface, or demo assets. * Update AdditionalAttributes to nullable; fix docs section order Changed AdditionalAttributes to nullable in base components for Blazor convention compliance. Cleaned up Grid documentation by removing duplicate and misplaced "GridColumn Parameters" sections and improving order. * Add API metadata attributes and improve null-safety Added [AddedVersion], [DefaultValue], and [Description] attributes to public properties and methods in Grid-related components for enhanced documentation and tooling support. Updated several RenderFragment properties to be nullable and removed default initializations for better null-safety. Annotated new public methods and events with version and description metadata. These changes improve API discoverability and maintainability.
1 parent 3e9d9d7 commit 087bff0

16 files changed

+506
-243
lines changed

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Grid/Grid_Doc_01_Documentation.razor

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,55 @@
1515
</Section>
1616

1717
<Section Class="p-0" Size="HeadingSize.H3" Name="Grid Parameters" PageUrl="@pageUrl" Link="grid-parameters">
18-
<DocxTable TItem="Grid<object>" DocType="DocType.Parameters" />
18+
<DocxTable TItem="Grid<TItem>" DocType="DocType.Parameters" />
1919
</Section>
2020

2121
<Section Class="p-0" Size="HeadingSize.H3" Name="Grid Methods" PageUrl="@pageUrl" Link="grid-methods">
22-
<DocxTable TItem="Grid<object>" DocType="DocType.Methods" />
22+
<DocxTable TItem="Grid<TItem>" DocType="DocType.Methods" />
2323
</Section>
2424

2525
<Section Class="p-0" Size="HeadingSize.H3" Name="Grid Events" PageUrl="@pageUrl" Link="grid-events">
26-
<DocxTable TItem="Grid<object>" DocType="DocType.Events" />
26+
<DocxTable TItem="Grid<TItem>" DocType="DocType.Events" />
2727
</Section>
2828

29-
<Section Class="p-0" Size="HeadingSize.H3" Name="GridColumn Parameters" PageUrl="@pageUrl" Link="grid-column-parameters">
30-
<DocxTable TItem="GridColumn<object>" DocType="DocType.Parameters" />
29+
<Section Class="p-0" Size="HeadingSize.H3" Name="GridSettings Properties" PageUrl="@pageUrl" Link="grid-settings-properties">
30+
<DocxTable TItem="GridSettings" DocType="DocType.Properties" />
3131
</Section>
3232

3333
<Section Class="p-0" Size="HeadingSize.H3" Name="GridColumns Parameters" PageUrl="@pageUrl" Link="grid-columns-parameters">
3434
<DocxTable TItem="GridColumns" DocType="DocType.Parameters" />
3535
</Section>
3636

3737
<Section Class="p-0" Size="HeadingSize.H3" Name="GridColumn Parameters" PageUrl="@pageUrl" Link="grid-column-parameters">
38-
<DocxTable TItem="GridColumn<object>" DocType="DocType.Parameters" />
38+
<DocxTable TItem="GridColumn<TItem>" DocType="DocType.Parameters" />
3939
</Section>
4040

4141
<Section Class="p-0" Size="HeadingSize.H3" Name="GridDetailView Parameters" PageUrl="@pageUrl" Link="grid-detailview-parameters">
42-
<DocxTable TItem="GridDetailView<object>" DocType="DocType.Parameters" />
42+
<DocxTable TItem="GridDetailView<TItem>" DocType="DocType.Parameters" />
4343
</Section>
4444

45-
<Section Class="p-0" Size="HeadingSize.H3" Name="GridSettings Properties" PageUrl="@pageUrl" Link="grid-settings-properties">
46-
<DocxTable TItem="GridSettings" DocType="DocType.Properties" />
45+
<Section Class="p-0" Size="HeadingSize.H3" Name="GridTemplates Parameters" PageUrl="@pageUrl" Link="grid-templates-parameters">
46+
<DocxTable TItem="GridTemplates" DocType="DocType.Parameters" />
47+
</Section>
48+
49+
<Section Class="p-0" Size="HeadingSize.H3" Name="GridEmptyDataTemplate Parameters" PageUrl="@pageUrl" Link="grid-empty-data-templates-parameters">
50+
<DocxTable TItem="GridEmptyDataTemplate<TItem>" DocType="DocType.Parameters" />
51+
</Section>
52+
53+
<Section Class="p-0" Size="HeadingSize.H3" Name="GridLoadingTemplate Parameters" PageUrl="@pageUrl" Link="grid-loading-template-parameters">
54+
<DocxTable TItem="GridLoadingTemplate<TItem>" DocType="DocType.Parameters" />
4755
</Section>
4856

4957
@code {
50-
private const string componentName = nameof(Grid<object>);
58+
private const string componentName = nameof(Grid<TItem>);
5159
private const string pageUrl = DemoRouteConstants.Docs_URL_Grid;
5260
private const string pageTitle = componentName;
5361
private const string pageDescription = $"This documentation provides a comprehensive reference for the <code>{componentName}</code> component, guiding you through its configuration options.";
5462
private const string metaTitle = $"Blazor {componentName} Component";
5563
private const string metaDescription = $"This documentation provides a comprehensive reference for the {componentName} component, guiding you through its configuration options.";
5664
private const string imageUrl = DemoScreenshotSrcConstants.Demos_URL_Grid_Overview;
65+
66+
public class TItem : object
67+
{
68+
}
5769
}

BlazorBootstrap.Demo.RCL/Constants/DemoScreenshotSrcConstants.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ public class DemoScreenshotSrcConstants
5050

5151
#region Grid
5252
public const string Demos_URL_Grid_Prefix = DemoScreenshotSrcPrefix + "grid.png";
53-
public const string Demos_URL_Grid_Overview = DemoScreenshotSrcPrefix + "home.png";
53+
public const string Demos_URL_Grid_Overview = DemoScreenshotSrcPrefix + "grid_fixed_header_freeze_columns.png";
5454
public const string Demos_URL_Grid_Alignment = DemoScreenshotSrcPrefix + "home.png";
5555
public const string Demos_URL_Grid_CustomCSSClass = DemoScreenshotSrcPrefix + "home.png";
5656
public const string Demos_URL_Grid_DataBinding = DemoScreenshotSrcPrefix + "home.png";
5757
public const string Demos_URL_Grid_DetailView = DemoScreenshotSrcPrefix + "home.png";
5858
public const string Demos_URL_Grid_Events = DemoScreenshotSrcPrefix + "home.png";
5959
public const string Demos_URL_Grid_Filters = DemoScreenshotSrcPrefix + "home.png";
60-
public const string Demos_URL_Grid_FixedHeader = DemoScreenshotSrcPrefix + "home.png";
61-
public const string Demos_URL_Grid_FreezeColumns = DemoScreenshotSrcPrefix + "home.png";
60+
public const string Demos_URL_Grid_FixedHeader = DemoScreenshotSrcPrefix + "grid_fixed_header_freeze_columns.png";
61+
public const string Demos_URL_Grid_FreezeColumns = DemoScreenshotSrcPrefix + "grid_fixed_header_freeze_columns.png";
6262
public const string Demos_URL_Grid_Settings = DemoScreenshotSrcPrefix + "home.png";
6363
public const string Demos_URL_Grid_NestedGrid = DemoScreenshotSrcPrefix + "home.png";
6464
public const string Demos_URL_Grid_Paging = DemoScreenshotSrcPrefix + "home.png";
17.4 KB
Loading
82.3 KB
Loading
37.8 KB
Loading
31.1 KB
Loading

blazorbootstrap/Components/Core/BlazorBootstrapComponentBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected virtual ValueTask DisposeAsyncCore(bool disposing)
148148
[Description("Gets or sets additional attributes that will be applied to the component.")]
149149
[ParameterTypeName("Dictionary<string, object>")]
150150
[Parameter(CaptureUnmatchedValues = true)]
151-
public Dictionary<string, object> AdditionalAttributes { get; set; } = default!;
151+
public Dictionary<string, object>? AdditionalAttributes { get; set; }
152152

153153
/// <summary>
154154
/// Gets or sets the CSS class name(s) to apply to the component.

blazorbootstrap/Components/Core/BlazorBootstrapLayoutComponentBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected virtual ValueTask DisposeAsyncCore(bool disposing)
141141
[Description("Gets or sets additional attributes that will be applied to the component.")]
142142
[Parameter(CaptureUnmatchedValues = true)]
143143
[ParameterTypeName("Dictionary<string, object>")]
144-
public Dictionary<string, object> AdditionalAttributes { get; set; } = default!;
144+
public Dictionary<string, object>? AdditionalAttributes { get; set; }
145145

146146
/// <summary>
147147
/// Gets or sets the CSS class name(s) to apply to the component.

0 commit comments

Comments
 (0)