5 KiB
5 KiB
When we launched D2 to open-source 2 weeks ago, we left the sprint after it a completely blank slate. Because, while we do have long-term goals, we wanted to make the first post-launch update focused 100% on addressing the biggest pain points that came up. Thank you so much to everyone who asked for or complained about something. Every item in this release was something that was posted on the D2 Discord, a GitHub issue/discussion, a comment on social media, or an email.
On top of the listed changes to core D2, we have been building out integrations, starting with Obsidian. Work has also begun on the API and Playground.
If you want a fast way to check out what a change looks like, we put screenshots in the PRs when it's a visual change.
Features 🚀
- Windows support has landed! See ./docs/INSTALL.md for usage instructions. #96
- Sequence diagrams are now supported, experimentally. See docs. #99
- Formatting of d2 scripts is supported on the CLI with the
fmtsubcommand. Seeman d2ord2 --help. #292 - Latex is now supported. See docs for how to use. #229
directionkeyword is now supported to specifyup,down,right,leftlayouts. See docs for more. #251- Self-referencing connections are now valid. E.g.
x -> x. Render will vary based on layout engine. #273 - Arrowhead labels are now supported. #182
- Support for
stroke-dashon shapes. #188 - Support for
font-coloron shapes and connections. #215 - Support for
font-sizeon shapes and connections. #250 - HTML IDs are now added in the SVG output. You can use this to query shapes and connections by ID post-render. #218
-b/--bundleflag tod2bundles all image assets directly as base64 data urls. #278- install.sh now accepts
-das an alias for--dry-run. #266
Improvements 🧹
- Local images can now be used for values to the
iconkeyword, e.g.icon: ./my_img.png. #146 - Connection labels no longer overlap other connections. #332
- ELK layout engine now defaults to top-down to be consistent with dagre. #251
- Container default font styling is no longer bold. Everything used to look too bold. #358
BROWSER=0will disable opening a browser on--watch. #311- install.sh prints the dry run message more visibly. #266
d2now lives in the root folder of the repository instead of as a subcommand. So you can now rungo install oss.terrastruct.com/d2@latestto install from source. #290install.shdefaults to installation to/usr/localas before but now if/usr/localis not accessible to the current user, it will use~/.localinstead of prompting for sudo. You can pass--prefix /usr/localto force installation into/usr/localwith a prompt for sudo. #372
Bugfixes ⛑️
- 3D style was missing border and other styles for its top and right faces. #187
- System dark mode was incorrectly applying to Markdown in renders. #159
- Fixes Markdown newlines created with a trailing double space or backslash. #214
- Fixes images not loading in PNG exports. #224
- Fixes label and icon overlapping each other in dagre and ELK layouts. #343
- No longer log benign file-watching errors. #293
$BROWSERnow works to open a custom browser correctly. For example, to open Firefox on macOS:BROWSER='open -a Firefox'#311- Fixes numbered IDs being wrongly positioned in
dagre#321.