Skip to content

Commit f3c84e3

Browse files
authored
Docs update - Accordion, Alerts, Badge, Breadcrumb, Buttons, Callout, Card (#1218)
* Enhance Accordion API docs with metadata attributes Added [AddedVersion], [DefaultValue], [Description], and [ParameterTypeName] attributes to Accordion, AccordionItem, and AccordionEventArgs for improved API documentation and tooling. Updated method and parameter docs, improved nullability, and clarified XML comments. Updated documentation pages to reflect new property sections and correct DocType usage. * Enhance Alert docs and add enum documentation support - Renamed Alert documentation sections for clarity and updated anchor links. - Added "AlertColor Enum" section with a table of enum values. - Updated DocxTable to render enum documentation tables. - Introduced DocxEnumRow component for displaying enum details. - Documented AlertColor enum members with descriptions and version info. * Enhance Badge docs and add metadata annotations - Add XML docs and metadata attributes to Badge parameters and related enums (`BadgeColor`, `BadgeIndicatorType`, `BadgePlacement`, `Position`) - Update Badge documentation page: rename "Parameters" section, add enum reference tables - Change `ChildContent` and `VisuallyHiddenText` to nullable types - Improve API discoverability and reference quality * Add BreadcrumbService docs, metadata, and menu entry - Added BreadcrumbService documentation page and menu entry - Expanded Breadcrumb and BreadcrumbItem with XML docs and metadata attributes ([AddedVersion], [DefaultValue], [Description], [ParameterTypeName]) - Made Breadcrumb.Items nullable and updated its documentation - Introduced MethodNameAttribute for method signature annotation - Updated BreadcrumbService with metadata and [MethodName] usage - Enhanced MethodInfoExtensions and DocxMethodRow to support method name display from attribute - Updated DemoRouteConstants with Docs_URL_BreadcrumbService route - Improved documentation tables for Breadcrumb, BreadcrumbItem, and BreadcrumbService * Enhance Button docs and add rich enum metadata - Improved Button component documentation: renamed and expanded sections, added enum documentation tables. - Added [AddedVersion], [DefaultValue], and [Description] attributes to all Button parameters, methods, and enums for better API documentation. - Updated XML comments for clarity and consistency; clarified default values. - Made ChildContent, LoadingTemplate, and TooltipTitle nullable. - Replaced buttons.jpg with updated buttons.png for documentation visuals. * Enhance Callout docs and add metadata to parameters/enum - Renamed "Parameters" section and added "CalloutColor Enum" section in Callout documentation. - Added [AddedVersion], [DefaultValue], [Description], and [ParameterTypeName] attributes to Callout parameters for improved API docs and tooling. - Improved XML comments for parameter default values. - Added XML docs and metadata attributes to CalloutColor enum and its values. * Remove fingerprinted JS references for Blazor scripts Updated index.html to reference Blazor and Blazor Bootstrap JavaScript files without fingerprint placeholders. This change may impact caching and versioning, as the scripts are now loaded using their standard filenames. * Update Blazor WASM script loading and startup logic Switched to a fingerprinted Blazor WebAssembly script for better cache management. Removed manual Blazor.start() call, as startup is now handled automatically by the new script reference. * Enhance Card component docs and add enum metadata Improved documentation for Card components and enums. Added `[AddedVersion]`, `[DefaultValue]`, and `[Description]` attributes to parameters and enum values for better API reference and tooling support. Updated XML comments for clarity and switched `ChildContent` to nullable. No functional changes.
1 parent 93dd01c commit f3c84e3

52 files changed

Lines changed: 1254 additions & 176 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BlazorBootstrap.Demo.RCL/Components/Layout/DocsMainLayout.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ internal override IEnumerable<NavItem> GetNavItems()
7575
new (){ Id = "605", Text = "Scatter Chart", Href = DemoRouteConstants.Docs_URL_ScatterChart, IconName = IconName.GraphUpArrow, ParentId = "6", Match = NavLinkMatch.All },
7676

7777
new(){ Id = "7", Text = "Services", IconName = IconName.WrenchAdjustableCircleFill, IconColor = IconColor.Success },
78-
new (){ Id = "700", Text = "Modal Service", Href = DemoRouteConstants.Docs_URL_ModalService, IconName = IconName.WindowStack, ParentId = "7" },
78+
new (){ Id = "700", Text = "Breadcrumb Service", Href = DemoRouteConstants.Docs_URL_BreadcrumbService, IconName = IconName.WindowStack, ParentId = "7" },
79+
new (){ Id = "701", Text = "Modal Service", Href = DemoRouteConstants.Docs_URL_ModalService, IconName = IconName.WindowStack, ParentId = "7" },
7980

8081
//new(){ Id = "19", Text = "Utilities", IconName = IconName.GearWideConnected, IconColor = IconColor.Info },
8182
//new (){ Id = "1900", Text = "Color Utility", Href = DemoRouteConstants.Docs_URL_ColorUtils, IconName = IconName.Palette2, ParentId = "19" },

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Accordion/Accordion_Doc_01_Documentation.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<DocxTable TItem="Accordion" DocType="DocType.Events" />
2727
</Section>
2828

29+
<Section Class="p-0" Size="HeadingSize.H3" Name="AccordionEventArgs Properties" PageUrl="@pageUrl" Link="accordion-item-properties">
30+
<DocxTable TItem="AccordionEventArgs" DocType="DocType.Properties" />
31+
</Section>
32+
2933
<Section Class="p-0" Size="HeadingSize.H3" Name="AccordionItem Parameters" PageUrl="@pageUrl" Link="accordion-item-parameters">
3034
<DocxTable TItem="AccordionItem" DocType="DocType.Parameters" />
3135
</Section>

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Alerts/Alert_Doc_01_Documentation.razor

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@
1414
<img src="@imageUrl" class="img-fluid" alt="@metaTitle" />
1515
</Section>
1616

17-
<Section Class="p-0" Size="HeadingSize.H3" Name="Parameters" PageUrl="@pageUrl" Link="parameters">
17+
<Section Class="p-0" Size="HeadingSize.H3" Name="Alert Parameters" PageUrl="@pageUrl" Link="alert-parameters">
1818
<DocxTable TItem="Alert" DocType="DocType.Parameters" />
1919
</Section>
2020

21-
<Section Class="p-0" Size="HeadingSize.H3" Name="Methods" PageUrl="@pageUrl" Link="methods">
21+
<Section Class="p-0" Size="HeadingSize.H3" Name="Alert Methods" PageUrl="@pageUrl" Link="alert-methods">
2222
<DocxTable TItem="Alert" DocType="DocType.Methods" />
2323
</Section>
2424

25-
<Section Class="p-0" Size="HeadingSize.H3" Name="Events" PageUrl="@pageUrl" Link="events">
25+
<Section Class="p-0" Size="HeadingSize.H3" Name="Alert Events" PageUrl="@pageUrl" Link="alert-events">
2626
<DocxTable TItem="Alert" DocType="DocType.Events" />
2727
</Section>
2828

29+
<Section Class="p-0" Size="HeadingSize.H3" Name="AlertColor Enum" PageUrl="@pageUrl" Link="alert-color-enum">
30+
<DocxTable TItem="AlertColor" DocType="DocType.Enum" />
31+
</Section>
32+
2933
@code {
3034
private const string componentName = nameof(Alert);
3135
private const string pageUrl = DemoRouteConstants.Docs_URL_Alerts;

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Badge/Badge_Doc_01_Documentation.razor

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,26 @@
1414
<img src="@imageUrl" class="img-fluid" alt="@metaTitle" />
1515
</Section>
1616

17-
<Section Class="p-0" Size="HeadingSize.H3" Name="Parameters" PageUrl="@pageUrl" Link="parameters">
17+
<Section Class="p-0" Size="HeadingSize.H3" Name="Badge Parameters" PageUrl="@pageUrl" Link="badge-parameters">
1818
<DocxTable TItem="Badge" DocType="DocType.Parameters" />
1919
</Section>
2020

21+
<Section Class="p-0" Size="HeadingSize.H3" Name="BadgeColor Enum" PageUrl="@pageUrl" Link="badge-color-enum">
22+
<DocxTable TItem="BadgeColor" DocType="DocType.Enum" />
23+
</Section>
24+
25+
<Section Class="p-0" Size="HeadingSize.H3" Name="BadgeIndicatorType Enum" PageUrl="@pageUrl" Link="badge-indicator-type-enum">
26+
<DocxTable TItem="BadgeIndicatorType" DocType="DocType.Enum" />
27+
</Section>
28+
29+
<Section Class="p-0" Size="HeadingSize.H3" Name="BadgePlacement Enum" PageUrl="@pageUrl" Link="badge-placement-enum">
30+
<DocxTable TItem="BadgePlacement" DocType="DocType.Enum" />
31+
</Section>
32+
33+
<Section Class="p-0" Size="HeadingSize.H3" Name="Position Enum" PageUrl="@pageUrl" Link="position-enum">
34+
<DocxTable TItem="Position" DocType="DocType.Enum" />
35+
</Section>
36+
2137
@code {
2238
private const string componentName = nameof(Badge);
2339
private const string pageUrl = DemoRouteConstants.Docs_URL_Badge;

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Breadcrumb/Breadcrumb_Doc_01_Documentation.razor

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
<DocxTable TItem="Breadcrumb" DocType="DocType.Parameters" />
1919
</Section>
2020

21+
<Section Class="p-0" Size="HeadingSize.H3" Name="BreadcrumbItem Properties" PageUrl="@pageUrl" Link="breadcrumb-item-properties">
22+
<DocxTable TItem="BreadcrumbItem" DocType="DocType.Properties" />
23+
</Section>
24+
25+
<Section Class="p-0" Size="HeadingSize.H3" Name="BreadcrumbService Methods" PageUrl="@pageUrl" Link="breadcrumb-service-methods">
26+
<DocxTable TItem="BreadcrumbService" DocType="DocType.Methods" />
27+
</Section>
28+
2129
@code {
2230
private const string componentName = nameof(Breadcrumb);
2331
private const string pageUrl = DemoRouteConstants.Docs_URL_Breadcrumb;

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Buttons/Buttons_Doc_01_Documentation.razor

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,40 @@
1414
<img src="@imageUrl" class="img-fluid" alt="@metaTitle" />
1515
</Section>
1616

17-
<Section Class="p-0" Size="HeadingSize.H3" Name="Parameters" PageUrl="@pageUrl" Link="parameters">
17+
<Section Class="p-0" Size="HeadingSize.H3" Name="Button Parameters" PageUrl="@pageUrl" Link="button-parameters">
1818
<DocxTable TItem="Button" DocType="DocType.Parameters" />
1919
</Section>
2020

21-
<Section Class="p-0" Size="HeadingSize.H3" Name="Methods" PageUrl="@pageUrl" Link="methods">
21+
<Section Class="p-0" Size="HeadingSize.H3" Name="Button Methods" PageUrl="@pageUrl" Link="button-methods">
2222
<DocxTable TItem="Button" DocType="DocType.Methods" />
2323
</Section>
2424

25-
<Section Class="p-0" Size="HeadingSize.H3" Name="Events" PageUrl="@pageUrl" Link="events">
26-
<DocxTable TItem="Button" DocType="DocType.Events" />
25+
<Section Class="p-0" Size="HeadingSize.H3" Name="ButtonColor Enum" PageUrl="@pageUrl" Link="button-color-enum">
26+
<DocxTable TItem="ButtonColor" DocType="DocType.Enum" />
27+
</Section>
28+
29+
<Section Class="p-0" Size="HeadingSize.H3" Name="ButtonSize Enum" PageUrl="@pageUrl" Link="button-size-enum">
30+
<DocxTable TItem="ButtonSize" DocType="DocType.Enum" />
31+
</Section>
32+
33+
<Section Class="p-0" Size="HeadingSize.H3" Name="ButtonType Enum" PageUrl="@pageUrl" Link="button-type-enum">
34+
<DocxTable TItem="ButtonType" DocType="DocType.Enum" />
35+
</Section>
36+
37+
<Section Class="p-0" Size="HeadingSize.H3" Name="Position Enum" PageUrl="@pageUrl" Link="position-enum">
38+
<DocxTable TItem="Position" DocType="DocType.Enum" />
39+
</Section>
40+
41+
<Section Class="p-0" Size="HeadingSize.H3" Name="Target Enum" PageUrl="@pageUrl" Link="target-enum">
42+
<DocxTable TItem="Target" DocType="DocType.Enum" />
43+
</Section>
44+
45+
<Section Class="p-0" Size="HeadingSize.H3" Name="TooltipColor Enum" PageUrl="@pageUrl" Link="tooltip-color-enum">
46+
<DocxTable TItem="TooltipColor" DocType="DocType.Enum" />
47+
</Section>
48+
49+
<Section Class="p-0" Size="HeadingSize.H3" Name="TooltipPlacement Enum" PageUrl="@pageUrl" Link="tooltip-placement-enum">
50+
<DocxTable TItem="TooltipPlacement" DocType="DocType.Enum" />
2751
</Section>
2852

2953
@code {

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Callout/Callout_Doc_01_Documentation.razor

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
<img src="@imageUrl" class="img-fluid" alt="@metaTitle" />
1515
</Section>
1616

17-
<Section Class="p-0" Size="HeadingSize.H3" Name="Parameters" PageUrl="@pageUrl" Link="parameters">
17+
<Section Class="p-0" Size="HeadingSize.H3" Name="Callout Parameters" PageUrl="@pageUrl" Link="callout-parameters">
1818
<DocxTable TItem="Callout" DocType="DocType.Parameters" />
1919
</Section>
2020

21+
<Section Class="p-0" Size="HeadingSize.H3" Name="CalloutColor Enum" PageUrl="@pageUrl" Link="callout-color-enum">
22+
<DocxTable TItem="CalloutColor" DocType="DocType.Enum" />
23+
</Section>
24+
2125
@code {
2226
private const string componentName = nameof(Callout);
2327
private const string pageUrl = DemoRouteConstants.Docs_URL_Callout;

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Card/Card_Doc_01_Documentation.razor

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@
5050
<DocxTable TItem="CardTitle" DocType="DocType.Parameters" />
5151
</Section>
5252

53+
<Section Class="p-0" Size="HeadingSize.H3" Name="CardColor Enum" PageUrl="@pageUrl" Link="card-color-enum">
54+
<DocxTable TItem="CardColor" DocType="DocType.Enum" />
55+
</Section>
56+
57+
<Section Class="p-0" Size="HeadingSize.H3" Name="Alignment Enum" PageUrl="@pageUrl" Link="alignment-enum">
58+
<DocxTable TItem="Alignment" DocType="DocType.Enum" />
59+
</Section>
60+
61+
<Section Class="p-0" Size="HeadingSize.H3" Name="Target Enum" PageUrl="@pageUrl" Link="target-enum">
62+
<DocxTable TItem="Target" DocType="DocType.Enum" />
63+
</Section>
64+
65+
<Section Class="p-0" Size="HeadingSize.H3" Name="HeadingSize Enum" PageUrl="@pageUrl" Link="heading-size-enum">
66+
<DocxTable TItem="HeadingSize" DocType="DocType.Enum" />
67+
</Section>
68+
5369
@code {
5470
private const string componentName = nameof(Card);
5571
private const string pageUrl = DemoRouteConstants.Docs_URL_Card;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@attribute [Route(pageUrl)]
2+
@layout DocsMainLayout
3+
4+
<DocsPageHeadSection PageUrl="@pageUrl"
5+
PageTitle="@pageTitle"
6+
PageDescription="@pageDescription"
7+
MetaTitle="@metaTitle"
8+
MetaDescription="@metaDescription"
9+
ImageUrl="@imageUrl" />
10+
11+
<DemoLink Href="@DemoRouteConstants.Demos_URL_ModalService" />
12+
13+
<Section Class="p-0" Size="HeadingSize.H3" Name="Screenshot" PageUrl="@pageUrl" Link="screenshot">
14+
<img src="@imageUrl" class="img-fluid" alt="@metaTitle" />
15+
</Section>
16+
17+
<Section Class="p-0" Size="HeadingSize.H3" Name="BreadcrumbService Methods" PageUrl="@pageUrl" Link="breadcrumb-service-methods">
18+
<DocxTable TItem="BreadcrumbService" DocType="DocType.Methods" />
19+
</Section>
20+
21+
@code {
22+
private const string componentName = nameof(BreadcrumbService);
23+
private const string pageUrl = DemoRouteConstants.Docs_URL_BreadcrumbService;
24+
private const string pageTitle = componentName;
25+
private const string pageDescription = $"This documentation provides a comprehensive reference for the <code>{componentName}</code> component, guiding you through its configuration options.";
26+
private const string metaTitle = $"Blazor {componentName} Component";
27+
private const string metaDescription = $"This documentation provides a comprehensive reference for the {componentName} component, guiding you through its configuration options.";
28+
private const string imageUrl = DemoScreenshotSrcConstants.Demos_URL_Breadcrumb;
29+
}

BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Services/ModalService/ModalService_Doc_01_Documentation.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<DocxTable TItem="ModalService" DocType="DocType.Methods" />
1919
</Section>
2020

21-
<Section Class="p-0" Size="HeadingSize.H3" Name="ModalOption Members" PageUrl="@pageUrl" Link="modal-option-members">
22-
<DocxTable TItem="ModalOption" DocType="DocType.Parameters" />
21+
<Section Class="p-0" Size="HeadingSize.H3" Name="ModalOption Properties" PageUrl="@pageUrl" Link="modal-option-properties">
22+
<DocxTable TItem="ModalOption" DocType="DocType.Properties" />
2323
</Section>
2424

2525
@code {

0 commit comments

Comments
 (0)