Locations at which UI components can be inserted.
Extensions can extend MindDrop's UI by inserting UI elemnts throughout different locations. This is done using the app.extendUi method, which takes a UiLocation as its first parameter, and a UiComponentConfig or React element as its second parameter.
Locations are referenced in a hierarchical fashion, generally in the form:
[Section]:[Subsection?]:[Container]:[Target]
For example, to add an item to the sidebar's primary navigation menu:
Sidebar:PrimaryNav:Item
Sidebar being the section, PrimaryNav the container, and Item the target. In this case there is no subsection.
The MindDrop UI features two primary sections: Sidebar and [Content]. The [Content] section is referenced using a name based on the view, such as Topic when targetting the topic view.
Some sections contain subsections, such as Header and Footer.
Containers generally contain similar UI elements, such as a menu containing navigation items.
Content: add content into a container.
Item: add an item into a menu or list container.
Top: add content before other content in a vertical container.
Bottom: add content after other content in a vertical container.
Start: add content before other content in a horizontal container.
End: add content after other content in a horizontal container.
Above: the space directly above the container.
Below: the space directly below the container.
Before: the space directly to the left (or right in RTL languages) of the container.
After: the space directly to the right (or left in RTL languages) of the container.
Not all containers offer every target keyword. For example, toolbars can be extended using Item, but not Top or Bottom as they are intended to be a single row.
The load order of extensions determines the order in which elements are inserted. If multiple extensions add content Above into a container, the content added by the extension loaded last will come out on top.
The sidebar allows the user to navigate to any view within the app and launch app related actions from it's bottom toolbar.
| Location | Accepts |
|---|---|
Sidebar:PrimaryNav:ItemThe primary navigation menu is intended for frequently accessed navigation items which open a view in the content section. | NavItemConfigReactElement< |
Sidebar:PrimaryNav:AboveThe space directly above the primary navigation menu. | ReactElement |
Sidebar:PrimaryNav:BelowThe space directly below the primary navigation menu. | ReactElement |
Sidebar:SecondaryNav:ItemThe secondary navigation menu is intended for infrequently accessed navigation items which open a view in the content section. | NavItemConfigReactElement< |
Sidebar:SecondaryNav:AboveThe space directly above the secondary navigation menu. | ReactElement |
Sidebar:SecondaryNav:BelowThe space directly below the secondary navigation menu. | ReactElement |
Sidebar:BottomToolbar:ItemThe bottom toolbar is intended for commonly used application actions (i.e. not content view specific). It can only contain icon buttons. Toolbar actions should not open content views, rather, they should open a dropdown menu, popover, or dialog. | IconButtonConfigReactElement< |
Sidebar:BottomToolbar:AboveThe space directly above the bottom toolbar. | ReactElement |
Sidebar:BottomToolbar:BelowThe space directly below the bottom toolbar. | ReactElement |
The topic content view is displayed when the user opens a topic.
| Location | Accepts |
|---|---|
Topic:Header:Title:BeforeThe space directly before the topic title. | ReactElement |
Topic:Header:Title:AfterThe space directly after the topic title. Note that the topic title flexes to fill the available space up until the toolbar. | ReactElement |
Topic:Header:Toolbar:ItemThe toolbar on the right hand side of the topic header. All topic specific actions should be placed here, preferably using an icon button if appropriate. | IconButtonConfigReactElement |
Topic:Header:Toolbar:BeforeThe space directly before the topic header toolbar. | ReactElement |
Topic:Header:Toolbar:AfterThe space directly after the header toolbar. | ReactElement |
Topic:Header:AboveThe space directly above the topic header. | ReactElement |
Topic:Header:BelowThe space directly below the topic header. | ReactElement |
Topic:Footer:ContentAdd content into the topic footer. | ReactElement |
Topic:Footer:TopAdd content to the top of the topic footer. | ReactElement |
Topic:Footer:BottomAdd content to the bottom of the topic footer. | ReactElement |
Topic:Footer:AboveThe space directly above the topic footer. | ReactElement |
Topic:Footer:BelowThe space directly below the topic footer. | ReactElement |