Reworked link priorities

commit_hash:af0eed37e5814230c05ec3e62334770439646838
This commit is contained in:
booster
2026-04-18 23:23:12 +03:00
parent 7f9d927a28
commit dfed8ed591
4 changed files with 107 additions and 11 deletions
@@ -0,0 +1,47 @@
{
"description": "Same ref name (content) used by top-level $-link ($text) and nested non-template $-link ($log_id in actions)",
"templates": {
"action_text": {
"type": "text",
"$text": "content",
"actions": [
{
"$log_id": "content",
"url": "action://do"
}
]
}
},
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "action_text",
"content": "button"
}
}
]
},
"expected": {
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "text",
"text": "button",
"actions": [
{
"log_id": "button",
"url": "action://do"
}
]
}
}
]
}
}
}
@@ -0,0 +1,50 @@
{
"description": "Same ref name (dir) consumed by parent $-link ($orientation) and needed by child template instance ($text)",
"templates": {
"labeled_container": {
"type": "container",
"$orientation": "dir",
"items": [
{
"type": "labeled_text"
}
]
},
"labeled_text": {
"type": "text",
"$text": "dir"
}
},
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "labeled_container",
"dir": "vertical"
}
}
]
},
"expected": {
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"orientation": "vertical",
"items": [
{
"type": "text",
"text": "vertical"
}
]
}
}
]
}
}
}