Skip to content

Collapsed Info HTML repr leads to degraded UX #12131

Closed

Description

@hoechenberger

Description of the problem

Info HTML reprs are now collapsed by default. That means that whenever I want to view Info inside e.g. a Jupyter Notebook or VS Code Python's Interactive Window, I need to click to uncollapse things. It's disrupting my workflow and I had to resort to typing print(info), but this doesn't show the nice HTML representation. I'm unhappy.

Steps to reproduce

# %%
import mne

sample_dir = mne.datasets.sample.data_path()
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'

info = mne.io.read_info(sample_fname)
info

Link to data

No response

Expected results

Screenshot 2023-10-24 at 17 19 28

Actual results

Screenshot 2023-10-24 at 17 19 46

Additional information

At least the General and Channel sections should be uncollapsed by default

Filing as a bug because I really dislike it and it disrupts my workflow

Activity

  1. drammock commented on Oct 24, 2023

    @drammock
    Member

    If you can find a way to have them collapsed by default on our examples/tutorials but expanded by default elsewhere, PR welcome.

    aside: please don't abuse the BUG label. This is intended behavior even if you don't like it.

  2. hoechenberger commented on Oct 24, 2023

    @hoechenberger
    MemberAuthor

    Just to be clear, I love the ability to collapse. I'm just not happy with the default

  3. hoechenberger commented on Oct 24, 2023

    @hoechenberger
    MemberAuthor

    It's clearly a UX bug. If this was intended and cannot be changed, it should be reverted.

    I gave justification why I tagged as a bug. I don't believe this is abusive at all.

  4. drammock commented on Oct 24, 2023

    @drammock
    Member

    It's clearly a UX bug.

    I could just as easily say "it's a UX bug to have 80% of the screen height filled with Info._html_repr_ output on many of our tutorials."

    I gave justification why I tagged as a bug

    "I really dislike it and it disrupts my workflow" is not the same as "this is not functioning as intended".

  5. removed their assignment
    on Oct 24, 2023
  6. hoechenberger commented on Oct 24, 2023

    @hoechenberger
    MemberAuthor

    I didn't break it, I ain't gonna fix it. This is not cool, @drammock!!

  7. cbrnr commented on Oct 25, 2023

    @cbrnr
    Contributor

    Let me steer the discussion back to the issue, whether or not it should be labeled as a bug is not essential, as is whether or not the behavior is intentional.

    Arguably, the new behavior is a regression in terms of usability. Previously, users could rely on the HTML repr to get information on various MNE objects in their interactive notebook workflow, but now all information is hidden behind extra mouse clicks. If it is not possible to expand all sections by default, I think this change should be reverted.

  8. larsoner commented on Oct 26, 2023

    @larsoner
    Member

    Since these __repr__s are an interactive thing one easy way out of this is to have a MNE_HTML_REPR_COLLAPSED config var. We'd set this to 1/true when building doc but leave as 0/false by default. If we don't think end users will want use this, though, we could accomplish the collapse-during-doc-build-only functionality pretty easily (I think / hopefully) using private variables.

  9. cbrnr commented on Oct 26, 2023

    @cbrnr
    Contributor

    I think collapsing is really only necessary in the docs.

  10. larsoner commented on Oct 26, 2023

    @larsoner
    Member

    Okay, solution in progress...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions