...

Text file src/oss.terrastruct.com/d2/ci/release/changelogs/v0.6.0.md

Documentation: oss.terrastruct.com/d2/ci/release/changelogs

     1D2 v0.6 introduces variable substitutions and globs. These two were the last of the features planned in the initial designs for D2, and v1 is now very close!
     2
     3The power of variables and globs in a programming language need no introduction, so here's two minimal examples to get started:
     4
     5**Variables**:
     6```d2
     7vars: {
     8  color: aquamarine
     9}
    10
    11x.style.fill: ${color}
    12```
    13
    14**Globs**:
    15```d2
    16x
    17y
    18z
    19
    20*.style.fill: aquamarine
    21```
    22
    23Both are live on [D2 Playground](https://play.d2lang.com) so give it a try! Looking forward to your issues and iterating 
    24
    25Layout capability also takes a subtle but important step forward: you can now customize the position of labels and icons.
    26
    27#### Features ๐Ÿš€
    28
    29- Variables and substitutions are implemented. See [docs](https://d2lang.com/tour/vars). [#1473](https://github.com/terrastruct/d2/pull/1473)
    30- Configure timeout value with D2_TIMEOUT env var [#1392](https://github.com/terrastruct/d2/pull/1392)
    31- Scale renders and disable fit to screen with `--scale` flag [#1413](https://github.com/terrastruct/d2/pull/1413)
    32- `null` keyword can be used to un-declare. See [docs](https://d2lang.com/tour/overrides#null) [#1446](https://github.com/terrastruct/d2/pull/1446)
    33- Develop multi-board diagrams in watch mode (links to layers/scenarios/steps work in `--watch`) [#1503](https://github.com/terrastruct/d2/pull/1503)
    34- Glob patterns have been implemented. See [docs](https://d2lang.com/tour/globs). [#1479](https://github.com/terrastruct/d2/pull/1479)
    35- Ampersand filters have been implemented. See [docs](https://d2lang.com/tour/filters). [#1509](https://github.com/terrastruct/d2/pull/1509)
    36
    37#### Improvements ๐Ÿงน
    38
    39- Display version on CLI help invocation [#1400](https://github.com/terrastruct/d2/pull/1400)
    40- Improved readability of connection labels when they overlap another connection [#447](https://github.com/terrastruct/d2/pull/447)
    41- Error message when `shape` is given a composite [#1415](https://github.com/terrastruct/d2/pull/1415)
    42- Improved rendering and text measurement for code shapes [#1425](https://github.com/terrastruct/d2/pull/1425)
    43- The autoformatter moves board declarations to the bottom of its scope [#1424](https://github.com/terrastruct/d2/pull/1424)
    44- All font styles in sketch mode use a consistent font-family [#1463](https://github.com/terrastruct/d2/pull/1463)
    45- Tooltip and link icons are positioned on shape border [#1466](https://github.com/terrastruct/d2/pull/1466)
    46- Tooltip and link icons are always rendered over shapes [#1467](https://github.com/terrastruct/d2/pull/1467)
    47- Boards with no objects are considered folders [#1504](https://github.com/terrastruct/d2/pull/1504)
    48- `DEBUG` environment variable ignored if set incorrectly [#1505](https://github.com/terrastruct/d2/pull/1505)
    49
    50#### Bugfixes โ›‘๏ธ
    51
    52- Fixes edge case in compiler using dots in quotes [#1401](https://github.com/terrastruct/d2/pull/1401)
    53- Fixes grid label font size for TALA [#1412](https://github.com/terrastruct/d2/pull/1412)
    54- Fixes person shape label positioning with `multiple` or `3d` [#1478](https://github.com/terrastruct/d2/pull/1478)

View as plain text