Skip to content

Allow controlling readout width in Valid widget #1939

Description

@pbugnion

The Valid widget does not provide a way to control the readout style, as far as I can tell. This was originally raised in issue #1937 .

One way to do this would be to create a new ValidStyle object for the Valid widget that contains both the description_width and the readout_width fields. The ValidStyle object should probably inherit from DescriptionStyle.

Alternatively, we could make a new ReadoutStyle widget, with a corresponding readout_style traitlet on the Valid widget. This seems a bit more extensible in the future.

For a minimal example of the current (broken) behaviour:

import ipywidgets as widgets

widget = widgets.Valid(
    readout='some very very long sentence about invalidity',
    layout={'width': '700px'}
)
widget

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions