Skip to content

Commit

Permalink
Merge pull request #175 from terrastruct/0.6.0
Browse files Browse the repository at this point in the history
0.6.0
  • Loading branch information
alixander authored Jul 31, 2023
2 parents 9b0fade + 0850689 commit d985df1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
54 changes: 54 additions & 0 deletions docs/releases/0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
D2 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!

The power of variables and globs in a programming language need no introduction, so here's two minimal examples to get started:

**Variables**:
```d2
vars: {
color: aquamarine
}
x.style.fill: ${color}
```

**Globs**:
```d2
x
y
z
*.style.fill: aquamarine
```

Both are live on [D2 Playground](https://play.d2lang.com) so give it a try! Looking forward to your issues and iterating

Layout capability also takes a subtle but important step forward: you can now customize the position of labels and icons.

#### Features 🚀

- Variables and substitutions are implemented. See [docs](https://d2lang.com/tour/vars). [#1473](https://github.com/terrastruct/d2/pull/1473)
- Configure timeout value with D2_TIMEOUT env var [#1392](https://github.com/terrastruct/d2/pull/1392)
- Scale renders and disable fit to screen with `--scale` flag [#1413](https://github.com/terrastruct/d2/pull/1413)
- `null` keyword can be used to un-declare. See [docs](https://d2lang.com/tour/overrides#null) [#1446](https://github.com/terrastruct/d2/pull/1446)
- Develop multi-board diagrams in watch mode (links to layers/scenarios/steps work in `--watch`) [#1503](https://github.com/terrastruct/d2/pull/1503)
- Glob patterns have been implemented. See [docs](https://d2lang.com/tour/globs). [#1479](https://github.com/terrastruct/d2/pull/1479)
- Ampersand filters have been implemented. See [docs](https://d2lang.com/tour/filters). [#1509](https://github.com/terrastruct/d2/pull/1509)

#### Improvements 🧹

- Display version on CLI help invocation [#1400](https://github.com/terrastruct/d2/pull/1400)
- Improved readability of connection labels when they overlap another connection [#447](https://github.com/terrastruct/d2/pull/447)
- Error message when `shape` is given a composite [#1415](https://github.com/terrastruct/d2/pull/1415)
- Improved rendering and text measurement for code shapes [#1425](https://github.com/terrastruct/d2/pull/1425)
- The autoformatter moves board declarations to the bottom of its scope [#1424](https://github.com/terrastruct/d2/pull/1424)
- All font styles in sketch mode use a consistent font-family [#1463](https://github.com/terrastruct/d2/pull/1463)
- Tooltip and link icons are positioned on shape border [#1466](https://github.com/terrastruct/d2/pull/1466)
- Tooltip and link icons are always rendered over shapes [#1467](https://github.com/terrastruct/d2/pull/1467)
- Boards with no objects are considered folders [#1504](https://github.com/terrastruct/d2/pull/1504)
- `DEBUG` environment variable ignored if set incorrectly [#1505](https://github.com/terrastruct/d2/pull/1505)

#### Bugfixes ⛑️

- Fixes edge case in compiler using dots in quotes [#1401](https://github.com/terrastruct/d2/pull/1401)
- Fixes grid label font size for TALA [#1412](https://github.com/terrastruct/d2/pull/1412)
- Fixes person shape label positioning with `multiple` or `3d` [#1478](https://github.com/terrastruct/d2/pull/1478)
4 changes: 2 additions & 2 deletions docs/releases/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

:::info Latest

Version: [0.5.1](/releases/0.5.1) (released June 9, 2023)
Version: [0.6.0](/releases/0.6.0) (released July 30, 2023)

Downloads: [Assets](https://github.com/terrastruct/d2/releases/tag/v0.5.1)
Downloads: [Assets](https://github.com/terrastruct/d2/releases/tag/v0.6.0)

:::

Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const sidebars = {
link: { type: "doc", id: "releases/intro" },
items: [
"releases/intro",
"releases/0.6.0",
"releases/0.5.1",
"releases/0.5.0",
"releases/0.4.2",
Expand Down

0 comments on commit d985df1

Please sign in to comment.