From 914f065f4785cfb6a7e9a8c44f23e4c874fa0f5b Mon Sep 17 00:00:00 2001 From: "Jeffrey T. Fritz" Date: Thu, 29 Jan 2026 13:19:56 -0500 Subject: [PATCH 1/2] =?UTF-8?q?Add=20new=20components=20and=20samples=20fo?= =?UTF-8?q?r=20CheckBox,=20DropDownList,=20Panel,=20Pla=E2=80=A6=20(#304)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/skills/documentation/SKILL.md | 323 +++++++++++++++++- README.md | 10 +- .../Components/Layout/NavMenu.razor | 13 +- .../Components/Pages/ComponentList.razor | 7 + .../Pages/ControlSamples/Panel/Index.razor | 184 ++++++++++ .../ControlSamples/PlaceHolder/Index.razor | 117 +++++++ .../RadioButtonList/Index.razor | 302 ++++++++++++++++ .../ControlSamples/RadioButton/Index.razor | 21 +- .../ControlSamples/TextBox/Default.razor | 132 +++++-- samples/AfterBlazorServerSide/Program.cs | 2 +- samples/AfterBlazorServerSide/_Imports.razor | 1 + 11 files changed, 1055 insertions(+), 57 deletions(-) create mode 100644 samples/AfterBlazorServerSide/Components/Pages/ControlSamples/Panel/Index.razor create mode 100644 samples/AfterBlazorServerSide/Components/Pages/ControlSamples/PlaceHolder/Index.razor create mode 100644 samples/AfterBlazorServerSide/Components/Pages/ControlSamples/RadioButtonList/Index.razor diff --git a/.github/skills/documentation/SKILL.md b/.github/skills/documentation/SKILL.md index 975044a98..179d8d0c6 100644 --- a/.github/skills/documentation/SKILL.md +++ b/.github/skills/documentation/SKILL.md @@ -391,6 +391,305 @@ When creating sample pages in `samples/AfterBlazorServerSide/Components/Pages/Co } ``` +## Creating Sample Pages for Components + +**CRITICAL**: Every documented component MUST have a corresponding sample page in the AfterBlazorServerSide project. + +### Sample Page Structure and Location + +Samples are located in `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/[ComponentName]/` + +The folder structure mirrors the documentation categories: +- **Editor Controls**: `ControlSamples/[ComponentName]/` +- **Data Controls**: `ControlSamples/[ComponentName]/` +- **Validation Controls**: `ControlSamples/[ComponentName]/` (or `ControlSamples/Validations/`) +- **Navigation Controls**: `ControlSamples/[ComponentName]/` +- **Login Controls**: `ControlSamples/[ComponentName]/` + +### Sample File Naming Conventions + +1. **Basic Sample**: `Index.razor` - The main/default sample for the component + - Route: `@page "/ControlSamples/[ComponentName]"` + +2. **Additional Scenarios**: `[ScenarioName].razor` - Named after what they demonstrate + - Route: `@page "/ControlSamples/[ComponentName]/[ScenarioName]"` + - Examples: `Style.razor`, `Events.razor`, `JavaScript.razor` + +3. **Navigation Helper**: `Nav.razor` - Optional component listing all samples for this component + - Used to navigate between multiple samples for the same component + +### Sample Page Required Structure + +Every sample page MUST include: + +1. **Route**: `@page "/ControlSamples/[ComponentName]"` or `@page "/ControlSamples/[ComponentName]/[Scenario]"` +2. **PageTitle**: `[ComponentName] - [Scenario]` +3. **Heading**: `

[ComponentName] Sample

` or `

[ComponentName] - [Scenario]

` +4. **Description**: Brief explanation of what the sample demonstrates +5. **Demo Section**: Working component implementation +6. **Code Display**: Showing the markup and code being used (optional but recommended) + +### Sample Page Template + +```razor +@page "/ControlSamples/[ComponentName]" +@page "/ControlSamples/[ComponentName]/[Scenario]" + +[ComponentName] Sample + +

[ComponentName] - [Scenario Description]

+ +

[Brief description of what this sample demonstrates]

+ +@* Optional: Navigation to other samples for this component *@ +