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:Item The primary navigation menu is intended for frequently accessed navigation items which open a view in the content section. | NavItemConfig ReactElement< |
Sidebar:PrimaryNav:Above The space directly above the primary navigation menu. | ReactElement |
Sidebar:PrimaryNav:Below The space directly below the primary navigation menu. | ReactElement |
Sidebar:SecondaryNav:Item The secondary navigation menu is intended for infrequently accessed navigation items which open a view in the content section. | NavItemConfig ReactElement< |
Sidebar:SecondaryNav:Above The space directly above the secondary navigation menu. | ReactElement |
Sidebar:SecondaryNav:Below The space directly below the secondary navigation menu. | ReactElement |
Sidebar:BottomToolbar:Item The 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. | IconButtonConfig ReactElement< |
Sidebar:BottomToolbar:Above The space directly above the bottom toolbar. | ReactElement |
Sidebar:BottomToolbar:Below The space directly below the bottom toolbar. | ReactElement |
The topic content view is displayed when the user opens a topic.
Location | Accepts |
---|---|
Topic:Header:Title:Before The space directly before the topic title. | ReactElement |
Topic:Header:Title:After The 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:Item The 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. | IconButtonConfig ReactElement |
Topic:Header:Toolbar:Before The space directly before the topic header toolbar. | ReactElement |
Topic:Header:Toolbar:After The space directly after the header toolbar. | ReactElement |
Topic:Header:Above The space directly above the topic header. | ReactElement |
Topic:Header:Below The space directly below the topic header. | ReactElement |
Topic:Footer:Content Add content into the topic footer. | ReactElement |
Topic:Footer:Top Add content to the top of the topic footer. | ReactElement |
Topic:Footer:Bottom Add content to the bottom of the topic footer. | ReactElement |
Topic:Footer:Above The space directly above the topic footer. | ReactElement |
Topic:Footer:Below The space directly below the topic footer. | ReactElement |