Skip to content

Commit bc195e9

Browse files
committed
Merge branch 'dev' of github.com:FritzAndFriends/BlazorWebFormsComponents into dev
2 parents 21bfdbc + 5044428 commit bc195e9

49 files changed

Lines changed: 4970 additions & 83 deletions

Some content is hidden

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

.ai-team/agents/colossus/history.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,77 @@
2929

3030
Team update (2026-02-12): Milestone 4 planned Chart component with Chart.js via JS interop. 8 work items, design review required before implementation. decided by Forge + Squad
3131

32+
## 2026-02-12: Boy Scout rule — fixed 7 pre-existing integration test failures
33+
34+
Fixed all 7 failing integration tests. 111/111 passing after fixes.
35+
36+
### Failure 1 & 2: ChangePassword + CreateUserWizard form fields not found
37+
- **Root cause:** The sample pages at `ChangePassword/Index.razor` and `CreateUserWizard/Index.razor` were MISSING `@using BlazorWebFormsComponents.LoginControls`. The components rendered as raw HTML custom elements (`<changepassword>`) instead of Blazor components. PasswordRecovery worked because it had the import.
38+
- **Fix:** Added `@using BlazorWebFormsComponents.LoginControls` to both sample pages. Also updated test selectors from `input[type='password']` / `input[type='text']` to ID-based selectors (`input[id$='_CurrentPassword']`, etc.) with `WaitForAsync` for circuit establishment timing.
39+
40+
### Failure 3 & 4 & 7: Image, ImageMap external placeholder URLs unreachable
41+
- **Root cause:** Sample pages referenced `https://via.placeholder.com/...` URLs which are unreachable in the test environment.
42+
- **Fix:** Created 8 local SVG placeholder images in `wwwroot/img/` (placeholder-150x100.svg, placeholder-80x80.svg, etc.) and replaced all external URLs in both `Image/Index.razor` and `ImageMap/Index.razor`.
43+
44+
### Failure 4 (additional): ImageMap duplicate InlineData
45+
- **Root cause:** ImageMap had entries in BOTH `EditorControl_Loads_WithoutErrors` and `NavigationControl_Loads_WithoutErrors`. Per team decisions, ImageMap is a Navigation Control.
46+
- **Fix:** Removed `[InlineData("/ControlSamples/ImageMap")]` from EditorControl test theory.
47+
48+
### Failure 5: Calendar console errors
49+
- **Root cause:** ASP.NET Core structured log messages (timestamps like `[2026-02-12T16:00:34.529...]`) forwarded to browser console as "error" level. Calendar component and sample page have NO bugs — these are benign framework messages from Blazor's SignalR circuit.
50+
- **Fix:** Added regex filter in `VerifyPageLoadsWithoutErrors` to exclude messages matching `^\[\d{4}-\d{2}-\d{2}T` pattern.
51+
52+
### Failure 6: TreeView/Images broken image path
53+
- **Root cause:** `ImageUrl="/img/C#.png"` but actual file is `CSharp.png`.
54+
- **Fix:** Changed to `ImageUrl="/img/CSharp.png"`.
55+
56+
## Learnings
57+
58+
- **Missing @using is silent:** When a Blazor component can't be resolved, it renders as a raw HTML custom element with no error. This is extremely hard to catch without integration tests that verify actual DOM content.
59+
- **LoginControls namespace:** Components in `BlazorWebFormsComponents.LoginControls` require an explicit `@using` — the root `@using BlazorWebFormsComponents` in `_Imports.razor` doesn't cover sub-namespaces. PasswordRecovery had it; ChangePassword and CreateUserWizard didn't.
60+
- **ASP.NET Core log messages in browser console:** Blazor Server forwards structured log output to the browser console. These appear as "error" type messages starting with ISO 8601 timestamps. Tests must filter these to avoid false positives.
61+
- **SVG placeholders:** Simple inline SVG files are ideal test-safe replacements for external placeholder image services. They're just XML text, always available, and don't require network access.
62+
63+
📌 Team update (2026-02-12): Boy scout fixes logged — 7 pre-existing integration test failures fixed, 111/111 integration tests + 797/797 bUnit tests all green. Commit a4d17f5 on sprint3/detailsview-passwordrecovery. — logged by Scribe
64+
65+
## 2026-02-12: DetailsView edit mode input textbox verification test
66+
67+
- Added `DetailsView_EditMode_RendersInputTextboxes` integration test in `InteractiveComponentTests.cs`
68+
- Test verifies the full edit mode lifecycle:
69+
1. Navigates to `/ControlSamples/DetailsView` and clicks the Edit link
70+
2. Waits for "Mode changing" status message (Blazor Server DOM update)
71+
3. Asserts at least 3 `<input type="text">` elements appear (CustomerID, FirstName, LastName, CompanyName fields)
72+
4. Asserts Update and Cancel links are present via `GetByRole(AriaRole.Link, ...)`
73+
5. Clicks Cancel and verifies return to ReadOnly mode — no text inputs remain
74+
- This test catches the known bug where edit mode shows command row changes (Edit→Update/Cancel) but leaves field values as plain text instead of rendering `<input type="text">` textboxes
75+
- Cyclops is fixing the component in parallel — this test will pass once the fix lands
76+
- Key selector: `input[type='text']` works because the fix uses raw HTML `<input type="text">` not Blazor's `<InputText>` (which omits `type="text"` in .NET 10)
77+
78+
📌 Team update (2026-02-12): DetailsView auto-generated fields must render <input type="text"> in Edit/Insert mode — decided by Cyclops
79+
80+
## 2026-02-12: Sprint 3 missing integration tests — full interactive coverage
81+
82+
- Added 4 new integration tests in `InteractiveComponentTests.cs` for Sprint 3 components:
83+
- `DetailsView_EmptyData_ShowsMessage` — verifies `EmptyDataText="No customers found."` renders when data source is empty. Uses `GetByRole(AriaRole.Cell)` to avoid matching code sample `<pre>` blocks.
84+
- `PasswordRecovery_AnswerSubmit_TransitionsToSuccessStep` — full 3-step flow test: username → question → success. Uses ID-specific selectors (`#PasswordRecovery1_UserName`, `#PasswordRecovery1_Answer`, `#PasswordRecovery1_SubmitButton`) to target the first PasswordRecovery instance. Uses `PressSequentiallyAsync` + Tab for Blazor Server `InputText` binding on re-rendered DOM. Verifies "Recovery email sent successfully" status (the final status after both `OnVerifyingAnswer` and `OnSendingMail` handlers fire).
85+
- `PasswordRecovery_HelpLink_Renders` — verifies the 3rd PasswordRecovery renders a help link `<a id="PasswordRecovery3_HelpLink">` with text "Need more help?" and correct href.
86+
- `PasswordRecovery_CustomText_Applies` — verifies the 2nd PasswordRecovery renders custom `UserNameTitleText="Password Reset"` in a table cell and custom `UserNameLabelText="Email:"` in the label element.
87+
- All 116 integration tests passing (112 existing + 4 new), 0 failures.
88+
- Key learnings:
89+
- Pages with code sample `<pre><code>` blocks cause strict mode violations when using `text=` locators — the same text appears in both the rendered component and the code sample. Use role-based or ID-based selectors instead.
90+
- Pages with multiple PasswordRecovery instances require ID-specific selectors (`#PasswordRecovery1_SubmitButton`) not suffix selectors (`input[id$='_SubmitButton']`) to avoid strict mode violations.
91+
- After a multi-step Blazor Server form flow, the final `_statusMessage` reflects the LAST handler that sets it. For PasswordRecovery step 2→3, `OnVerifyingAnswer` sets one message, then `OnSendingMail` overwrites it — test must assert on the final value.
92+
- `PressSequentiallyAsync` + Tab blur works reliably for Blazor Server `InputText` binding on dynamically re-rendered DOM elements.
93+
94+
## 2026-02-12: DataBinder and ViewState utility feature integration tests
95+
96+
- Added smoke tests in `ControlSampleTests.cs`:
97+
- New "Utility Features" theory section with `[InlineData("/ControlSamples/DataBinder")]` and `[InlineData("/ControlSamples/ViewState")]`
98+
- Added 2 interaction tests in `InteractiveComponentTests.cs`:
99+
- `DataBinder_Eval_RendersProductData` — verifies the DataBinder sample page renders product data ("Laptop Stand", "USB-C Hub", "Mechanical Keyboard") via Repeater with DataBinder.Eval(). Asserts at least 3 `<tbody tr>` rows present.
100+
- `ViewState_Counter_IncrementsOnClick` — verifies the ViewState sample page's "Click Me (ViewState)" button increments a counter stored in ViewState. Clicks twice and verifies counter reaches 1 then 2.
101+
- Build: 0 errors. All 120 integration tests passing (116 existing + 4 new), 0 failures.
102+
- Key learnings:
103+
- DataBinder sample uses `OnAfterRender(firstRender)` to call `DataBind()` on 4 Repeater instances — data only appears after first render, but NetworkIdle wait handles this.
104+
- ViewState sample button text "Click Me (ViewState)" distinguishes it from the "Click Me (Property)" button in section 3. Used `GetByRole(AriaRole.Button, new() { Name = "Click Me (ViewState)" })` for precise targeting.
105+
- Both pages include `<pre><code>` blocks with sample code — assertions use `page.ContentAsync()` for text presence rather than strict locators to avoid matching code samples vs rendered content where appropriate.

.ai-team/agents/cyclops/history.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- **DetailsView event args:** All event arg classes live in `src/BlazorWebFormsComponents/DetailsViewEventArgs.cs`. Includes `DetailsViewCommandEventArgs`, `DetailsViewDeleteEventArgs`, `DetailsViewDeletedEventArgs`, `DetailsViewInsertEventArgs`, `DetailsViewInsertedEventArgs`, `DetailsViewUpdateEventArgs`, `DetailsViewUpdatedEventArgs`, `DetailsViewModeEventArgs`. These parallel FormView's event args but are separate types, matching Web Forms.
3232
- **DetailsView field abstraction:** Uses `DetailsViewField` abstract base class and `DetailsViewAutoField` internal class for auto-generated fields. Field definitions can be added via `Fields` RenderFragment child content. External field components can register via `AddField`/`RemoveField` methods using a `DetailsViewFieldCollection` cascading value.
3333
- **Data control paging pattern:** DetailsView uses `PageIndex` (zero-based) to index into the `Items` collection. Each page shows one record. Pager row renders numeric page links. `PageChangedEventArgs` is reused from the existing shared class.
34+
- **DetailsView edit/insert mode rendering:** `DetailsViewAutoField.GetValue()` must respect the `DetailsViewMode` parameter. In `Edit` mode, render `<input type="text" value="{currentValue}" />` pre-filled with the property value. In `Insert` mode, render `<input type="text" value="" />` (empty). In `ReadOnly` mode, render plain text. Uses `RenderTreeBuilder.OpenElement/AddAttribute/CloseElement` pattern for input elements.
3435

3536
📌 Team update(2026-02-10): FileUpload needs InputFile integration — @onchange won't populate file data. Ship-blocking bug. — decided by Forge
3637
📌 Team update (2026-02-10): ImageMap base class must be BaseStyledComponent, not BaseWebFormsComponent — decided by Forge
@@ -46,3 +47,4 @@
4647

4748
Team update (2026-02-12): Milestone 4 planned Chart component with Chart.js via JS interop. 8 work items, design review required before implementation. decided by Forge + Squad
4849

50+
📌 Team update (2026-02-12): DetailsView auto-generated fields must render <input type="text"> in Edit/Insert mode — decided by Cyclops

.ai-team/agents/forge/history.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,72 @@ Evaluated 4 JS libraries for Chart component. D3 rejected (zero built-in charts,
4848
📌 Team update (2026-02-11): Milestone 3 gate review — DetailsView APPROVED, PasswordRecovery APPROVED. 50/53 (94%). — decided by Forge
4949
📌 Team update (2026-02-12): Chart component feasibility confirmed — Chart.js recommended via JS interop. Effort: L. Target Milestone 4. — decided by Forge
5050
📌 Team update (2026-02-12): Milestone 4 planned — Chart component with Chart.js via JS interop. 8 work items, design review required before implementation. — decided by Forge + Squad
51+
📌 Team update (2026-02-10): Close PR #333 without merging — all Calendar work already on dev, PR branch has 0 unique commits — decided by Rogue
52+
📌 Team update (2026-02-10): Sprint 2 complete — Localize, MultiView+View, ChangePassword, CreateUserWizard shipped with docs, samples, tests. 709 tests passing. 41/53 components done. — decided by Squad
53+
54+
### 2026-02-10 — Sprint 3 Planning & Status Reconciliation
55+
56+
**Status.md was significantly stale:**
57+
- Calendar was merged to dev via commit d33e156 and PR #339 but still marked 🔴 Not Started
58+
- FileUpload was merged via PRs #335 and #338 but still marked 🔴 Not Started
59+
- Summary table said 41/53 (Editor: 20/27) but actual count of ✅ entries in the detailed section was already 23/27 for Editors (now 25/27 with Calendar + FileUpload fixed)
60+
- The 27-count for Editor Controls groups MultiView and View as one logical component despite separate table rows
61+
- Corrected total: 48/53 components complete (91%), 5 remaining
62+
63+
**Sprint 3 scope decision:**
64+
- DetailsView and PasswordRecovery are the two buildable components
65+
- Chart deferred: requires SVG/Canvas rendering engine, no Blazor primitive equivalent
66+
- Substitution deferred: Web Forms output caching has no Blazor architectural equivalent
67+
- Xml deferred: XSLT transforms are a dead-end pattern with near-zero migration demand
68+
- Post-Sprint 3 state: 50/53 (94%), library effectively feature-complete for practical migration
69+
70+
**DetailsView design notes:**
71+
- Must inherit BaseStyledComponent (Web Forms DetailsView → CompositeDataBoundControl → WebControl)
72+
- Renders as `<table>` with one `<tr>` per field (vertical layout vs GridView's horizontal)
73+
- Can reuse existing BoundField, TemplateField, CommandField, HyperLinkField, ButtonField from GridView
74+
- Needs DetailsViewMode enum (ReadOnly=0, Edit=1, Insert=2)
75+
- Needs 8 EventArgs classes for mode changes, CRUD operations
76+
77+
**PasswordRecovery design notes:**
78+
- Must inherit BaseStyledComponent
79+
- 3-step wizard flow: UserName → Question → Success (same pattern as CreateUserWizard's 2-step)
80+
- Can reuse existing LoginControls style sub-components (TitleTextStyle, TextBoxStyle, LabelStyle, etc.)
81+
- Table-based HTML output matching ChangePassword's render pattern
82+
83+
📌 Team update (2026-02-10): Sprint 3 plan ratified — DetailsView + PasswordRecovery. Chart/Substitution/Xml deferred indefinitely with migration docs. 48/53 → target 50/53. — decided by Forge
84+
📌 Team update (2026-02-11): Colossus added as dedicated integration test engineer. Rogue retains bUnit unit tests. — decided by Jeffrey T. Fritz
85+
86+
### 2026-02-11 — Sprint 3 Gate Review
87+
88+
**DetailsView — APPROVED:**
89+
- Inherits `DataBoundComponent<ItemType>` — correct for data-bound controls. Uses same `Items` property as GridView/ListView.
90+
- All 10 Web Forms events implemented with correct `EventArgs` types. Pre-operation events support cancellation.
91+
- `DetailsViewMode` enum (ReadOnly=0, Edit=1, Insert=2) matches Web Forms exactly.
92+
- HTML output: `<table>` with one `<tr>` per field, command row with `<a>` links, nested-table numeric pager — all match Web Forms.
93+
- Auto-generation via reflection correctly generates fields from `ItemType` properties.
94+
- Minor issues (non-blocking): `CombinedStyle` has CellPadding/CellSpacing logic mismatch, `cellspacing` hardcoded to 0 in template, docs use `DataSource` but actual parameter is `Items`.
95+
- DetailsView docs `DataSource``Items` fix assigned to Beast.
96+
97+
**PasswordRecovery — APPROVED:**
98+
- Inherits `BaseWebFormsComponent` — consistent with ChangePassword and CreateUserWizard pattern.
99+
- 3-step wizard flow (UserName → Question → Success) matches Web Forms exactly.
100+
- Reuses existing `LoginCancelEventArgs`, `TableItemStyle`, `Style` cascading parameter pattern from other Login Controls.
101+
- `SuccessTextStyle` sub-component added following existing `UiTableItemStyle` pattern.
102+
- All 6 events implemented: `OnVerifyingUser`, `OnUserLookupError`, `OnVerifyingAnswer`, `OnAnswerLookupError`, `OnSendingMail`, `OnSendMailError`.
103+
- `SetQuestion()` and `SkipToSuccess()` APIs provide developer control matching Web Forms extensibility.
104+
- Table-based nested HTML output matches Web Forms PasswordRecovery output.
105+
- Minor issues (non-blocking): `RenderOuterTable` declared but not used, `SubmitButtonType`/`SubmitButtonImageUrl` declared but not rendered, sample uses `e.Sender` casting instead of `@ref`.
106+
107+
**Key Patterns Confirmed:**
108+
- Login Controls consistently inherit `BaseWebFormsComponent` (not `BaseStyledComponent`) and use cascading `TableItemStyle`/`Style` objects for styling — this is an established project convention.
109+
- Data-bound controls inherit `DataBoundComponent<T>` which provides `Items` (not `DataSource`) as the primary binding parameter.
110+
- Event naming in Login Controls uses `On` prefix (`OnVerifyingUser`, `OnChangingPassword`) — project convention, not Web Forms convention.
111+
- Both components ship with docs, samples, and tests per Sprint 2 policy.
112+
113+
**Sprint 3 Status:**
114+
- 50/53 components complete (94%)
115+
- 797 tests passing, 0 build errors
116+
- 3 remaining (Chart, Substitution, Xml) deferred indefinitely
117+
- Library is effectively feature-complete for practical Web Forms migration
118+
119+
📌 Team update (2026-02-11): Sprint 3 gate review — DetailsView APPROVED, PasswordRecovery APPROVED. 50/53 complete (94%). — decided by Forge

.ai-team/agents/jubilee/history.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,12 @@
4545

4646
Team update (2026-02-12): Milestone 4 planned Chart component with Chart.js via JS interop. 8 work items, design review required before implementation. decided by Forge + Squad
4747

48+
📌 Team update (2026-02-12): LoginControls sample pages MUST include `@using BlazorWebFormsComponents.LoginControls` — root _Imports.razor doesn't cover sub-namespaces. Never use external image URLs in samples; use local SVGs. — decided by Colossus
49+
50+
### Utility Feature Sample Pages — DataBinder and ViewState
51+
52+
- **DataBinder sample** (`Components/Pages/ControlSamples/DataBinder/Index.razor`): Demonstrates all three `Eval()` signatures with a Repeater — `DataBinder.Eval(container, "Prop")`, shorthand `Eval("Prop")` via `@using static`, and `Eval("Prop", "{0:C}")` with format strings. Each section has live demo + code block. Section 4 ("Moving On") shows the modern `@context.Property` approach side by side.
53+
- **ViewState sample** (`Components/Pages/ControlSamples/ViewState/Index.razor`): Uses `@ref` to a Panel component to demo `ViewState.Add`/`ViewState["key"]` dictionary API. Shows a click counter and a multi-key settings form stored in ViewState, then contrasts with the modern C# field/property approach. `#pragma warning disable CS0618` suppresses the Obsolete warnings for the demo code.
54+
- **Navigation fixes applied:** NavMenu.razor Login Components reordered (Login before LoginName), DataBinder and ViewState added to Utility Features (alphabetical: DataBinder, ID Rendering, PageService, ViewState). ComponentList.razor fixed: HyperLink moved before Image in Editor Controls, ImageMap removed from Editor Controls and added to Navigation Controls (per team decision), Utility Features column added. mkdocs.yml: ImageMap removed from Editor Controls nav (already in Navigation Controls).
55+
- **Widget model reused:** DataBinder sample reuses `SharedSampleObjects.Models.Widget` with inline data (Laptop Stand, USB-C Hub, Mechanical Keyboard) for a product catalog demo.
56+
- **Build verified:** `dotnet build` passes with 0 compilation errors (Debug config). Release config has a known transient Nerdbank.GitVersioning file-copy issue unrelated to this work.

0 commit comments

Comments
 (0)