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

Keyboard Shortcuts Plugin #734

Closed
wants to merge 3 commits into from
Closed

Keyboard Shortcuts Plugin #734

wants to merge 3 commits into from

Conversation

roshancvp
Copy link
Member

@ellisonbg
Copy link
Contributor

I take it that this is still a work in progress?

@roshancvp
Copy link
Member Author

@ellisonbg Ah yes. The previous PR had some merge conflicts I couldn't resolve.

@ellisonbg
Copy link
Contributor

One comment, let's make a subclass of Widget for this:

class KeyboardShortcutViewer extends Widget {
  ...
}

And then put all of the virtual DOM stuff in there.

@sccolbert
Copy link
Contributor

The benefit of making it a widget subclass is that you can encapsulate state. For example, the keybindings may change at runtime in the future, once we make a keybinding editor plugin. You'll want this plugin to re-render itself whenever that happens. So, your widget should connect to the bindingsChanged signal and update itself whenever that signal is fired. Your rendering logic should go in the overridden protected onUpdateRequest method of your widget. Then just call .update() whenever you need the widget to render.

@ellisonbg
Copy link
Contributor

Hi @roshancvp !!!

To help simplify the patterns of working with the virtual DOM APIS, we have created a new VDomModel and VDomWidget classes that encode the best practices for working with this API. These new APIs are documented here:

https://github.com/jupyter/jupyterlab/blob/master/tutorial/virtualdom.md

Could you update this PR to use these classes? Please let me know if you have any questions!

@charnpreetsingh
Copy link
Contributor

@roshancvp Mind if I pick up on where this left off?

@blink1073
Copy link
Member

Any word on this @roshancvp, @charnpreetsingh?

@blink1073
Copy link
Member

Closing this one since it will require a fresh start when implemented.

@blink1073 blink1073 closed this Jan 23, 2017
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Aug 10, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. status:Work in Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants