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

[WIP] IPyWidgets Backend for TraitsUI #469

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

corranwebster
Copy link
Contributor

@corranwebster corranwebster commented Jul 15, 2018

Highly experimental, to the point that it possibly should live in its own project, but it can live here for now. To get it to work currently:

  • create a new EDM python 3.6 environment
  • install the ipywidgets with pip install ipywidgets
  • install traitsui and dependencies with edm install traitsui
  • remove the EDM installed traitsui with pip uninstall traitsui
  • install this branch with pip install -e .

Things that still need to be done:

  • build out a bunch of editors
  • toolkit specific color and font traits
  • image resources
  • support for embedding in ipywidgets UIs (may work already, but untested)
  • check various ways of configuring views
  • clean up the ui_panel.py code
  • had to remove StandardDialogMenu because we don't have menu support (and won't), so need to work out how to handle instantiating pyface menus, actions, etc.

@corranwebster
Copy link
Contributor Author

Looks like test failure in last commit was because Github was inaccessible - re-started the failed test to be sure.

@prabhuramachandran
Copy link
Member

@corranwebster -- thanks. there are a couple of things that you might want to refactor:

  • In the last commit there is a _repr_html_ method that I inject to make it easy to display a UI, this really should go somewhere else, I was not sure where though.
  • The button editor doesn't work because pyface doesn't implement
    resource_manager:PyfaceResourceFactory for the ipywidgets backend. I see that you already have this in the list of issues above but thought I'd just mention it here.

I'll try to push a few more editors as time permits.

@corranwebster
Copy link
Contributor Author

It looks like IPyWidgets buttons are limited to showing icons from the Font Awesome icon set only, so we probably won't be able to integrate with that.

@prabhuramachandran
Copy link
Member

Yes, it might be a good idea to take some notes on what we would need better support for and send that to the ipywidgets devs.

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

Successfully merging this pull request may close these issues.

3 participants