Info bar dynamic message
The info bar currently works via mouse enter/leave events on elements that trigger changing it's content. This has 2 negative side effects:
- Elements may accidentally clear content that is not set by themselves on mouse leave.
- The generated content (such as path to current state) may change while the mouse remains inside the element.
A possible solution is to support setting the content to a command that is evaluated by the info bar on render. This command would then easily support updates based on the store.
For example:
{
command: 'state-path',
args: ['some-state-id']
}
Commands:
- state-path: state-id
- menu-item-help: item-id
- static-text: title subtitle
This would fix problem 2 as the menu would be have enough information to recompute the appropriate info text when the state changes.
Then since the commands are fixed a trigger can attach the command they sent with the clear request to ensure they only cancel the request they sent. This would fix problem 1.