jupyterlab-interactive-dashboard-editor icon indicating copy to clipboard operation
jupyterlab-interactive-dashboard-editor copied to clipboard

[BUG] Formatted text doesn't display properly in ipywidgets

Open cameron-toy opened this issue 5 years ago • 0 comments

Describe the bug

Formatted text (text contained in $) displays unformatted in ipywidgets on dashboards.

To Reproduce

Create a widget in JupyterLab using ipywidgets and the following code:

import ipywidgets as widgets

slider = widgets.FloatSlider(description='$x$', value=4)
text = widgets.FloatText(disabled=True, description='$x^2$')

def compute(*ignore):
    text.value = str(slider.value ** 2)

slider.observe(compute, 'value')

widgets.VBox([slider, text])

Then, add the widget to a dashboard.

Expected behavior

The displayed widget appears exactly as it does in the notebook.

Screenshots/gifs

Widget in notebook

Screen Shot 2020-10-01 at 5 27 07 PM

Widget in dashboard

Screen Shot 2020-10-01 at 5 26 45 PM

Context

  • OS: macOS 10.15.5
  • Browser: Safari 13.1.1
  • JupyterLab Version: 2.1.4

cameron-toy avatar Oct 02 '20 00:10 cameron-toy