You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c.errorf(f.LastPrimaryKey(), fmt.Sprintf(`invalid shape, can only set "%s" for arrowheads`, obj.Attributes.Shape.Value))
680
707
}
708
+
case"grid-rows", "grid-columns":
709
+
for_, child:=rangeobj.ChildrenArray {
710
+
ifchild.IsContainer() {
711
+
c.errorf(f.LastPrimaryKey(),
712
+
fmt.Sprintf(`%#v can only be used on containers with one level of nesting right now. (%#v has nested %#v)`, keyword, child.AbsID(), child.ChildrenArray[0].ID))
expErr: `d2/testdata/d2compiler/TestCompile/grid_negative.d2:3:16: grid-columns must be a positive integer: "-200"`,
2290
+
},
2291
+
{
2292
+
name: "grid_edge",
2293
+
text: `hey: {
2294
+
grid-rows: 1
2295
+
a -> b
2296
+
}
2297
+
c -> hey.b
2298
+
hey.a -> c
2299
+
2300
+
hey -> c: ok
2301
+
`,
2302
+
expErr: `d2/testdata/d2compiler/TestCompile/grid_edge.d2:3:2: edges in grid diagrams are not supported yet
2303
+
d2/testdata/d2compiler/TestCompile/grid_edge.d2:5:2: edges in grid diagrams are not supported yet
2304
+
d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:2: edges in grid diagrams are not supported yet`,
2305
+
},
2306
+
{
2307
+
name: "grid_nested",
2308
+
text: `hey: {
2309
+
grid-rows: 200
2310
+
grid-columns: 200
2311
+
2312
+
a
2313
+
b
2314
+
c
2315
+
d.invalid descendant
2316
+
}
2317
+
`,
2318
+
expErr: `d2/testdata/d2compiler/TestCompile/grid_nested.d2:2:2: "grid-rows" can only be used on containers with one level of nesting right now. ("hey.d" has nested "invalid descendant")
2319
+
d2/testdata/d2compiler/TestCompile/grid_nested.d2:3:2: "grid-columns" can only be used on containers with one level of nesting right now. ("hey.d" has nested "invalid descendant")`,
0 commit comments