Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dagre panic #1032

Merged
merged 4 commits into from
Mar 14, 2023
Merged

Fix dagre panic #1032

merged 4 commits into from
Mar 14, 2023

Conversation

gavin-ts
Copy link
Contributor

@gavin-ts gavin-ts commented Mar 14, 2023

Summary

Fixes a panic with dagre layout when there is an edge to a text shape container.

Details

  • if a shape has a markdown label it is considered a text shape instead of having a label.
  • when we check for edges running into container labels we didn't consider containers being shape text
  • text shapes have nil LabelWidth and LabelHeight values which panic on dereference
  • TODO further consider containers as text shape
    • hard to tell where the container boundaries are
    • maybe it makes more sense with a background color?
  • fixes dagre panic #906
  • adds test case

previously this would panic with dagre

Screen Shot 2023-03-14 at 3 05 47 PM

@gavin-ts gavin-ts requested a review from a team March 14, 2023 22:09
@gavin-ts gavin-ts marked this pull request as ready for review March 14, 2023 22:09
@gavin-ts gavin-ts enabled auto-merge March 14, 2023 22:22
Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay as stopgap

@gavin-ts gavin-ts merged commit e67c77e into terrastruct:master Mar 14, 2023
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.

dagre panic
2 participants