Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infrastructure for help text #64

Open
mojavelinux opened this issue Sep 23, 2015 · 2 comments
Open

Add infrastructure for help text #64

mojavelinux opened this issue Sep 23, 2015 · 2 comments

Comments

@mojavelinux
Copy link
Contributor

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.

deck.fire('help', [{type: 'key', value: 'f', action: 'Toggles fullscreen'}]);

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.

@mojavelinux
Copy link
Contributor Author

Here's a screenshot of the help screen in showoff for reference.

showoff-help

@mojavelinux
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant