mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
e46db6f1f0
new regression label new regression cards
197 lines
5.1 KiB
JSON
197 lines
5.1 KiB
JSON
{
|
|
"templates": {
|
|
"grid_element": {
|
|
"type": "separator",
|
|
"width": {
|
|
"type": "match_parent",
|
|
"weight": 1
|
|
},
|
|
"height": {
|
|
"type": "match_parent",
|
|
"weight": 1
|
|
},
|
|
"margins": {
|
|
"left": 8,
|
|
"top": 8,
|
|
"right": 8,
|
|
"bottom": 8
|
|
},
|
|
"background": [
|
|
{
|
|
"type": "solid",
|
|
"$color": "background_color"
|
|
}
|
|
],
|
|
"border": {
|
|
"corner_radius": 8
|
|
},
|
|
"delimiter_style": {
|
|
"color": "#00000000"
|
|
}
|
|
},
|
|
"button": {
|
|
"type": "text",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"paddings": {
|
|
"left": 16,
|
|
"top": 16,
|
|
"right": 16,
|
|
"bottom": 16
|
|
},
|
|
"margins": {
|
|
"top": 16,
|
|
"bottom": 16,
|
|
"left": 16,
|
|
"right": 16
|
|
},
|
|
"border": {
|
|
"corner_radius": 8
|
|
},
|
|
"background": [
|
|
{
|
|
"type": "solid",
|
|
"color": "#0E000000"
|
|
}
|
|
],
|
|
"font_size": 16,
|
|
"font_weight": "medium",
|
|
"text_alignment_vertical": "center",
|
|
"text_alignment_horizontal": "center",
|
|
"text_color": "#000000",
|
|
"alpha": 1.0,
|
|
"alignment_horizontal": "center",
|
|
"alignment_vertical": "center"
|
|
}
|
|
},
|
|
"card": {
|
|
"log_id": "grid_layout",
|
|
"variables": [
|
|
{
|
|
"type": "integer",
|
|
"name": "row_span_left",
|
|
"value": 2
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "row_span_right",
|
|
"value": 1
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "container",
|
|
"orientation": "vertical",
|
|
"items": [
|
|
{
|
|
"type": "grid",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": 288
|
|
},
|
|
"height": {
|
|
"type": "fixed",
|
|
"value": 192
|
|
},
|
|
"margins": {
|
|
"top": 16
|
|
},
|
|
"paddings": {
|
|
"left": 8,
|
|
"top": 8,
|
|
"right": 8,
|
|
"bottom": 8
|
|
},
|
|
"alignment_horizontal": "center",
|
|
"column_count": 3,
|
|
"items": [
|
|
{
|
|
"type": "grid_element",
|
|
"row_span": "@{row_span_left}",
|
|
"background_color": "#D098D3"
|
|
},
|
|
{
|
|
"type": "grid_element",
|
|
"background_color": "#FFCC00"
|
|
},
|
|
{
|
|
"type": "grid_element",
|
|
"row_span": "@{row_span_right}",
|
|
"background_color": "#e1bae3"
|
|
},
|
|
{
|
|
"type": "grid_element",
|
|
"column_span": 2,
|
|
"background_color": "#ffe066"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "state",
|
|
"div_id": "button",
|
|
"states": [
|
|
{
|
|
"state_id": "state0",
|
|
"div": {
|
|
"type": "button",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"alignment_vertical": "bottom",
|
|
"text": "Test button",
|
|
"actions": [
|
|
{
|
|
"log_id": "update_row_span_left",
|
|
"url": "div-action://set_variable?name=row_span_left&value=1"
|
|
},
|
|
{
|
|
"log_id": "update_row_span_right",
|
|
"url": "div-action://set_variable?name=row_span_right&value=2"
|
|
},
|
|
{
|
|
"log_id": "update_button",
|
|
"url": "div-action://set_state?state_id=0/button/state1"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"state_id": "state1",
|
|
"div": {
|
|
"type": "button",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"alignment_vertical": "bottom",
|
|
"text": "Test button",
|
|
"actions": [
|
|
{
|
|
"log_id": "update_row_span_left",
|
|
"url": "div-action://set_variable?name=row_span_left&value=2"
|
|
},
|
|
{
|
|
"log_id": "update_row_span_right",
|
|
"url": "div-action://set_variable?name=row_span_right&value=1"
|
|
},
|
|
{
|
|
"log_id": "update_button",
|
|
"url": "div-action://set_state?state_id=0/button/state0"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|