Custom menus allow to configure the menus of different views. This provides flexibility on the app ui as menu entries can be customized with different stiling, icons, labels and grouped by the developer preferences.
Entries menu customization
There are some principles to keep in mind when using the menu at the builder side:
- All the possible entries that the menu has will be shown in the menu. Entries cannot be deleted but they can be set to be hidden.
- Only groups can be created. If a group is saved without any entries, the group will be deleted automatically except for the
more
group that is used to place entries on refactorings.
Entries can be ordered and nested within different groups. All entries have a flag of visible
and default options
and a configuration
that depends on the entry type.
Menu groups
This type of entry contains other menu entries. It will be rendered as a dropdown in the runtime. It has the following properties:
- Show default action: It renders the group as a split button allowing to execute an action or show a dropdown with the entries
- Expanded group: Expanded group show a split button with the nested entries
- Only icon: The entry won’t show the group label. This can be configured only at root level.
- Icon: The icon to be shown in the button
- Style: The layout and styling of the button. It can be
Regular
,Primary
,Success
,Warning
andDanger
Action entries
These buttons allow to execute entity actions system actions, like crud actions or refresh. They has the following properties:
- Only icon: The entry won’t show the group label. This can be configured only at root level.
- Icon: The icon to be shown in the button.
- Style: The layout and styling of the button. It can be
Regular
,Primary
,Success
,Warning
andDanger
. - Label of action: The label of the button
Managed behavior
Custom menu can be configured to be managed by the app. That means that the platform will do do some automatic updates on the menu on metadata changes like on entity actions order change or creation. System actions and entity actions are managed differently. Also, there are 2 different manged behaviour depending on the menu type:
- Main menu: This is the menu in the header of the view.
- Entity actions: entity actions entries that are placed in the
more
group will be sorted. If an entity action entry is placed outside this group it will be excluded from the sorting. New entity actions that are created will be placed in that group with default options and the visibility set astrue
- System actions: system actions will be sorted when they are at root level of the main menu. If they are not, they will be excluded from the automatic sorting.
- Entity actions: entity actions entries that are placed in the
- Record menu: This is the menu related to a record in the collection view. Entity actions and system action will be managed by
the app when they belong to the
more
group.
On refactorings, if the menu is not managed, new entries will be added on the more
group with the visibility disabled.
Reset custom menu configuration to default
The custom menu configuration can be rested to it’s default by setting the menu configuration to ALL
, SOME
or SYSTEM
and saving.
This default configuration would replicate the menu behaviour as if the ALL
option was selected.