snapshots_test__dynamic_structure_ir.snap raw
---
source: crates/guiduck-component-core/tests/snapshots_test.rs
assertion_line: 166
expression: "compile_or_render_errors(source, \"Dynamic.gdc\")"
---
Ir {
name: "Dynamic",
records: [],
props: [],
outputs: [],
states: [
IrState {
name: "todos",
ty: ValueTy {
kind: Scalar(
String,
),
list: true,
},
init: List(
[
Str(
"a",
),
Str(
"b",
),
],
),
},
IrState {
name: "busy",
ty: ValueTy {
kind: Scalar(
Bool,
),
list: false,
},
init: Bool(
false,
),
},
],
handlers: [],
nodes: [
IrNode {
widget: Widget(
IrWidgetNode {
name: "container",
type_path: "::guiduck::core::Container",
props: [],
events: [],
queries: [],
},
),
classes: [],
style: StyleIr {
width: None,
height: None,
padding: None,
gap: None,
direction: Some(
Column,
),
align_items: None,
justify_content: None,
align_self: None,
grow: None,
shrink: None,
basis: None,
},
events: [],
autofocus: false,
enabled: None,
focused: None,
tooltip: None,
accel: None,
component_props: [],
component_outputs: [],
component_key: None,
control: None,
children: [
1,
4,
],
},
IrNode {
widget: If,
classes: [],
style: StyleIr {
width: None,
height: None,
padding: None,
gap: None,
direction: None,
align_items: None,
justify_content: None,
align_self: None,
grow: None,
shrink: None,
basis: None,
},
events: [],
autofocus: false,
enabled: None,
focused: None,
tooltip: None,
accel: None,
component_props: [],
component_outputs: [],
component_key: None,
control: Some(
If {
cond: Unary(
Not,
Path(
[
"busy",
],
Span {
start: 147,
end: 151,
},
),
Span {
start: 142,
end: 152,
},
),
},
),
children: [
2,
3,
],
},
IrNode {
widget: Widget(
IrWidgetNode {
name: "text",
type_path: "::guiduck::core::Text",
props: [
IrWidgetProp {
name: "text",
setter: "set_text",
ty: RichText,
value: Static(
Str(
"ready",
),
),
},
],
events: [],
queries: [],
},
),
classes: [],
style: StyleIr {
width: None,
height: None,
padding: None,
gap: None,
direction: None,
align_items: None,
justify_content: None,
align_self: None,
grow: None,
shrink: None,
basis: None,
},
events: [],
autofocus: false,
enabled: None,
focused: None,
tooltip: None,
accel: None,
component_props: [],
component_outputs: [],
component_key: None,
control: None,
children: [],
},
IrNode {
widget: Widget(
IrWidgetNode {
name: "text",
type_path: "::guiduck::core::Text",
props: [
IrWidgetProp {
name: "text",
setter: "set_text",
ty: RichText,
value: Static(
Str(
"working",
),
),
},
],
events: [],
queries: [],
},
),
classes: [],
style: StyleIr {
width: None,
height: None,
padding: None,
gap: None,
direction: None,
align_items: None,
justify_content: None,
align_self: None,
grow: None,
shrink: None,
basis: None,
},
events: [],
autofocus: false,
enabled: None,
focused: None,
tooltip: None,
accel: None,
component_props: [],
component_outputs: [],
component_key: None,
control: None,
children: [],
},
IrNode {
widget: For,
classes: [],
style: StyleIr {
width: None,
height: None,
padding: None,
gap: None,
direction: None,
align_items: None,
justify_content: None,
align_self: None,
grow: None,
shrink: None,
basis: None,
},
events: [],
autofocus: false,
enabled: None,
focused: None,
tooltip: None,
accel: None,
component_props: [],
component_outputs: [],
component_key: None,
control: Some(
For {
var: "todo",
index: Some(
"i",
),
list: "todos",
element: Scalar(
String,
),
key: Some(
Path(
[
"todo",
],
Span {
start: 235,
end: 239,
},
),
),
},
),
children: [
5,
],
},
IrNode {
widget: Widget(
IrWidgetNode {
name: "text",
type_path: "::guiduck::core::Text",
props: [
IrWidgetProp {
name: "text",
setter: "set_text",
ty: RichText,
value: Binding(
Str(
Template {
segments: [
Ref(
"i",
Span {
start: 269,
end: 270,
},
),
Literal(
": ",
),
Ref(
"todo",
Span {
start: 274,
end: 278,
},
),
],
},
Span {
start: 267,
end: 280,
},
),
),
},
],
events: [],
queries: [],
},
),
classes: [],
style: StyleIr {
width: None,
height: None,
padding: None,
gap: None,
direction: None,
align_items: None,
justify_content: None,
align_self: None,
grow: None,
shrink: None,
basis: None,
},
events: [],
autofocus: false,
enabled: None,
focused: None,
tooltip: None,
accel: None,
component_props: [],
component_outputs: [],
component_key: None,
control: None,
children: [],
},
],
}