coiled / feedback

A place to provide Coiled feedback
14 stars 3 forks source link

Cluster HTML repr doesn't respect JupyterLab themes #51

Closed gjoseph92 closed 4 years ago

gjoseph92 commented 4 years ago

Without ipywidgets installed, the HTML repr of a coiled.Cluster is hard to read in a dark theme: image

Rather than hardcoding colors, you could pull them from CSS variables defined by the theme; something like

background-color: var(--jp-cell-editor-background);
border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
display: inline-block;
padding: 10px;

(I'm sure there are canonically correct CSS variables to use here, I just grabbed whatever looked right.)

Using that produces: image

image

Downside is that these variables don't work for classic notebooks, though there are probably some other variables (or fallbacks) you could use.

jrbourbeau commented 4 years ago

Thanks for raising an issue @gjoseph92!

We're inheriting this behavior from Dask's base Cluster class, so it not only impacts coiled.Cluster, but also other cluster managers like distributed.LocalCluster (screenshot below). If you don't mind, would you be okay opening an issue upstream in distributed's issue tracker as this impacts the broader Dask community (I tried to transfer this issue, but I am unable to transfer it out the coiled GitHub orgnaization)? I'm also happy to handle that if you'd prefer not to

Screen Shot 2020-08-20 at 4 47 13 PM
gjoseph92 commented 4 years ago

Will do! Thanks for pointing that out, @jrbourbeau.

jrbourbeau commented 4 years ago

Np, thanks for noticing in the first place : )

gjoseph92 commented 4 years ago

Closing in favor of https://github.com/dask/distributed/issues/4058