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

render: dagre layout min spacing #484

Merged
merged 4 commits into from
Dec 21, 2022

Conversation

gavin-ts
Copy link
Contributor

Summary

Dagre layouts had a fixed ranksep of 100, but this could sometimes be insufficient space for large edge labels.
This checks all the edge label dimensions to determine the minimum spacing necessary to nicely fit all edge labels.

Details

before/after

Screen Shot 2022-12-20 at 4 14 02 PM

e2e report delta

_Users_gavinnishizawa_github_repos_d2_out_e2e_report html (5)

@gavin-ts gavin-ts requested a review from a team December 21, 2022 00:18
@gavin-ts gavin-ts enabled auto-merge December 21, 2022 00:18
@ejulio-ts
Copy link
Contributor

what about setting nodesep too to solve
maybe, this case is more about setting the container width to wrap the edge label too instead of only the node 🤔

image

@alixander
Copy link
Collaborator

@ejulio-ts yeah unfortunately, dagre doesn't let us set container widths =(

@gavin-ts gavin-ts merged commit ddcd6b5 into terrastruct:master Dec 21, 2022
@gavin-ts
Copy link
Contributor Author

what about setting nodesep too to solve maybe, this case is more about setting the container width to wrap the edge label too instead of only the node 🤔

we could adjust nodesep which indirectly affects container padding but it will affect all node spacing

Screen Shot 2022-12-20 at 7 06 24 PM

Screen Shot 2022-12-20 at 7 06 56 PM

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: ensure sufficient space between shapes for large edge labels
3 participants