Files
denlvovich 23d2893aef Fixed the problem with empty spaces in the pager when the visibility of an element is gone
commit_hash:fc7165857b2607933f3ae04dfe6e597e29039b25
2025-08-19 20:01:00 +03:00

128 lines
2.7 KiB
JSON

{
"description": "Gallery with items which can change their visibility.",
"platforms": [
"android",
"ios",
"web"
],
"div_data": {
"templates": {
"item": {
"type": "text",
"border": {
"stroke": {
"color": "#000",
"width": 1
}
},
"paddings": {
"top": 12,
"bottom": 12,
"left": 12,
"right": 12
}
}
},
"card": {
"log_id": "item_visibility",
"variables": [
{
"name": "visibility1",
"type": "string",
"value": "gone"
},
{
"name": "visibility3",
"type": "string",
"value": "visible"
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"background": [
{
"type": "solid",
"color": "#EEE"
}
],
"paddings": {
"top": 8,
"bottom": 8,
"left": 8,
"right": 8
},
"items": [
{
"type": "gallery",
"orientation": "vertical",
"items": [
{
"type": "item",
"text": "Item 0"
},
{
"type": "item",
"text": "Item 1",
"visibility": "@{visibility1}"
},
{
"type": "item",
"text": "Item 2"
},
{
"type": "item",
"text": "Item 3",
"visibility": "@{visibility3}"
}
]
}
]
}
}
]
}
},
"steps": [
{
"expected_screenshot": "step0.png"
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=visibility3&value=gone",
"log_id": "hide item 3"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=visibility3&value=visible",
"log_id": "show item 3"
}
],
"expected_screenshot": "step0.png"
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=visibility1&value=visible",
"log_id": "show item 1"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=visibility1&value=gone",
"log_id": "hide item 1"
}
],
"expected_screenshot": "step0.png"
}
]
}