The question/debate is about the context menu items :
- should I allow all commands at any time, then, when a user selects an action, either perform it or explain why it cannot be done (like missing access rights)
- should I grey out items that cannot be executed in the context.
To make it clear : this is not about greyed-out vs. invisible items; this would be a later choice given the state of the command is known; this question is about showing selectable menu items vs greyed-out-or-invisible menu items and the cost of doing so.
Context :
- a document management webapp that has an explorer-like user interface (with folders, too)
- all data is persisted in a database back-end
- the user can display a context menu (about 30-40 commands in it) over a selection of documents and/or folders; the size of the selection is not limited and can be easily beyond 100 items
- there is an access rights model that handles access rights at document level for users and groups (for instance I may not have been assigned directly a specific right on a specific document, but because one of the groups I'm member of has it then I have it)
- folders and documents have a persistent state (saved in the database)
- folders and documents also have a transient state (which obviously does not 'live' past system restarts)
- the system may handle up to 100M documents (although probably an average value would be between 100K - 500K documents)
Given the context...
- The main disadvantage of the first approach seems to be that users can execute commands that may have nothing to do with the selection... but at least they end up with a message saying so.
- The main disadvantage of the second approach is that given N commands and a selection of M items that means that some N*M checks have to be performed (obviously depending on the algorithm used), most involving database access with a non-negligeable cost.
Caching in memory doesn't seem a very efficient approach since the different users are unlikely to request data on the same items and cache maintenance (expiration and eviction may create additional cost with little value)
Any thoughts on this matter are highly appreciated. I'm quite sure a definitive solution does not exist, but I think based on others' experience one may find a solution appropriate to their own problem.