Skip to content

Add cycle diagram shape#2753

Draft
lymeow233-wq wants to merge 1 commit into
terrastruct:masterfrom
lymeow233-wq:codex/terrastruct-d2-cycle-shape
Draft

Add cycle diagram shape#2753
lymeow233-wq wants to merge 1 commit into
terrastruct:masterfrom
lymeow233-wq:codex/terrastruct-d2-cycle-shape

Conversation

@lymeow233-wq
Copy link
Copy Markdown

/claim #1578

Summary

  • add shape: cycle as a nested diagram layout with circular arcs clipped to child shape bounds
  • add compiler validation for cycle diagrams so fixed positions and self-entering cycle edges fail clearly
  • harden Windows golden/e2e coverage by accepting only newline-only golden diffs, normalizing fixture CRLF at read boundaries, and making import/watch/path tests deterministic

Why

This implements the cycle shape from #1578 and keeps the edge arcs circular while trimming endpoints to object borders. It also closes Windows test gaps that were causing full-package golden comparisons to fail noisily.

Validation

  • CI=1 go test --timeout=30m ./... -count=1
  • CI=1 go test --timeout=30m ./e2etests -count=1
  • CI=1 go test --timeout=30m ./e2etests-cli -count=1
  • go test ./d2layouts/d2cycle ./internal/testdiff ./d2compiler ./d2exporter -count=1
  • go test ./e2etests -run TestE2E/txtar/cycle-diagram -count=1
  • git -c core.autocrlf=false diff --check origin/master..HEAD
  • confirmed no *.got.json, *.got.svg, or *.got.txt artifacts remain

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