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: shape specific inner boxes #702

Merged
merged 37 commits into from
Feb 3, 2023

Conversation

gavin-ts
Copy link
Contributor

@gavin-ts gavin-ts commented Jan 21, 2023

Summary

Defines inner bounding boxes for each shape that labels can be placed in.
Decreases the default shape padding while ensuring labels can still fit in the smaller shapes.

Details

  • determine how large the shape's total dimensions need to be in order to fit an inner box of a certain size
  • determine where each inner box should be placed within each shape
  • adjustments to page/package shapes so they scale across different sizes better
  • reduce default padding from 100 to 40
  • adjust default shape padding for each shape
  • fixes render: shape-specific bounding boxes #692
  • keep person shape aspect ratio within 1.5
  • add horizontal padding for tooltips/links
  • add padding for shapes with icons
  • update chopPrecision for consistent results between CI and local
  • fixed circle/square shapes with no label and a set width or height

new shapes with inner bounding boxes drawn (default padding 40)

Screen Shot 2023-01-25 at 12 36 21 PM

padding 0

Screen Shot 2023-01-25 at 12 36 40 PM

without person shape aspect ratio limit of 1.5

Screen Shot 2023-01-25 at 1 02 11 PM

padding 100

Screen Shot 2023-01-25 at 12 36 53 PM

shapes before/after

Screen Shot 2023-01-25 at 12 50 32 PM

package shape top height vs total height before

Screen Shot 2023-01-25 at 12 57 50 PM

package shape top height vs total height after

Screen Shot 2023-01-25 at 12 58 45 PM

dagre layouts are similar with smaller shapes

Screen Shot 2023-01-25 at 12 40 24 PM

extra x padding for tooltip and link icons

Screen Shot 2023-01-23 at 8 44 53 PM

e2e report changes (image cut off, see all here)

_Users_gavinnishizawa_github_repos_d2_out_e2e_report html (7)

@gavin-ts gavin-ts requested a review from a team January 24, 2023 04:52
@gavin-ts gavin-ts force-pushed the shape-specific-inner-boxes branch from 19f77b1 to 713fb35 Compare January 24, 2023 18:36
@gavin-ts gavin-ts marked this pull request as ready for review January 25, 2023 21:04
@gavin-ts gavin-ts force-pushed the shape-specific-inner-boxes branch from 56fba0c to ce0d816 Compare January 27, 2023 00:47
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.

changelog plz.

@gavin-ts gavin-ts requested a review from alixander January 27, 2023 20:04
@gavin-ts gavin-ts requested a review from alixander February 2, 2023 06:55
@gavin-ts gavin-ts merged commit 40dd617 into terrastruct:master Feb 3, 2023
@alixander alixander mentioned this pull request Feb 5, 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.

render: shape-specific bounding boxes
3 participants