You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Collapsed Info HTML repr leads to degraded UX #12131
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
# %%importmnesample_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
Actual results
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
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.
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.
Activity
drammock commentedon Oct 24, 2023
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
BUGlabel. This is intended behavior even if you don't like it.hoechenberger commentedon Oct 24, 2023
Just to be clear, I love the ability to collapse. I'm just not happy with the default
hoechenberger commentedon Oct 24, 2023
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.
drammock commentedon Oct 24, 2023
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 really dislike it and it disrupts my workflow" is not the same as "this is not functioning as intended".
hoechenberger commentedon Oct 24, 2023
I didn't break it, I ain't gonna fix it. This is not cool, @drammock!!
cbrnr commentedon Oct 25, 2023
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.
larsoner commentedon Oct 26, 2023
Since these
__repr__s are an interactive thing one easy way out of this is to have aMNE_HTML_REPR_COLLAPSEDconfig var. We'd set this to1/truewhen building doc but leave as0/falseby 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.cbrnr commentedon Oct 26, 2023
I think collapsing is really only necessary in the docs.
larsoner commentedon Oct 26, 2023
Okay, solution in progress...