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

Create a demo viewer app #24

Open
corranwebster opened this issue Dec 17, 2019 · 0 comments
Open

Create a demo viewer app #24

corranwebster opened this issue Dec 17, 2019 · 0 comments

Comments

@corranwebster
Copy link
Contributor

corranwebster commented Dec 17, 2019

This is a large issue that should take some time to complete, and have multiple sub-parts. The goal is to create a comprehensive demo application that is an improved version of traitsui.extras.demo and TraitsUI examples/tutor.py that has the following features:

  • is an Envisage + Tasks application
  • the Task has a basic layout of:
    • a dockpane tree view of examples/demos
    • a dockpane showing an HTML description of the selected item in the tree view
    • a dockpane showing the source code of the selected item in the tree view (if any). This should be user editable, and changes applied to the example/demo when it is next run.
    • a dockpane with an IPython prompt (this can be more-or-less taken from Envisage)
    • a central pane with editors that show the content of running demos (if they are embeddable).
    • dockpanes with stdout, stderr and logging information for the active editor
  • if an item is activated in the tree view (usually double-click on it) or if a run action is fired while an item is selected, the example/demo is executed:
    • some items may be descriptive only, in which case the run action should be disabled
    • some items may not have any UI component (especially Traits examples) and so may make sense to just run in the IPython kernel
    • some items may run an external script in a sub-process (eg. a more complex application)
    • some items may pop up a modal or non-modal dialog
    • but many will create an object that can be displayed in an editor in the central pane.
    • appropriate values from the example/demo's namespace will be populated into the IPython kernel so users can inspect/interact with them
  • if the active editor is changed, the selection should track that (so the description and code dockpanes are synchronized with the active editor).
  • the examples/demos are contributed via extension points so new libraries can make their own demos available to the application
  • plugins should be able to contribute new example/demo types (eg. the Kiva example plugin should be able to contribute a new example/demo type for displaying a graphics context that the example code draws into).

If done well, this application should be useable without Envisage, so we can use a basic Tasks-only version of the application for Pyface/TraitsUI demos/examples, and then have better extensions for Enable and Chaco examples. This may mean that significant parts of the code live in TraitsUI, Enable and Chaco.

Icing on the cake would be to add example search via something like Whoosh.

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

No branches or pull requests

1 participant