Use navigation by types instead of spaces (#10083)

This commit is contained in:
Artyom Savchenko
2025-10-14 18:51:45 +07:00
committed by GitHub
parent 1fa510506b
commit 206880fed6
11 changed files with 153 additions and 21 deletions
+16
View File
@@ -114,6 +114,7 @@ export interface ApplicationNavModel extends Doc {
spaces?: SpacesNavModel[]
specials?: SpecialNavModel[]
groups?: GroupsNavModel[]
}
/** @public */
@@ -136,10 +137,25 @@ export interface SpacesNavModel {
visibleIf?: Resource<(space: Space) => Promise<boolean>>
}
/** @public */
export interface GroupsNavModel {
id: string // Id could be used for extending of navigation model
label?: IntlString
groupByClass: Ref<Class<Doc>> // Any class to group by (MasterTag, Project, etc.)
icon?: Asset
component?: AnyComponent // Component to render the group navigation (e.g., TypesNavigator)
// Child special items.
specials?: SpecialNavModel[]
visibleIf?: Resource<(docs: Doc[]) => Promise<boolean>>
}
/** @public */
export interface NavigatorModel {
spaces: SpacesNavModel[]
specials?: SpecialNavModel[]
groups?: GroupsNavModel[]
}
/** @public */