Skip to content

Commit 40fd775

Browse files
andrey-sklskoch13
andauthored
Update youtrack-app.json with conditional 'showHeader' (SchemaStore#5374)
Co-authored-by: skoch13 <skoch13@users.noreply.github.com>
1 parent 9c361a8 commit 40fd775

4 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "showheader-not-allowed-extension-point",
3+
"widgets": [
4+
{
5+
"extensionPoint": "ISSUE_BELOW_SUMMARY",
6+
"indexPath": "index.html",
7+
"key": "issue-widget",
8+
"name": "Issue Widget",
9+
"showHeader": true
10+
}
11+
]
12+
}

src/schemas/json/youtrack-app.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@
241241
"uniqueItems": true,
242242
"description": "The set of permissions required to view and use the widget. Depending on the app scope, these permissions can be required at the global or project level.",
243243
"items": { "$ref": "#/definitions/permissions" }
244+
},
245+
"showHeader": {
246+
"type": "boolean",
247+
"description": "Controls the global top bar for full screen widgets. If set to false, the app must implement a visually consistent custom header or breadcrumbs."
244248
}
245249
},
246250
"allOf": [
@@ -326,6 +330,33 @@
326330
}
327331
}
328332
}
333+
},
334+
{
335+
"if": {
336+
"not": {
337+
"anyOf": [
338+
{
339+
"properties": {
340+
"extensionPoint": { "const": "MAIN_MENU_ITEM" }
341+
},
342+
"required": ["extensionPoint"]
343+
},
344+
{
345+
"properties": {
346+
"extensionPoint": { "const": "ADMINISTRATION_MENU_ITEM" }
347+
},
348+
"required": ["extensionPoint"]
349+
}
350+
]
351+
}
352+
},
353+
"then": {
354+
"properties": {
355+
"showHeader": {
356+
"not": {}
357+
}
358+
}
359+
}
329360
}
330361
],
331362
"required": ["key", "name", "indexPath", "extensionPoint"]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "showheader-administration-menu-item",
3+
"widgets": [
4+
{
5+
"extensionPoint": "ADMINISTRATION_MENU_ITEM",
6+
"indexPath": "index.html",
7+
"key": "admin-menu-widget",
8+
"name": "Admin Menu Widget",
9+
"showHeader": false
10+
}
11+
]
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "showheader-main-menu-item",
3+
"widgets": [
4+
{
5+
"extensionPoint": "MAIN_MENU_ITEM",
6+
"indexPath": "index.html",
7+
"key": "main-menu-widget",
8+
"name": "Main Menu Widget",
9+
"showHeader": true
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)