mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

fix HTML repr table rendering

Open drammock opened this issue 1 year ago • 8 comments

closes #12775

WIP because I haven't addressed appearance in notebooks or IDEs yet. But in the meantime at least y'all can see how it looks in the built docs, and offer feedback.

drammock avatar Aug 13 '24 19:08 drammock

here's what the repr HTML tables look like on built docs:

https://output.circle-artifacts.com/output/job/df0a833c-b387-4034-a9e4-f3d59d80ef3f/artifacts/0/html/auto_tutorials/raw/20_event_arrays.html#sphx-glr-auto-tutorials-raw-20-event-arrays-py

The buttons for showing bad channels are a bit wonky; I'll have to work on that. Pushing commits now that make it look ok in Jupyter notebook. I tried tackling VSCode interactive pane too... but the whole notebook gets hidden in an iframe and I can't seem to access the individual DOM elements in the notebook output cells via the built-in developer tools pane... maybe @hoechenberger can point me in the right direction (or just push some commits).

drammock avatar Aug 13 '24 22:08 drammock

@drammock I marked for 1.8, this is probably a blocker right?

larsoner avatar Aug 14 '24 15:08 larsoner

@drammock I marked for 1.8, this is probably a blocker right?

could also just backport it afterwards I guess? I will try to finish today but can't promise it.

drammock avatar Aug 14 '24 16:08 drammock

Yeah backporting seems okay!

larsoner avatar Aug 14 '24 16:08 larsoner

OK here are some screenshots (hover effect does work in Jupyter light mode, I must have just wiggled the mouse when screenshotting):

Sphinx

built-docs-dark

built-docs

Jupyter

juypter-dark

jupyter-light

VSCode

vscode-dark

vscode-light

drammock avatar Aug 14 '24 21:08 drammock

Aren't the carets in Jupyter and VS Code swapped between "opened" and "collapsed" state?

hoechenberger avatar Aug 15 '24 04:08 hoechenberger

just want to add, i think this is a great job, @drammock I'm currently on a hiking trip in the mountains with limited internet access (and only through my phone), so cannot really test or provide thorough feedback until next week or so

hoechenberger avatar Aug 15 '24 06:08 hoechenberger

Aren't the carets in Jupyter and VS Code swapped between "opened" and "collapsed" state?

oops yes, good catch.

drammock avatar Aug 15 '24 15:08 drammock

@hoechenberger @larsoner this one is ready!

drammock avatar Sep 20 '24 23:09 drammock

I looked at the examples and reports and they look great, thanks @drammock !

larsoner avatar Sep 23 '24 20:09 larsoner