-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Problem Description
The HTML report generated by the Scriban formatter is displaying correct summary counts but missing detail data in the main content sections.
Observed Behavior
✅ Working correctly:
- Configuration section displays properly with collapsible details
- Summary cards show correct counts (139 Added, 132 Removed, 132 Breaking)
- Overall layout and styling render correctly
❌ Not working:
- Breaking Changes section shows count but no individual change details
- Added Items section shows count but no individual items listed
- Removed Items section shows count but no individual items listed
- Modified Items section (if any) would likely have the same issue
Expected Behavior
Each section should display:
- Individual change items grouped by type (Class, Method, Property, etc.)
- Element names and descriptions for each change
- Signature differences where applicable (old vs new)
- Breaking change indicators and severity levels
Technical Analysis
The issue appears to be in the data preparation or template rendering logic in HtmlFormatterScriban.cs:
- Data Preparation: Methods like
PrepareChangeSections()andGroupChanges()may not be properly formatting the data structure expected by the Scriban templates - Template Rendering: The Scriban templates (particularly
change-group.scribanandbreaking-changes.scriban) may not be receiving the correct data structure or may have syntax issues - Template Include Logic: The
{{ include }}directives may not be working correctly with theCustomTemplateLoader
Impact
- Severity: High - The primary purpose of the HTML formatter is to display detailed change information
- User Experience: Users see summary counts but cannot access the actual details of what changed
- Functionality: Core feature is broken despite showing no errors during report generation
Files Likely Involved
src/DotNetApiDiff/Reporting/HtmlFormatterScriban.cs- Data preparation methodssrc/DotNetApiDiff/Reporting/HtmlTemplates/change-group.scriban- Change item display templatesrc/DotNetApiDiff/Reporting/HtmlTemplates/breaking-changes.scriban- Breaking changes templatesrc/DotNetApiDiff/Reporting/HtmlTemplates/main-layout.scriban- Main template with include directivessrc/DotNetApiDiff/Reporting/CustomTemplateLoader.cs- Template include functionality
Steps to Reproduce
- Run API comparison between two assemblies with differences
- Generate HTML report:
--output html --output-file report.html - Open generated HTML file
- Observe that summary shows counts but detail sections are empty
Acceptance Criteria
- Breaking Changes section displays individual breaking changes with severity and descriptions
- Added Items section shows all newly added API members grouped by type
- Removed Items section shows all removed API members grouped by type
- Modified Items section shows changed API members with before/after details
- All sections properly expand/collapse and maintain responsive design
- Template include functionality works correctly for all partial templates