Scopes: Nested scope navigations (#113394)

* Initial nested scope navigation

* Seperate sections for scope navigation vs groups

* Add ungrouped navigation items

* Create tree structure helper for mock scope navigations

* Improve generated folder structure and add link to change scope

* Update mocks

* DevEnv Navigations

* Remove mocks

* Update button position and add border

* Remove subScope from TreeLink

* Do unblocking async update

* Add loading state

* Allow '' for root groups

* Formatting

* Add unit and integration tests

* Update openapi spec

* Update tooltip for IconButton

* Update i18n

* Make code more DRY

* Update public/app/dev-utils.ts

* update folderUpdate type

* Remove isSubScope in facvor of checking subScopeName

* Do an early return

* Use subScopeName

* Remove use of isSubScope

* Prevent nested items with the same subScope

* Extract filder method to function

---------

Co-authored-by: Mariell Hoversholm <mariell@mardroemmar.dev>
This commit is contained in:
Tobias Skarhed
2025-11-17 17:18:12 +01:00
committed by GitHub
co-authored by Mariell Hoversholm
parent b6d34acc44
commit b79ace082c
12 changed files with 1357 additions and 89 deletions
@@ -209,6 +209,8 @@ type FindScopeNavigationsResults struct {
type ScopeNavigationSpec struct {
URL string `json:"url"`
Scope string `json:"scope"`
// Used to navigate to a sub-scope of the main scope. URL will not be used if this is set.
SubScope string `json:"subScope,omitempty"`
}
// Type of the item.
@@ -635,6 +635,13 @@ func schema_pkg_apis_scope_v0alpha1_ScopeNavigationSpec(ref common.ReferenceCall
Format: "",
},
},
"subScope": {
SchemaProps: spec.SchemaProps{
Description: "Used to navigate to a sub-scope of the main scope. URL will not be used if this is set.",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"url", "scope"},
},