Open mojavelinux opened 9 years ago
Here's a screenshot of the help screen in showoff for reference.
We may want to split action into action and desc.
deck.fire('help', [{type: 'key', value: 'right', action: 'next', desc: 'Move to the next slide.'}]);
That way, multiple events with the same action (e.g., next) can be combined as shown in the screenshot.
While it's not the responsibility of bespoke.js core to provide a help view, it would be nice if core could maintain and expose help metadata so that this information can be collected and displayed.
One possible way is simply define a contract (in the README) that any plugin that contributes keybindings should fire and event with metadata for a help plugin.
Another way would be to expose methods that can be used to register and retrieve help metadata.
The focus is to figure out what foundation is necessary to make it possible to write a help plugin. The main decision is to work out the structure of the metadata. Next, we need to figure out how to get that metadata to the help plugin.