Skip to content

fix(exporter): remove unused HTML DataJSON field - #20

Open
MrBeldum wants to merge 3 commits into
loop-eng:mainfrom
MrBeldum:fix/14-remove-unused-datajson
Open

fix(exporter): remove unused HTML DataJSON field#20
MrBeldum wants to merge 3 commits into
loop-eng:mainfrom
MrBeldum:fix/14-remove-unused-datajson

Conversation

@MrBeldum

Copy link
Copy Markdown

Summary

buildHTMLData marshaled iterations into DataJSON (template.JS), but the HTML template never referenced it. The client-side nav already uses server-rendered iteration divs and {{.Summary.TotalIterations}}.

  • Remove the unused DataJSON field, the json.Marshal call, and the now-unused encoding/json import
  • Add regression tests so the dead JSON blob is not reintroduced

Fixes #14

Test plan

  • go test ./internal/exporter/ -count=1 (CI)
  • Spot-check exported HTML still shows iteration nav Prev/Next

buildHTMLData marshaled iterations into DataJSON but the template never
referenced it. Drop the field, the marshal, and the unused encoding/json
import. Add regression coverage so it is not reintroduced.

Fixes loop-eng#14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML export DataJSON computed but never used in template

1 participant