Navigation Structure¶
When applications register themselves with the Gateway they provide information about the entry point, routing, category and more as defined below. This information is used to construct a navigation structure within the shell and creates the navigation routes that trigger the loading and rendering of these federated applications.
Categories¶
- App: places navigation under a root
Apps
menu, this menu supports a depth of 2- /myApp
- /myApp/section1
- /myApp/section2
- /myApp
- Settings: places navigation under a root
Settings
menu, this menu supports a depth of 2- /myApp
- /myApp/section1
- /myApp/section2
- /myApp
- Dashboard: places navigation under a root
Dashboards
menu, this menu supports a depth of 1 and is a mega menu - Slot: places navigation as Icons within the right side of the site header, max depth is 1 and only pre-defined slots can be used
- Note: There are a maximum of 8 slots (TBD)
- Note: Slots 1 - 5 are reserved for verathread applications and the remaining 3 slots are contextual to the app being loaded
- Slots are named like
slot-1
toslot-8
and their number denotes the order they will appear in from left to right
Data Structure¶
- The id of the default route to navigate to when the path is
/
- The title of the root navigation item in the header
- The order this menu will appear in the header, lower priority will appear first from left to right
- The unique id of the navigation entry
- The menu title, this is a short value, e.g. Users, Account, Rune
- The menu subtitle, displayed inline if possible otherwise a tooltip, this should be a short and direct description of the app
- A base64 encoded svg icon or font-awesome icon name e.g.
fa-info
- If true then the route for the nav entry should have an auth guard attached
- If true the nav item should be enabled, otherwise should be disabled with a tooltip explaining that the service is currently unavailable
- The remote entry module name to use during routing, only used when federating angular apps
- The exposed module name as defined in the webpack federation configuration
- The url to the remote entry file, used by the router to load the entry point of a federated app
- Outlet, only used if the target of the navigation uses named outlets, the router can load the module into that outlet
- Path, the base path for deep linking, the rest of the path is populated by the app's router (must be globally unique otherwise your application will fail to register)
- Sub paths, these can not load modules but instead allow navigating to a sub path of the app directly from the root menu
/root/child
(To be supported later) - Slots are named by the order they would appear on the right side of the header, apps making use of slots must make sure their app renders an icon and not content suited to a page
- Description of the slot item, can be used for logging or error handling
- The id of the module
- If true then the icon should be disabled with a tooltip letting the user know that they need to log in first
- If true then the slot should be enabled, otherwise disabled with a tooltip letting the user know that the service is unavailable
- If true then the router should be registered but the menu entry should be hidden