Skip to content

Make insights dashboard resizable

Warren Gifford requested to merge resizable-grid into master

Created by: felixfbecker

Adds a resizable and reorderable grid layout for code insights. It's not persisted to settings yet, i.e. order is lost after a page reload, but that's fine for demos.

Persisting the layout is actually way harder than it sounds like, because react-grid-layout is not exactly a controlled component, and attempting to use it like one leads into a rabbit hole of infinite render loops etc. I'm at the point where I'm leaning towards writing an alternative library that uses CSS grid instead of managing all the positioning and sizing with JavaScript.

View contents are now rendered in a flexbox so they can stretch and shrink to fit into a resized grid item, or scroll. Also adds the ability to define a subtitle that is always displayed (it's a separate property so that the contents can scroll independently, and it'll be common to have a consistent "explainer" for insights).

Changes the view provider to return information about which view provider ID each content came from (important to have React keys and to eventually persist layouts to settings).

Merge request reports

Loading