Skip to content

Commit 78e006b

Browse files
csharpfritzCopilot
andcommitted
Merge origin/milestone4/chart-component (UI overhaul + chart tests)
Integrates remote work: Phase 1-3 UI overhaul (Bootstrap 5, ComponentCatalog, sidebar), chart data binding samples, and Playwright integration tests for new sample pages. Conflict: NavMenu.razor took remote's ComponentCatalog-driven dynamic nav (UI overhaul) over local's static TreeNode list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents 3e8ce86 + 186a999 commit 78e006b

36 files changed

Lines changed: 3559 additions & 297 deletions

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,20 @@ Fixed all 7 failing integration tests. 111/111 passing after fixes.
125125
- DataBinder sample uses `OnAfterRender(firstRender)` to call `DataBind()` on 4 Repeater instances — data only appears after first render, but NetworkIdle wait handles this.
126126
- 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.
127127
- 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.
128+
### 2026-02-12: Enhanced Chart visual appearance tests
129+
130+
- Added 5 stronger Chart tests in `InteractiveComponentTests.cs` to verify chart appearance:
131+
- `Chart_RendersCanvas_WithDimensions` — verifies canvas has non-zero width/height via BoundingBox
132+
- `Chart_AllTypes_HaveExpectedContainerDimensions` — Theory test verifying all 8 chart types have container dimensions matching ChartWidth/ChartHeight parameters (600x400 for most, 500x400 for Pie/Doughnut)
133+
- `Chart_ChartJsLibrary_IsInitialized` — verifies Chart.js global is loaded and has at least one chart instance via `Chart.instances`
134+
- `Chart_Line_MultipleSeries_RenderMultipleDatasets` — verifies Line chart's 2 series (NY/LA temps) produce 2 datasets via `Chart.instances[0].data.datasets.length`
135+
- `Chart_AllTypes_CanvasHasRenderingContext` — Theory test verifying all 8 chart types have a 2D rendering context
136+
- Total Chart tests: 38 (8 smoke + 11 basic canvas + 19 enhanced visual)
137+
- Build: 0 errors, 0 warnings
138+
- Test patterns:
139+
- Use `LocatorWaitForOptions { State = WaitForSelectorState.Visible }` instead of `Expect()` (class doesn't inherit from `PageTest`)
140+
- Use `page.EvaluateAsync<T>` to query Chart.js internals (`Chart.instances`, dataset counts, etc.)
141+
- Use `BoundingBoxAsync()` to verify element dimensions
142+
- Allow ±10px tolerance on dimension checks for border/padding differences
143+
144+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
- **List controls missing common ListControl properties.** BulletedList, CheckBoxList, and DropDownList all lack DataTextFormatString, AppendDataBoundItems, CausesValidation, and ValidationGroup. These are inherited from ListControl in Web Forms.
6868
- **Calendar style sub-properties use CSS strings.** All 9 style sub-properties (DayStyle, TitleStyle, etc.) are implemented as CSS class strings instead of `TableItemStyle` objects. Functional but not API-compatible.
6969
- **HiddenField correctly uses BaseWebFormsComponent.** Matches Web Forms where HiddenField inherits Control (not WebControl), so no style properties needed.
70+
- **ChartSeries data binding fix:** `ToConfig()` now checks for `Items` + `YValueMembers` and extracts `DataPoint` objects via reflection. Uses `XValueMember` for X axis values and comma-separated `YValueMembers` for Y values. Falls back to manual `Points` collection when `Items` is null or `YValueMembers` is empty. Handles type conversion via `TryConvertToDouble()` for common numeric types.
7071

7172

7273
Team update (2026-02-23): AccessKey/ToolTip must be added to BaseStyledComponent decided by Beast, Cyclops

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,43 @@ Completed full API surface audit of 12 controls (9 Data + 3 Navigation) comparin
154154
- Library is effectively feature-complete for practical Web Forms migration
155155

156156
📌 Team update (2026-02-11): Sprint 3 gate review — DetailsView APPROVED, PasswordRecovery APPROVED. 50/53 complete (94%). — decided by Forge
157+
### Chart Component Analysis (2026-02-13)
158+
159+
Thorough review of `milestone4/chart-component` branch. Implementation is **substantially complete** for Phase 1 scope:
160+
161+
**What's done:**
162+
- `Chart.razor/.cs`: BaseStyledComponent inheritance, ChartWidth/ChartHeight/Palette/CssClass, canvas rendering, JS interop lifecycle (create/update/destroy)
163+
- `ChartSeries.razor/.cs`: 13 properties, cascading parent registration
164+
- `ChartArea.razor/.cs`: AxisX/AxisY (Axis POCO class)
165+
- `ChartTitle.razor/.cs` & `ChartLegend.razor/.cs`: Text, Docking
166+
- `ChartConfigBuilder.cs`: Pure static config builder (testable without canvas), 8 chart types mapped
167+
- `ChartJsInterop.cs`: ES module loader for chart-interop.js
168+
- Enums: `SeriesChartType` (35 values matching Web Forms), `ChartPalette` (12 palettes), `Docking` (4 positions), `ChartDashStyle`
169+
- Supporting classes: `DataPoint` (XValue, YValues[], Label, Color, ToolTip), `Axis` (Title, Min, Max, Interval, IsLogarithmic)
170+
- wwwroot: `chart.min.js` (Chart.js bundled), `chart-interop.js` (ES module wrapper)
171+
- 140 unit tests passing — enums, DataPoint, Axis, ChartConfigBuilder output
172+
- Docs: Comprehensive `Chart.md` with migration guide, code examples, feature tables
173+
- Samples: 8 Blazor pages (Index/Column, Bar, Line, Area, Pie, Doughnut, Scatter, StackedColumn)
174+
- BeforeWebForms: PieChart.aspx, LineChart.aspx reference samples
175+
176+
**Gaps identified:**
177+
1. **Data binding not implemented**`XValueMember`, `YValueMembers`, `Items` parameters exist but `ToConfig()` ignores them. Docs show data-bound examples that will silently fail.
178+
2. **27 chart types unsupported** — throw `NotSupportedException`. Clearly documented.
179+
3. **No integration tests** — Colossus hasn't added Chart sample routes to smoke tests yet.
180+
4. **No per-point coloring**`DataPoint.Color` not wired to Chart.js output.
181+
5. **No tooltips**`DataPoint.ToolTip` and `ChartSeries.ToolTip` not wired.
182+
6. **`IsValueShownAsLabel`** — not implemented.
183+
7. **MarkerStyle** — parameter exists but not mapped.
184+
185+
**Architecture assessment:**
186+
- Clean separation: Components → Config objects → ChartConfigBuilder → JSON → JS interop
187+
- Config builder is purely testable without browser context (140 tests)
188+
- ES module pattern for JS loading is correct
189+
- SSR/prerender handled gracefully (JSException caught)
190+
- Dispose pattern handles circuit disconnection
191+
192+
**Risk assessment:**
193+
- Approach is sound — Chart.js is a solid choice
194+
- First JS interop in project is well-executed
195+
- Data binding gap is ship-blocking — docs promise it works
196+
- Remaining gaps are Phase 2/3 features, not blockers

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,14 @@
6767
- **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).
6868
- **Widget model reused:** DataBinder sample reuses `SharedSampleObjects.Models.Widget` with inline data (Laptop Stand, USB-C Hub, Mechanical Keyboard) for a product catalog demo.
6969
- **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.
70+
### Chart Feature-Rich Sample Pages (2026-02-12)
71+
72+
- **4 new sample pages added:** DataBinding, MultiSeries, Styling, ChartAreas — each demonstrating advanced Chart features.
73+
- **DataBinding.razor:** Shows Web Forms-style data binding with `Items`, `XValueMember`, and `YValueMembers` parameters. Uses business object records (`SalesData`, `TrafficData`) instead of manual `DataPoint` creation. Includes Web Forms vs Blazor comparison code snippets.
74+
- **MultiSeries.razor:** Demonstrates multiple series on one chart for comparisons — revenue channels (Online vs In-Store), regional sales (3 regions), and server performance metrics (CPU vs Memory). Shows the pattern of adding multiple `<ChartSeries>` children to one `<Chart>`.
75+
- **Styling.razor:** Showcases all 11 `ChartPalette` options with visual comparisons (BrightPastel, Berry, Chocolate, EarthTones, Excel, Fire, Grayscale, Light, Pastel, SeaGreen, SemiTransparent). Demonstrates custom colors via `WebColor` static fields (e.g., `WebColor.DodgerBlue`).
76+
- **ChartAreas.razor:** Explains the `Axis` configuration options (Title, Minimum, Maximum, Interval, IsLogarithmic). Shows logarithmic scale for exponential data and constrained Y-axis for focused ranges.
77+
- **Nav ordering pattern:** New samples added alphabetically within Chart node: Area, Bar, ChartAreas, Column, DataBinding, Doughnut, Line, MultiSeries, Pie, Scatter, StackedColumn, Styling.
78+
- **WebColor usage:** Use static fields like `WebColor.DodgerBlue` not `WebColor.FromName("...")` which doesn't exist.
79+
80+

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@
4646
Team update (2026-02-23): DetailsView/PasswordRecovery branch (sprint3) must be merged forward decided by Forge
4747
Team update (2026-02-23): Validation Display property gap confirmed migration-blocking decided by Rogue
4848
Team update (2026-02-23): ValidationSummary comma-split bug confirmed immediate fix needed decided by Rogue
49+
📌 ChartSeries Data Binding Tests: Added 12 new bUnit tests for ChartSeries data binding in `ChartTests.cs`. Tests verify: extracting X/Y values from Items using XValueMember/YValueMembers, numeric X values, decimal Y values, manual Points fallback when Items is null, empty Items producing empty chart, missing XValueMember (null XValue), missing YValueMembers (empty YValues), integer-to-double conversion, Items overriding manual Points, invalid property names handled gracefully. Created `ChartSeriesDataBindingHelper` test helper class that implements expected data binding logic — this documents the expected behavior that `ChartSeries.ToConfig()` must implement (Cyclops's fix). Total Chart tests: 152 (140 original + 12 data binding). — Rogue
50+
51+
📌 Test pattern: Since `ChartSeries.ToConfig()` is `internal`, data binding tests use a helper class `ChartSeriesDataBindingHelper` that implements the expected extraction logic. This helper documents the contract: if Items is not null, extract DataPoints using reflection; if Items is null, fall back to manual Points; handle invalid property names by returning null/empty values. Cyclops should use this same logic in `ToConfig()`. — Rogue
52+
53+

0 commit comments

Comments
 (0)