Page History
...
- the node types the action is available for
- whether its available when there's no selection
- and whether its available for properties
The actionbar should only show one section at a time. The section to show depends on the selected node. Therefore we need to configure:
- the node types the action is available for
- whether its available when there's no selection
- and whether its available for properties
Q: We currently toggle show/hide on sections based on the node types. Is this desirable? It has the effect of actions moving around when the selection changes.
A: We never want to show more than one section at a time. The contacts app should be changed to behave this way.
Q: Do we want to hide a section if all its actions are disabled? What if the user is not authorized to use any of the actions does it then make sense to hide the section?
A: Based on the answer above we should never hide a section because that would make the actionbar empty.
Access Control
Determining wether the current user has access to an actions action should be based on roles. We need to configure the required roles on the action definition.
If the user does not have access we will show the action as disabled in the actionbar.
If no roles are specified on the action definition it is assumed to mean that everybody has access.
Appendix 1 - The current availability behaviour
...
Name | Type | Default | Description |
---|---|---|---|
noSelection | boolean | false | available when no selection or not |
nodeTypes | node | node with subnodes for each node type | |
properties | boolean | false | available for properties or not |
if no constraints are configured for an action it takes the decision of the containing group, otherwise it takes its own decision
there is no way to configure availability for all node types
there is still a need for custom logic, like for checking activateRecursive, which is fine, because its unusual, but for undo/redo there ALWAYS has to be a custom check
Appendix 2 - Previous notes
Problem
The action bar can take several states within one sub-app.
...