changelog

This commit is contained in:
Alexander Wang 2023-12-06 04:57:35 -08:00
parent d96f2c5efb
commit 57e7eb8008
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
3 changed files with 367 additions and 10 deletions

View file

@ -1,28 +1,34 @@
D2 0.6.2 makes grid diagrams significantly more powerful. Namely, connections can now be made from grid elements to other grid elements. This enables diagrams like the following.
In addition, another significant feature is that using the ELK layout engine will now route SQL diagrams to their exact columns.
Note that all previous playground links will be broken given the encoding change. The encoding used to use the keyword set as compression dictionary, but it no longer does, so this will be the last time playground links break.
#### Features 🚀
- ELK now routes `sql_table` edges to the exact columns (ty @landmaj) [#1681](https://github.com/terrastruct/d2/pull/1681)
- Adds new unfilled triangle arrowhead. [#1711](https://github.com/terrastruct/d2/pull/1711)
- Grid containers can now have custom label positions. [#1715](https://github.com/terrastruct/d2/pull/1715)
- A single board from a multi-board diagram can now be rendered with `--target` flag. [#1725](https://github.com/terrastruct/d2/pull/1725)
- ELK routes `sql_table` edges to the exact columns (ty @landmaj) [#1681](https://github.com/terrastruct/d2/pull/1681)
- Unfilled triangle arrowhead is available. [#1711](https://github.com/terrastruct/d2/pull/1711)
- Grid containers customize label positions. [#1715](https://github.com/terrastruct/d2/pull/1715)
- A single board from a multi-board diagram can be rendered with `--target` flag. [#1725](https://github.com/terrastruct/d2/pull/1725)
#### Improvements 🧹
- Grid cells can now contain nested edges [#1629](https://github.com/terrastruct/d2/pull/1629)
- Edges can now go across constant nears, sequence diagrams, and grids including nested ones. [#1631](https://github.com/terrastruct/d2/pull/1631)
- Grid cells can contain nested edges [#1629](https://github.com/terrastruct/d2/pull/1629)
- Edges can go across constant `near`s, sequence diagrams, and grids, including nested ones. [#1631](https://github.com/terrastruct/d2/pull/1631)
- All vars defined in a scope are accessible everywhere in that scope, i.e., an object can use a var defined after itself. [#1695](https://github.com/terrastruct/d2/pull/1695)
- Encoding API switches to standard zlib encoding so that decoding doesn't depend on source. [#1709](https://github.com/terrastruct/d2/pull/1709)
- `currentcolor` is accepted as a color option to inherit parent colors. (ty @hboomsma) [#1700](https://github.com/terrastruct/d2/pull/1700)
- grid containers can now be sized with `width`/`height` even when using a layout plugin without that feature. [#1731](https://github.com/terrastruct/d2/pull/1731)
- Grid containers can be sized with `width`/`height` even when using a layout plugin without that feature. [#1731](https://github.com/terrastruct/d2/pull/1731)
- Watch mode watches for changes in both the input file and imported files [#1720](https://github.com/terrastruct/d2/pull/1720)
#### Bugfixes ⛑️
- Fixes a bug calculating grid height with only grid-rows and different horizontal-gap and vertical-gap values. [#1646](https://github.com/terrastruct/d2/pull/1646)
- Grid layout now accounts for each cell's outside labels and icons [#1624](https://github.com/terrastruct/d2/pull/1624)
- Grid layout now accounts for labels wider or taller than the shape and fixes default label positions for image grid cells. [#1670](https://github.com/terrastruct/d2/pull/1670)
- Grid layout accounts for each cell's outside labels and icons [#1624](https://github.com/terrastruct/d2/pull/1624)
- Grid layout accounts for labels wider or taller than the shape and fixes default label positions for image grid cells. [#1670](https://github.com/terrastruct/d2/pull/1670)
- Fixes a panic with a spread substitution in a glob map [#1643](https://github.com/terrastruct/d2/pull/1643)
- Fixes use of `null` in `sql_table` constraints (ty @landmaj) [#1660](https://github.com/terrastruct/d2/pull/1660)
- Fixes elk growing shapes with width/height set [#1679](https://github.com/terrastruct/d2/pull/1679)
- Fixes ELK growing shapes with width/height set [#1679](https://github.com/terrastruct/d2/pull/1679)
- Adds a compiler error when accidentally using an arrowhead on a shape [#1686](https://github.com/terrastruct/d2/pull/1686)
- Correctly reports errors from invalid values set by globs. [#1691](https://github.com/terrastruct/d2/pull/1691)
- Fixes panic when spread substitution referenced a nonexistant var. [#1695](https://github.com/terrastruct/d2/pull/1695)

View file

@ -0,0 +1,171 @@
classes: {
empty: {
label: ""
style: {
fill: transparent
stroke-width: 0
}
}
text: {
style: {
fill: transparent
stroke-width: 0
}
}
cluster: {
style: {
fill: transparent
stroke-dash: 4
stroke: "#C6D3DF"
}
}
grid: {
grid-columns: 1
label: ""
style: {
fill: white
stroke-width: 0
}
}
row: {
grid-rows: 1
label: ""
style: {
fill: transparent
stroke-width: 0
}
}
}
vars: {
left-cluster: {
label: "n-sized Vector"
class: cluster
0*.style.fill: "#DFEFFA"
0*.style.stroke: black
grid-rows: 1
grid-gap: 0
label.near: outside-top-left
"0.62"
"0.15"
empty1.class: empty
n.class: text
empty2.class: empty
"0.91"
"0.48"
"0.15" <- n -> "0.91"
}
right-cluster: {
label: "m-sized Vector"
class: cluster
0*.style.fill: "#72F5FF"
0*.style.stroke: black
grid-rows: 1
grid-gap: 0
label.near: outside-top-left
"0.62"
"0.15"
empyt1.class: empty
m.class: text
empty2.class: empty
"0.91"
"0.48"
"0.15" <- m -> "0.91"
}
}
grid-rows: 2
top-row: {
class: row
empty.class: empty
empty.width: 1100
Random Matrix Generator: {
width: 300
height: 170
style.font-size: 20
style.fill: "#A7BBCF"
style.stroke: black
style.border-radius: 10
}
}
bottom-row: {
class: row
left-grid: {
class: grid
1: ${left-cluster}
2: ${left-cluster}
3: ${left-cluster}
}
dot-container: {
class: empty
grid-columns: 1
empty1.class: empty
dot: Dot product{
class: text
circle: "" {
shape: circle
style.fill: black
style.stroke-width: 0
width: 20
height: 20
}
label.near: outside-bottom-center
}
}
matrix-container: {
class: empty
grid-columns: 1
matrix: Target dimension matrix {
label.near: outside-top-center
grid-rows: 4
grid-gap: 0
*.width: 100
*.height: 100
*.style.fill: "#F1F6F9"
*.style.stroke: black
"0.41"
"0.32"
"0.92"
"0.13"
"0.74"
"0.15"
"0.53"
"0.21"
"0.97"
"0.45"
"0.11"
"0.05"
"0.61"
"0.77"
"0.59"
"0.83"
}
}
empty.class: empty
right-grid: {
class: grid
1: ${right-cluster}
2: ${right-cluster}
3: ${right-cluster}
}
matrix-container -> right-grid
}
top-row.Random Matrix Generator -> bottom-row.matrix-container.matrix

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 192 KiB