|
| 1 | +There are three important features that were in the initial design of D2 that have not been done and hold it back from 1.0: globs, imports, and vars. This release brings imports. |
| 2 | + |
| 3 | +Imports open up a world of possibilities and works beautifully to modularize diagrams. See the new docs to try it out today. |
| 4 | + |
| 5 | +As usual, many improvements and bug fixes accompany this release. D2 0.5 produces more legible diagrams by masking obstructions (e.g. arrow going through a label), has better error messages to guide you, is faster at certain tasks, and addresses many issues brought by community bug reports. |
| 6 | + |
1 | 7 | #### Features 🚀
|
2 | 8 |
|
3 | 9 | - D2 files have the ability to import from other D2 files. See [docs](https://d2lang.com/tour/imports). [#1371](https://github.com/terrastruct/d2/pull/1371)
|
| 10 | +- `sql_table` alternatively takes an array of constraints instead of being limited to a single one. Thanks @satoqz ! [#1245](https://github.com/terrastruct/d2/pull/1245) |
4 | 11 |
|
5 | 12 | #### Improvements 🧹
|
6 | 13 |
|
7 |
| -- Use shape specific sizing for grid containers [#1294](https://github.com/terrastruct/d2/pull/1294) |
8 |
| -- Grid diagrams now support nested shapes or grid diagrams [#1309](https://github.com/terrastruct/d2/pull/1309) |
9 |
| -- Grid diagrams will now also use `grid-gap`, `vertical-gap`, and `horizontal-gap` for padding [#1309](https://github.com/terrastruct/d2/pull/1309) |
| 14 | +- Use shape-specific sizing for grid containers [#1294](https://github.com/terrastruct/d2/pull/1294) |
| 15 | +- Grid diagrams support nested shapes or grid diagrams [#1309](https://github.com/terrastruct/d2/pull/1309) |
| 16 | +- `grid-gap`, `vertical-gap`, and `horizontal-gap` apply to padding on grid diagrams [#1309](https://github.com/terrastruct/d2/pull/1309) |
10 | 17 | - Watch mode browser uses an error favicon to easily indicate compiler errors. Thanks @sinyo-matu ! [#1240](https://github.com/terrastruct/d2/pull/1240)
|
11 |
| -- Improves grid layout performance when there are many similarly sized shapes. [#1315](https://github.com/terrastruct/d2/pull/1315) |
12 |
| -- Connections and labels now are adjusted for shapes with `3d` or `multiple`. [#1340](https://github.com/terrastruct/d2/pull/1340) |
13 |
| -- `sql_table` now alternatively takes an array of constraints instead of being limited to a single one. Thanks @satoqz ! [#1245](https://github.com/terrastruct/d2/pull/1245) |
| 18 | +- Grid layout performance improved when there are many similarly sized shapes [#1315](https://github.com/terrastruct/d2/pull/1315) |
| 19 | +- Connections and labels are adjusted for shapes with `3d` or `multiple` [#1340](https://github.com/terrastruct/d2/pull/1340) |
14 | 20 | - Constraints in `sql_table` render even if they have no matching abbreviation [#1372](https://github.com/terrastruct/d2/pull/1372)
|
15 | 21 | - Constraints in `sql_table` sheds their excessive letter-spacing and is padded from the end consistently [#1372](https://github.com/terrastruct/d2/pull/1372)
|
16 | 22 | - Duplicate image URLs in icons are only fetched once [#1373](https://github.com/terrastruct/d2/pull/1373)
|
17 | 23 | - In watch mode, images are cached by default across compiles. Can be disabled with flag `--img-cache=0`. [#1373](https://github.com/terrastruct/d2/pull/1373)
|
18 | 24 | - Common invalid array separator `,` usage in class arrays returns a helpful error message [#1376](https://github.com/terrastruct/d2/pull/1376)
|
19 | 25 | - Invalid `constraint` usage is met with an error message, preventing a common mistake of omitting `shape: sql_table` [#1379](https://github.com/terrastruct/d2/pull/1379)
|
20 |
| -- Connections now stop at all outside labels. [#1381](https://github.com/terrastruct/d2/pull/1381) |
| 26 | +- Connections no longer obscure outside labels [#1381](https://github.com/terrastruct/d2/pull/1381) |
21 | 27 | - Container connections in `dagre` are more balanced [#1384](https://github.com/terrastruct/d2/pull/1384)
|
22 |
| -- Connections are now mostly masked by shape labels. [#1383](https://github.com/terrastruct/d2/pull/1383) |
| 28 | +- Connections that go through shape labels are now masked translucently [#1383](https://github.com/terrastruct/d2/pull/1383) |
23 | 29 |
|
24 | 30 | #### Bugfixes ⛑️
|
25 | 31 |
|
26 |
| -- Shadow is cut off when `--pad` is 0. Thank you @LeonardsonCC ! [#1326](https://github.com/terrastruct/d2/pull/1326) |
27 |
| -- Fixes grid layout overwriting label placements for nested objects. [#1345](https://github.com/terrastruct/d2/pull/1345) |
| 32 | +- Shadow is no longer cut off when `--pad` is 0. Thank you @LeonardsonCC ! [#1326](https://github.com/terrastruct/d2/pull/1326) |
| 33 | +- Fixes grid layout overwriting label placements for nested objects [#1345](https://github.com/terrastruct/d2/pull/1345) |
28 | 34 | - Fixes fonts not rendering correctly on certain platforms. Thanks @mikeday for identifying the solution. [#1356](https://github.com/terrastruct/d2/pull/1356)
|
29 | 35 | - Fixes folders not rendering in animations (`--animate-interval`) [#1357](https://github.com/terrastruct/d2/pull/1357)
|
30 | 36 | - Fixes panic using reserved keywords as containers [#1358](https://github.com/terrastruct/d2/pull/1358)
|
31 |
| -- When multiple classes are applied changing different attributes of arrowheads, they are |
| 37 | +- When multiple classes are change different attributes of arrowheads, they are |
32 | 38 | all applied instead of only the last one [#1362](https://github.com/terrastruct/d2/pull/1362)
|
33 | 39 | - Prevent empty block strings [#1364](https://github.com/terrastruct/d2/pull/1364)
|
34 |
| -- Fixes dagre mis-aligning a nested shape's connection. [#1370](https://github.com/terrastruct/d2/pull/1370) |
35 |
| -- Fixes a bug in grids sometimes putting a shape on the next row/column. [#1380](https://github.com/terrastruct/d2/pull/1380) |
| 40 | +- Fixes `dagre` mis-aligning a nested shape's connection [#1370](https://github.com/terrastruct/d2/pull/1370) |
| 41 | +- Fixes a bug in grids sometimes putting a shape on the next row/column [#1380](https://github.com/terrastruct/d2/pull/1380) |
0 commit comments