PluginTemplateMixin#
- class jdaviz.core.template_mixin.PluginTemplateMixin(*args, **kwargs)[source]#
Bases:
TemplateMixin
This base class can be inherited by all sidebar/tray plugins to expose common functionality.
Public constructor
Attributes Summary
An instance of a Python list.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A boolean (True, False) trait.
A trait for unicode strings.
A boolean (True, False) trait.
A float trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
Methods Summary
Context manager to temporarily enable keep_active and enable live-previews and keypress events, even if the plugin UI is not opened.
close_in_tray
([close_sidebar])Close the plugin in the sidebar/tray.
new
()open_in_tray
([scroll_to])Open the plugin in the sidebar/tray (and open the sidebar if it is not already).
show
([loc, title])Display the plugin UI.
vue_plugin_ping
(ping_timestamp)Attributes Documentation
- api_methods#
An instance of a Python list.
- disabled_msg#
A trait for unicode strings.
- docs_description#
A trait for unicode strings.
- docs_link#
A trait for unicode strings.
- irrelevant_msg#
A trait for unicode strings.
- is_active#
A boolean (True, False) trait.
- keep_active#
A boolean (True, False) trait.
- plugin_description#
- plugin_key#
A trait for unicode strings.
- plugin_opened#
A boolean (True, False) trait.
- previews_last_time#
A float trait.
- previews_temp_disabled#
A boolean (True, False) trait.
- scroll_to#
A boolean (True, False) trait.
- spinner#
A boolean (True, False) trait.
- supports_auto_update#
A boolean (True, False) trait.
- user_api#
- uses_active_status#
A boolean (True, False) trait.
Methods Documentation
- as_active()[source]#
Context manager to temporarily enable keep_active and enable live-previews and keypress events, even if the plugin UI is not opened.
- close_in_tray(close_sidebar=False)[source]#
Close the plugin in the sidebar/tray.
- Parameters:
- close_sidebarbool
Whether to also close the sidebar itself.
- open_in_tray(scroll_to=True)[source]#
Open the plugin in the sidebar/tray (and open the sidebar if it is not already).
- Parameters:
- scroll_tobool, optional
Whether to immediately scroll to the plugin opened in the tray.
- show(loc='inline', title=None)[source]#
Display the plugin UI.
- Parameters:
- locstr
The display location determines where to present the plugin UI. Supported locations:
“inline”: Display the plugin inline in a notebook.
“sidecar”: Display the plugin in a separate JupyterLab window from the notebook, the location of which is decided by the ‘anchor.’ right is the default
Other anchors:
sidecar:right
(The default, opens a tab to the right of display)sidecar:tab-before
(Full-width tab before the current notebook)sidecar:tab-after
(Full-width tab after the current notebook)sidecar:split-right
(Split-tab in the same window right of the notebook)sidecar:split-left
(Split-tab in the same window left of the notebook)sidecar:split-top
(Split-tab in the same window above the notebook)sidecar:split-bottom
(Split-tab in the same window below the notebook)
See jupyterlab-sidecar for the most up-to-date options.
“popout”: Display the plugin in a detached display. By default, a new window will open. Browser popup permissions required.
Other anchors:
popout:window
(The default, opens Jdaviz in a new, detached popout)popout:tab
(Opens Jdaviz in a new, detached tab in your browser)
- titlestr, optional
The title of the sidecar tab. Defaults to the name of the plugin.
NOTE: Only applicable to a “sidecar” display.
Notes
If “sidecar” is requested in the “classic” Jupyter notebook, the plugin will appear inline, as only JupyterLab has a mechanism to have multiple tabs.