You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .squad/agents/bishop/history.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,3 +35,7 @@
35
35
- Deprecate PowerShell scripts — CLI is canonical (2026-05-06T09:16)
36
36
- Audit ALL BWFC Width/Height attributes for string support (2026-05-06T15:12)
37
37
- NEVER replace ListView/FormView/GridView — must use BWFC components (2026-05-07T09:24)
38
+
39
+
## Learnings
40
+
-**2026-05-07T13:17:32-04:00:** ListView `GroupTemplate` and `LayoutTemplate` emission is more reliable when the CLI emits explicit `Context` names (`items`, `groups`) instead of leaving raw `@context` placeholders. That keeps generated placeholder markup readable and removes one common manual repair step on Wingtip fixtures.
41
+
-**2026-05-07T13:17:32-04:00:** Typed `GridView` columns must inherit the parent grid `ItemType`; leaving `TemplateField` at `ItemType="object"` breaks migrated template expressions like `@Item.Quantity`. A dedicated post-attribute-strip pass that rewrites child BWFC column generics to the grid row type fixes this deterministically.
Add a dedicated CLI markup transform to propagate typed `GridView ItemType` values down into child BWFC column components, and extend template-context normalization so `ListView` group/layout placeholders emit explicit fragment contexts.
9
+
10
+
## What changed
11
+
1. Added `GridViewColumnItemTypeTransform` at Order 705 after `AttributeStripTransform`.
12
+
2. Rewrote typed `GridView` child `BoundField`, `TemplateField`, `HyperLinkField`, and `ButtonField` tags from `ItemType="object"` to the parent grid item type.
13
+
3. Extended `TemplateContextTransform` so `GroupTemplate` emits `Context="items"` and `LayoutTemplate` emits `Context="groups"` when no explicit context exists.
14
+
4. Added CLI tests covering Wingtip-style `ShoppingCart` and `ProductList` emission.
15
+
5. Updated CLI docs to document the new transform behavior.
16
+
17
+
## Why
18
+
Run 40 showed Layer 1 output still needed manual structural cleanup on flagship BWFC data controls. The worst failure mode was typed `GridView` templates compiling against `object`, which makes generated expressions like `@Item.Quantity` invalid. Explicit ListView placeholder contexts also make the generated template structure trustworthy and easier to inspect.
19
+
20
+
## Validation
21
+
-`dotnet test tests\BlazorWebFormsComponents.Cli.Tests --nologo`
Layer 1 now emits cleaner BWFC ListView placeholders and correctly typed GridView columns for Wingtip-style pages, reducing manual repair on the benchmark path. FormView item templates continue to emit valid typed fragments, and the CLI suite now guards this contract.
3.**Code-Behind** (26) — Using statements, HttpUtility/EF modernization, base classes, lifecycle, event handlers, compile-surface stubs, markup-driven safety stubs
122
122
123
123
See **[Transform Reference](transforms.md)** for the flat transform list and **[Semantic Pattern Catalog](semantic-pattern-catalog.md)** for the bounded semantic pass that runs afterward.
**Propagates a typed `GridView` item type down into child BWFC column components.**
469
+
470
+
When a migrated `GridView` is strongly typed, `TemplateField`, `BoundField`, `HyperLinkField`, and `ButtonField` children must compile against that same row type. This transform rewrites `ItemType="object"` fallbacks on those column tags to the parent grid's concrete `ItemType`, while leaving object-typed grids alone.
**Converts Web Forms event handler syntax to Blazor.**
@@ -539,21 +575,27 @@ This transform targets placeholder tags such as `itemPlaceholder`, `groupPlaceho
539
575
540
576
### 19. TemplateContextTransform (Order: 805)
541
577
542
-
**Adds `Context="Item"` to typed item templates and rewrites generated `@context` references to `@Item`.**
578
+
**Adds explicit contexts for typed item templates plus named placeholder contexts for `ListView` group/layout fragments.**
543
579
544
-
This keeps BWFC data controls aligned with Web Forms naming so generated `<ListView>`, `<FormView>`, `<GridView>`, `<DataList>`, and `<Repeater>` templates stay on the component model instead of being flattened into manual HTML.
580
+
This keeps BWFC data controls aligned with Web Forms naming so generated `<ListView>`, `<FormView>`, `<GridView>`, `<DataList>`, and `<Repeater>` templates stay on the component model instead of being flattened into manual HTML. It also upgrades placeholder-only `GroupTemplate` / `LayoutTemplate` blocks to named contexts such as `items` and `groups`, which makes emitted `ListView` markup structurally valid and easier to read.
0 commit comments