Skip to content

FR: Provide option for collapsing the HTML display in notebooks #4229

@michaelaye

Description

@michaelaye

Issue description

The overly long output of the text repr of xarray always bugged so I was very happy that the recently implemented html repr collapsed the data part, and equally sad to see that 0.16.0 reverted that, IMHO, correct design implementation back, presumably to align it with the text repr.

Suggested solution

As the opinions will vary on what a good repr should do, similar to existing xarray.set_options I would like to have an option that let's me control if the data part (and maybe other parts?) appear in a collapsed fashion for the html repr.

Additional questions

  • Is it worth considering this as well for the text repr? Or is that harder to implement?

Any guidance on

  • which files need to change
  • potential pitfalls

would be welcome. I'm happy to work on this, as I seem to be the only one not liking the current implementation.

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