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
41 changes: 41 additions & 0 deletions .squad/agents/beast/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,44 @@ Updated `.squad/skills/migration-standards/SKILL.md` to add new section at end:




## BaseValidator & BaseCompareValidator Documentation (2026-03-17)

**Session (2026-03-17 by Beast):**
- Created docs/ValidationControls/BaseValidator.md 6.6 KB comprehensive base class docs covering:
- Abstract base class overview for all validators
- Shared properties: ControlToValidate, ControlRef, Display, Text, ErrorMessage, ValidationGroup, Enabled, style properties
- ForwardRef<InputBase<T>> pattern for Blazor-native field binding
- Validation lifecycle (EditContext integration, cascading context, registration/validation/cleanup)
- Child validator references (RequiredFieldValidator, CompareValidator, RangeValidator, RegularExpressionValidator, CustomValidator)
- Web Forms Blazor comparison with code examples

- Created docs/ValidationControls/BaseCompareValidator.md 6.4 KB docs for comparison-based validators:
- Abstract base class extending BaseValidator with type conversion and comparison logic
- Type property with supported types table (String, Integer, Double, Date, Currency)
- CultureInvariantValues property explanation with practical examples
- Type conversion and comparison logic documentation
- Comprehensive examples (Integer, Date, Currency) with real code samples
- Web Forms Blazor syntax comparison
- Child validator references (CompareValidator, RangeValidator)

- Updated mkdocs.yml added BaseCompareValidator and BaseValidator alphabetically in Validation Controls section
- Verified MkDocs build: --strict mode passes with no broken links (55.59 seconds build time)

**Pattern Consistency:**
- Followed RequiredFieldValidator.md and CompareValidator.md formatting conventions
- Maintained heading structure: Overview, Properties, Examples, Web Forms comparison, Child references
- Used property tables for enums (Display, Type values)
- Included Microsoft documentation links to original Web Forms classes
- All Blazor code examples shown with EditForm context

**Key Decisions:**
- BaseValidator docs positioned as "framework for all validators" not a user-facing component
- Emphasized ControlRef as Blazor-native approach; ControlToValidate as Web Forms migration bridge
- Type conversion explanation in BaseCompareValidator targets developers migrating numeric/date comparisons
- CultureInvariantValues documentation included practical locale examples (US "." vs European "," decimals)

**Files:**
- Created docs/ValidationControls/BaseValidator.md
- Created docs/ValidationControls/BaseCompareValidator.md
- Updated mkdocs.yml (Validation Controls section)
27 changes: 27 additions & 0 deletions .squad/agents/colossus/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,30 @@ Added 5 smoke tests (Timer, UpdatePanel, UpdateProgress, ScriptManager, Substitu

📌 Team update (2026-03-16): Playwright infrastructure confirmed shipping. Unblocks HTML Fidelity dimension for Component Health Dashboard v1. — Forge

### Validator + New Page Integration Tests (2026-03-17)

**Summary:** Added 14 new integration tests — 11 interaction tests and 3 smoke tests.

**Smoke tests added to `ControlSampleTests.cs`:**
- `[InlineData("/ControlSamples/Content")]`, `[InlineData("/ControlSamples/ContentPlaceHolder")]`, `[InlineData("/ControlSamples/View")]` in `UtilityFeature_Loads_WithoutErrors` Theory group.

**Interaction tests added to `InteractiveComponentTests.cs`:**
1. `CompareValidator_InvalidValue_ShowsError` — submits "5" (not > 10), asserts error text appears
2. `CompareValidator_ValidValue_SubmitsSuccessfully` — submits "15", asserts no error
3. `RangeValidator_OutOfRange_ShowsError` — submits "1800" (below 1900–2100), asserts error
4. `RangeValidator_InRange_SubmitsSuccessfully` — submits "2000", asserts no error
5. `RegularExpressionValidator_NonMatching_ShowsError` — submits "abc" (not 5-digit), asserts error
6. `RegularExpressionValidator_Matching_SubmitsSuccessfully` — submits "12345", asserts no error
7. `CustomValidator_InvalidValue_ShowsError` — submits "Banana" (doesn't start with A), asserts error
8. `CustomValidator_ValidValue_SubmitsSuccessfully` — submits "Apple", asserts no error
9. `ValidationSummary_InvalidSubmit_ShowsSummaryWithMultipleErrors` — submits empty, asserts summary header + error messages
10. `Content_Renders_MasterPageDemoElements` — verifies heading and content rendered
11. `ContentPlaceHolder_Renders_DemoContent` — verifies heading and content rendered
12. `View_ClickThrough_ChangesVisibleContent` — verifies initial view, clicks button, checks content persists

**Patterns:** Used `data-audit-control` locators for all validators, `PressSequentiallyAsync` + `Tab` for input fields, `TextContentAsync()` on container + `Assert.Contains`/`DoesNotContain` for error text validation, `#region` blocks per component. Content/ContentPlaceHolder/View tests written defensively since pages are being created in parallel by Jubilee.

**Files modified:**
- `samples/AfterBlazorServerSide.Tests/ControlSampleTests.cs` — 3 new `[InlineData]` entries
- `samples/AfterBlazorServerSide.Tests/InteractiveComponentTests.cs` — 11 new `[Fact]` methods

10 changes: 10 additions & 0 deletions .squad/agents/jubilee/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,14 @@

**Build verification:** `dotnet build` completed with 0 errors, pre-existing warnings only.

### Standalone Sample Pages for Content, ContentPlaceHolder, View (2026-03-19)

- **Created 3 standalone sample pages** — each component now has its own route and dedicated page:
- `Components/Pages/ControlSamples/Content/Index.razor` — route `/ControlSamples/Content`. Demos: Web Forms before/after comparison, basic Content with ContentPlaceHolderID, multiple content regions, dynamic content with interactive button. 3 audit markers (Content-1, Content-2, Content-3).
- `Components/Pages/ControlSamples/ContentPlaceHolder/Index.razor` — route `/ControlSamples/ContentPlaceHolder`. Demos: default content (no override), content replacement, interactive toggle showing default vs override behavior. 3 audit markers (ContentPlaceHolder-1, ContentPlaceHolder-2, ContentPlaceHolder-3).
- `Components/Pages/ControlSamples/View/Index.razor` — route `/ControlSamples/View`. Demos: basic ActiveViewIndex navigation, wizard-style multi-step form, OnActivate/OnDeactivate events with tab UI. 3 audit markers (View-1, View-2, View-3).
- **Updated ComponentCatalog.cs** — Content route changed from `/control-samples/masterpage` to `/ControlSamples/Content`, ContentPlaceHolder from `/control-samples/masterpage` to `/ControlSamples/ContentPlaceHolder`, View from `/ControlSamples/MultiView` to `/ControlSamples/View`.
- **Convention:** All three pages use `@rendermode InteractiveServer` for interactive demos, include parameter reference tables, migration notes, and `data-audit-control` markers per project conventions.
- **Build verified:** 0 errors.


106 changes: 106 additions & 0 deletions .squad/decisions/inbox/beast-basevalidator-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Decision: BaseValidator and BaseCompareValidator Documentation

**Date:** 2026-03-17
**Author:** Beast (Technical Writer)
**Status:** Complete
**Requested by:** Jeffrey T. Fritz

## Summary

Created comprehensive documentation for two abstract base classes in the validation control hierarchy: BaseValidator (parent of all validators) and BaseCompareValidator (parent of comparison-based validators). Both docs follow existing validator documentation patterns and integrate into mkdocs.yml.

## Problem

BaseValidator and BaseCompareValidator had no documentation despite being the foundation for all validation controls in BlazorWebFormsComponents. Other concrete validators (RequiredFieldValidator, CompareValidator, etc.) were documented, but the base classes were missing.

## Solution

**1. BaseValidator Documentation** (`docs/ValidationControls/BaseValidator.md`)
- Positioned as the abstract framework for ALL validation controls
- Explains shared properties accessible to all validators:
- ControlToValidate (string ID, Web Forms style)
- ControlRef (ForwardRef<InputBase<T>>, Blazor native)
- Display (Static, Dynamic, None) with behavioral explanation
- Text (inline error message) and ErrorMessage (summary message)
- ValidationGroup (selective validation)
- Enabled and style properties (ForeColor, BackColor, CssClass, Font.*, etc.)
- IsValid (read-only validation state)
- Documents the validation lifecycle: registration → validation request → value resolution → validation → state notification → cleanup
- Explains EditContext integration and cascading context
- References all child validators with links
- Provides Web Forms → Blazor comparison with code examples

**2. BaseCompareValidator Documentation** (`docs/ValidationControls/BaseCompareValidator.md`)
- Positioned as abstract base for comparison validators (CompareValidator, RangeValidator)
- Documents Type property with full data type table (String, Integer, Double, Date, Currency)
- Explains CultureInvariantValues with practical locale examples (US "." vs European "," decimal separators)
- Documents the Compare() method logic: conversion → type check → comparison
- Provides real examples:
- Integer age range validation (18-120)
- Date range validation (1900-2023)
- Currency minimum price validation
- Culture-invariant parsing example
- Includes Web Forms → Blazor syntax comparison
- References inherited BaseValidator properties
- References child validators

**3. mkdocs.yml Navigation Update**
- Added BaseCompareValidator and BaseValidator to Validation Controls section
- Placed alphabetically (BaseCompareValidator, BaseValidator, CompareValidator, ...)
- Verified strict MkDocs build passes with no broken links

## Design Decisions

### Scope
- **Audience:** Experienced Web Forms developers learning Blazor
- **BaseValidator as Framework:** Not presented as a user-facing component, but as the infrastructure that ALL validators depend on
- **BaseCompareValidator as Type System:** Explains how comparison validators handle numeric, date, and currency conversions

### ControlToValidate vs. ControlRef
- Documented both patterns equally:
- ControlToValidate (string ID) — Web Forms migration path, uses property name on model
- ControlRef (ForwardRef<InputBase<T>>) — Blazor native, uses component @ref
- Precedence rule: ControlRef takes priority if both are set

### Type Conversion Philosophy
- Emphasized safe conversion: left value → right value → comparison
- Noted DataTypeCheck operator special case (validates type without comparison)
- Explained culture-invariant vs. culture-aware parsing with practical examples

### Formatting Consistency
- Matched RequiredFieldValidator.md and CompareValidator.md patterns:
- H1 overview with Microsoft docs link
- Properties section with property tables
- Examples section with real code (EditForm context)
- Web Forms → Blazor syntax comparison at end
- Child class references
- All code examples fully runnable (includes @code block with model class)

## Impact

### Documentation
- 2 new markdown files in docs/ValidationControls/
- 1 mkdocs.yml update (2 new nav entries)
- MkDocs build passes in strict mode
- No broken links introduced

### Validator Ecosystem
- All 5 concrete validators (RequiredFieldValidator, CompareValidator, RangeValidator, RegularExpressionValidator, CustomValidator) now have documented base classes
- New developers can understand validation inheritance hierarchy
- Web Forms developers have clear "base class properties" reference

### Future Work
- Custom validator documentation can reference BaseValidator for common properties
- ValidationSummary docs can reference BaseValidator validation lifecycle
- Migration guides can reference ControlToValidate vs. ControlRef pattern

## Files Changed
- Created: `docs/ValidationControls/BaseValidator.md` (6.6 KB)
- Created: `docs/ValidationControls/BaseCompareValidator.md` (6.4 KB)
- Updated: `mkdocs.yml` (2 nav entries added)

## Verification
✅ MkDocs build: `mkdocs build --strict` passes (55.59 seconds)
✅ No broken links
✅ Both new docs rendered correctly with proper markdown formatting
✅ Code examples tested for syntax validity (Razor/C# patterns match existing docs)
19 changes: 19 additions & 0 deletions .squad/decisions/inbox/jubilee-content-view-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Decision: Standalone sample pages for Content, ContentPlaceHolder, View

**By:** Jubilee (Sample Writer)
**Date:** 2026-03-19

**What:** Created individual standalone sample pages for Content, ContentPlaceHolder, and View components. Previously these shared group pages (Content/ContentPlaceHolder → `/control-samples/masterpage`, View → `/ControlSamples/MultiView`). Each now has a dedicated route and page.

**Routes:**
- Content → `/ControlSamples/Content`
- ContentPlaceHolder → `/ControlSamples/ContentPlaceHolder`
- View → `/ControlSamples/View`

**Why:** Each component needs its own navigable page for the ComponentCatalog sidebar to link directly to focused demos. Shared pages made it impossible to deep-link to a specific component's samples.

**Files changed:**
- `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/Content/Index.razor` (new)
- `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/ContentPlaceHolder/Index.razor` (new)
- `samples/AfterBlazorServerSide/Components/Pages/ControlSamples/View/Index.razor` (new)
- `samples/AfterBlazorServerSide/ComponentCatalog.cs` (routes updated)
Loading
Loading