jupyterlab / jupyterlab

JupyterLab computational environment.

Home Page:https://jupyterlab.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support resizing tables

krassowski opened this issue · comments

Problem

The ui-components includes a simple table implemented in React and styled to follow JupyterLab theming. This table is useful in core (e.g. plugin manager) and in extensions (e.g. jupyterlab-lsp diagnostics listing, or jupyterlab-new-launcher). The table does not currently support resizing columns. Ability to resize columns would greatly improve the UX. We could even consider using this implementation for file browser (#3875).

Proposed Solution

Implement resizing. I did this in nebari-dev/jupyterlab-launchpad#22 but I would like to merge the changes into the core..

Additional context

Making the contents of the table elide and show ellipsis at the end is tricky but doable. Alternatively, on resize we could wrap content. It is possible to implement choice of ellipsis vs wrapping on per-column basis. While nebari-dev/jupyterlab-launchpad#22 uses wrapper elements for this, in principle we could propagate the width set on the th to td to avoid that.