Skip to content

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

@cameron-toy

Description

@cameron-toy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions