Skip to content

Commit 2b46e0a

Browse files
csharpfritzCopilot
andcommitted
fix(samples): Fix broken navbar links in ComponentCatalog
Fixed route mismatches between ComponentCatalog and actual page routes: - MasterPage: /ControlSamples/MasterPage -> /control-samples/masterpage - FormView: /ControlSamples/FormView -> /ControlSamples/FormView/Simple - DataList: SimpleFlow subpage -> Flow (matches actual route) - Validation controls: Removed /Validations/ prefix from routes - Login controls: Removed /LoginControls/ prefix from routes - LoginStatus: Removed NotAuthenticated subpage (has separate route) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6c422a3 commit 2b46e0a

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

samples/AfterBlazorServerSide/ComponentCatalog.cs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static class ComponentCatalog
99
public static IReadOnlyList<ComponentInfo> Components { get; } = new List<ComponentInfo>
1010
{
1111
// Utility Controls
12-
new("MasterPage", "Utility", "/ControlSamples/MasterPage", "Master page template support for consistent layouts"),
12+
new("MasterPage", "Utility", "/control-samples/masterpage", "Master page template support for consistent layouts"),
1313
new("Localize", "Utility", "/ControlSamples/Localize", "Localization and resource string rendering"),
1414
new("MultiView", "Utility", "/ControlSamples/MultiView", "Container for multiple View controls with switching"),
1515
new("PlaceHolder", "Utility", "/ControlSamples/PlaceHolder", "Container for dynamically added controls"),
@@ -54,11 +54,10 @@ public static class ComponentCatalog
5454
new[] { "AutoGeneratedColumns", "ShowHideHeader" },
5555
new[] { "grid", "table", "legacy" }),
5656
new("DataList", "Data", "/ControlSamples/DataList", "Data-bound list with repeating templates",
57-
new[] { "RepeatColumns", "SimpleFlow", "ComplexStyle", "HeaderStyle", "FooterStyle" },
57+
new[] { "RepeatColumns", "Flow", "ComplexStyle", "HeaderStyle", "FooterStyle" },
5858
new[] { "list", "template", "repeat" }),
59-
new("FormView", "Data", "/ControlSamples/FormView", "Single-record data display and editing",
60-
new[] { "Edit" },
61-
new[] { "form", "edit", "single" }),
59+
new("FormView", "Data", "/ControlSamples/FormView/Simple", "Single-record data display and editing",
60+
Keywords: new[] { "form", "edit", "single" }),
6261
new("GridView", "Data", "/ControlSamples/GridView", "Feature-rich data grid with sorting and paging",
6362
new[] { "AutoGeneratedColumns", "BindAttribute", "RowSelection", "TemplateFields" },
6463
new[] { "grid", "table", "sort", "page" }),
@@ -69,17 +68,17 @@ public static class ComponentCatalog
6968
Keywords: new[] { "repeat", "template", "iterate" }),
7069

7170
// Validation Controls
72-
new("CompareValidator", "Validation", "/ControlSamples/Validations/CompareValidatorSample", "Validates by comparing to another control or value",
71+
new("CompareValidator", "Validation", "/ControlSamples/CompareValidator", "Validates by comparing to another control or value",
7372
Keywords: new[] { "compare", "equal", "validation" }),
74-
new("CustomValidator", "Validation", "/ControlSamples/Validations/CustomValidatorSample", "Custom validation logic with server and client functions",
73+
new("CustomValidator", "Validation", "/ControlSamples/CustomValidator", "Custom validation logic with server and client functions",
7574
Keywords: new[] { "custom", "function", "validation" }),
76-
new("RangeValidator", "Validation", "/ControlSamples/Validations/RangeValidatorSample", "Validates value falls within a range",
75+
new("RangeValidator", "Validation", "/ControlSamples/RangeValidator", "Validates value falls within a range",
7776
Keywords: new[] { "range", "min", "max", "validation" }),
78-
new("RegularExpressionValidator", "Validation", "/ControlSamples/Validations/RegularExpressionValidatorSample", "Validates value matches a regex pattern",
77+
new("RegularExpressionValidator", "Validation", "/ControlSamples/RegularExpressionValidator", "Validates value matches a regex pattern",
7978
Keywords: new[] { "regex", "pattern", "validation" }),
80-
new("RequiredFieldValidator", "Validation", "/ControlSamples/Validations/RequiredFieldValidatorSample", "Ensures a field has a value",
79+
new("RequiredFieldValidator", "Validation", "/ControlSamples/RequiredFieldValidator", "Ensures a field has a value",
8180
Keywords: new[] { "required", "mandatory", "validation" }),
82-
new("ValidationSummary", "Validation", "/ControlSamples/Validations/ValidationSummarySample", "Displays summary of all validation errors",
81+
new("ValidationSummary", "Validation", "/ControlSamples/ValidationSummary", "Displays summary of all validation errors",
8382
Keywords: new[] { "summary", "errors", "validation" }),
8483

8584
// Navigation Controls
@@ -94,13 +93,12 @@ public static class ComponentCatalog
9493
Keywords: new[] { "password", "change", "security" }),
9594
new("CreateUserWizard", "Login", "/ControlSamples/CreateUserWizard", "Multi-step user registration wizard",
9695
Keywords: new[] { "register", "signup", "wizard" }),
97-
new("Login", "Login", "/ControlSamples/LoginControls/LoginSample", "User authentication login form",
96+
new("Login", "Login", "/ControlSamples/Login", "User authentication login form",
9897
Keywords: new[] { "authenticate", "signin", "credentials" }),
99-
new("LoginName", "Login", "/ControlSamples/LoginControls/LoginNameSample", "Displays the current user's name",
98+
new("LoginName", "Login", "/ControlSamples/LoginName", "Displays the current user's name",
10099
Keywords: new[] { "user", "name", "display" }),
101-
new("LoginStatus", "Login", "/ControlSamples/LoginControls/LoginStatusAuthenticated", "Shows login/logout link based on auth state",
102-
new[] { "NotAuthenticated" },
103-
new[] { "status", "logout", "link" }),
100+
new("LoginStatus", "Login", "/ControlSamples/LoginStatusAuthenticated", "Shows login/logout link based on auth state",
101+
Keywords: new[] { "status", "logout", "link" }),
104102
}.AsReadOnly();
105103

106104
public static IReadOnlyList<string> Categories { get; } = Components

0 commit comments

Comments
 (0)