rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
450 stars 256 forks source link

Component for pinning table rows & columns #7838

Open gaktive opened 1 year ago

gaktive commented 1 year ago

Rancher Desktop needs a mechanism to allow table rows & columns, primarily headers, to be pinned. Based on narrow window sizes, if a user has to scroll based on table size, they lose context as to what row & column they're looking at.

The simple scenario is looking at a table listing images and tags; if there's a long tag and the user scrolls horizontally, they won't see the associated image name anymore.

The ability to pin wouldn't be user-facing; this would be for the project or consuming package to designate which column would be pinned. This would make the scrolling experience better.

Reference: https://github.com/rancher-sandbox/rancher-desktop/issues/2742

gaktive commented 1 year ago

Based on initial glances from @nwmac, this is tricky to do, particularly for columns since CSS doesn't have a notion of stickiness. There are other solutions to look at, but sorting tables makes this extra complex.

gaktive commented 10 months ago

Easiest thing to do here is store this setting as a browser cookie.