Skip to content

HTML Report Missing Detail Data - Only Summary Counts Displayed #23

@jbrinkman

Description

@jbrinkman

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
Image

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:

  1. Data Preparation: Methods like PrepareChangeSections() and GroupChanges() may not be properly formatting the data structure expected by the Scriban templates
  2. Template Rendering: The Scriban templates (particularly change-group.scriban and breaking-changes.scriban) may not be receiving the correct data structure or may have syntax issues
  3. Template Include Logic: The {{ include }} directives may not be working correctly with the CustomTemplateLoader

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 methods
  • src/DotNetApiDiff/Reporting/HtmlTemplates/change-group.scriban - Change item display template
  • src/DotNetApiDiff/Reporting/HtmlTemplates/breaking-changes.scriban - Breaking changes template
  • src/DotNetApiDiff/Reporting/HtmlTemplates/main-layout.scriban - Main template with include directives
  • src/DotNetApiDiff/Reporting/CustomTemplateLoader.cs - Template include functionality

Steps to Reproduce

  1. Run API comparison between two assemblies with differences
  2. Generate HTML report: --output html --output-file report.html
  3. Open generated HTML file
  4. 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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions