iris icon indicating copy to clipboard operation
iris copied to clipboard

Cube HTML repr CSS improvements

Open DPeterK opened this issue 6 years ago • 3 comments

Use CSS variables defined in Jupyterlab for styling custom elements of the cube repr table. The primary advantage of doing this is that the cube html repr table will correctly follow different Jupyterlab themes:

Light theme: Screenshot 2019-08-27 at 12 00 58 Dark theme: Screenshot 2019-08-27 at 12 00 40

Also removed max-width attribute of table columns.

DPeterK avatar Aug 27 '19 11:08 DPeterK

If I understand correctly, this would make the _html_repr_ better integrated into Jupyter but would make the _html_repr_ less well integrated into other environments without access to --jp-* css variables. Is there anywhere other than Jupyter where we could reasonably expect _html_repr_ to be used?

stephenworsley avatar Sep 25 '19 10:09 stephenworsley

@stephenworsley correct, this is explicitly targetting Jupyter environments, which is the only place that _repr_html_ could conceivably be called on a Python object, as it's part of the broader Jupyter API. I'm pretty sure this means that alternate notebook environments, such as nteract, won't be impacted by this change.

DPeterK avatar Dec 03 '19 10:12 DPeterK

Rebase...

DPeterK avatar Dec 03 '19 10:12 DPeterK

This seems to have gone stale. We still have ambitions for better HTML, particularly given @pp-mo's work turning the Cube summary into actual objects, which would make for much better HTML creation. But that would need a different PR, so I'm going to close this one. @DPeterK feel free to re-open if you disagree.

trexfeathers avatar Sep 21 '22 09:09 trexfeathers