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

resolves #1510 Add D2 sketch option #1520

Merged
merged 13 commits into from
Apr 25, 2023

Conversation

felixvanoost
Copy link
Contributor

@felixvanoost felixvanoost commented Apr 22, 2023

Adds support for the sketch option described in the D2 documentation. This includes the following changes:

  • Updates D2 to release 0.4.1 and replaces the Docker kroki-builder-d2 image with a native binary.
  • Adds handling of the sketch option to the Kroki server.
  • Adds a smoke test for the sketch option.

Output with sketch disabled (default):

curl http://localhost:8000/d2/svg/eNp1UbtuwzAM3P0VB2dxkMYBMnrolA8IsnRoO8gWHRNRJEOiXQRF_72UgwRdCmggj7wHocMeRxMTxQbfBZAGM1KDzpmUCu1XOFBvJieYOXHLjuUGTtggBXh9RBYSkEbquL_VStlEMjbrcahPk6fT0urgjh9DamD3JkmtJQsHfzc6Rp6NEHomZ7PQ1oVwMYOyGpTvn1G1ysdqEOpErZ_LK7wRBjNTTkOp0zMgAymu_RhpJi8L4NirRwxXtMT-jDFfb2ESDLpwvepe1vtYPd3_SbwZiS7VukEVkbO9gEKPNgS3Xo79Ym-rXGZVFi0X2czylQd7ydyEJFFz_GX_FEV5ZhmmtlbuTihGNY9TJzu7X_LGWucltq84PP7vFxWtksQ= > sketch-disabled.svg`

sketch-disabled

Output with sketch enabled:

curl http://localhost:8000/d2/svg/eNp1UbtuwzAM3P0VB2dxkMYBMnrolA8IsnRoO8gWHRNRJEOiXQRF_72UgwRdCmggj7wHocMeRxMTxQbfBZAGM1KDzpmUCu1XOFBvJieYOXHLjuUGTtggBXh9RBYSkEbquL_VStlEMjbrcahPk6fT0urgjh9DamD3JkmtJQsHfzc6Rp6NEHomZ7PQ1oVwMYOyGpTvn1G1ysdqEOpErZ_LK7wRBjNTTkOp0zMgAymu_RhpJi8L4NirRwxXtMT-jDFfb2ESDLpwvepe1vtYPd3_SbwZiS7VukEVkbO9gEKPNgS3Xo79Ym-rXGZVFi0X2czylQd7ydyEJFFz_GX_FEV5ZhmmtlbuTihGNY9TJzu7X_LGWucltq84PP7vFxWtksQ=?sketch > sketch-enabled.svg`

sketch-enabled

Closes #1510

@ggrossetie
Copy link
Member

You are on a roll, Felix 💪🏻
Thanks for all your contributions ❤️

@felixvanoost
Copy link
Contributor Author

You are on a roll, Felix 💪🏻 Thanks for all your contributions ❤️

It's my pleasure!

@felixvanoost felixvanoost changed the title WIP: Add D2 sketch option Add D2 sketch option Apr 23, 2023
@ggrossetie
Copy link
Member

Wow awesome, thanks again 👍🏻

@ggrossetie ggrossetie changed the title Add D2 sketch option resolves #1510 Add D2 sketch option Apr 25, 2023
@ggrossetie ggrossetie merged commit c2013f7 into yuzutech:main Apr 25, 2023
@felixvanoost felixvanoost deleted the add-d2-sketch-option branch April 25, 2023 12:55
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.

d2 diagrams: support sketch mode (hand-drawn aesthetic)
2 participants