镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(logic)!: render the timeline in the browser from embedded json - #36

Merged
danifischer merged 2 commits into
masterfrom
claude/timeline-html-modernize-f65ae7
Nov 12, 2026
Merged

danifischer merged 2 commits into
masterfrom
claude/timeline-html-modernize-f65ae7

Conversation

@danifischer

Copy link
Copy Markdown
Owner

What

The timeline gets a new design, and the generator is changed to fit it: instead of building html strings in C#, TimelineDataBuilder writes the parsed encounters as json into template.html, which draws everything in the browser. The layout can now change without touching C#.

New design

  • One index.html with the timeline and the statistics as two pages
  • Raid days as tabs, with arrows and an edge fade when there are more tabs than fit
  • Day overview strip with the downtime between pulls. Consecutive pulls of a boss are grouped and labelled with the boss icon and the number of tries; the strip scrolls sideways when there are many pulls
  • Several tries of a boss in one card, with a comparison to the previous try (group DPS, time, break)
  • All players instead of the top 3, boons per player (plus the squad average the page showed before), a downs and deaths view
  • Boss health for wipes, light and dark theme (follows the system, remembered)

Generator

  • TimelineDataBuilder (new) serializes the models. The default System.Text.Json encoder escapes <, > and &, so the data cannot end the surrounding script tag
  • TimelineCreator.BuildTimelineFile only fills the template; the signature is unchanged
  • Removed: HtmlCreator, the html builders, OverviewTableModel, EncounterTableModel, GeneralStatsTableModel, RaidModel.DoubleAsHtml, both old templates

Breaking

  • statistics.html is no longer created; the statistics are part of index.html. An old statistics.html next to it is left alone
  • The page needs JavaScript (a hint is shown without it)
  • The public model types above are gone from raidTimeline.Models / raidTimeline.Logic

Tests

  • Replaced the html builder tests with tests for the json (real Vale Guardian log, ordering, empty input, hostile names round-trip without <, > or &) and for the written file
  • dotnet test: 85 Logic tests and 13 App tests pass
  • I also rendered the output of the real pipeline in a browser (the ten fixtures, plus modified copies as wipes, and a log folder with 25 pulls on one day). The JavaScript itself has no automated tests

Not in this PR

  • media/index.html and media/preview.png still show the old design
  • Design drafts are in the local mocks/ folder, not committed

🤖 Generated with Claude Code

danifischer and others added 2 commits November 12, 2026 16:22
The generator no longer builds html strings. TimelineDataBuilder writes the
parsed encounters as json into template.html, which draws everything in the
browser. The layout can now change without touching C#.

New design:
- one index.html with the timeline and the statistics as two pages
- raid days as tabs, with scroll hints when there are many
- day overview strip with the downtime between pulls; consecutive pulls of
  a boss are grouped and labelled with the boss icon and the number of tries
- several tries of a boss in one card, with a comparison to the previous try
- all players instead of the top 3; boons per player, downs and deaths view
- boss health of a wipe, light and dark theme

BREAKING CHANGE: statistics.html is no longer created, it is part of
index.html. HtmlCreator, the html builders, OverviewTableModel,
EncounterTableModel, GeneralStatsTableModel and RaidModel.DoubleAsHtml are
removed. The page needs JavaScript.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolved the conflicts with the changes on master:
- TimelineCreator: kept the json based BuildTimelineFile and took over the
  atomic write of the output file (temporary file next to the target, then
  move) from #30
- TimelineCreatorTests: master's plain xUnit assertions, adapted to the
  single output file
- MechanicsTableBuilderTests: stays deleted, the html builders are gone
- TimelineDataBuilderTests: converted from FluentAssertions to xUnit assertions

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@danifischer
danifischer merged commit 1cd5c08 into master Nov 12, 2026
1 check passed
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.

1 participant