grafana / grafonnet-lib

Jsonnet library for generating Grafana dashboard files.
https://grafana.github.io/grafonnet-lib/
Apache License 2.0
1.08k stars 217 forks source link

Working with rows and grid is hard #346

Open ekpdt opened 3 years ago

ekpdt commented 3 years ago

Working with rows and the grid in Grafonnet is hard. The library should provide some helpers to make things easier.

  1. Calculating grid positions yourself is annoying. I have developed some helper libraries -- I might be able to share the API and/or impl but will take some time with my employer.
  2. The API is very unhelpful when it comes to working with rows. When are you supposed to do addRow(row) vs addPanel(row)? When to call addPanel() on a row? Numerous corner cases lead to panels disappearing, not being collapsed into rows, and even browser freezes. I've passed some MVEs to the core maintainers via DM.
malcolmholmes commented 2 years ago

Some simple higher level libs to ease working with rows could be helpful.

isabelgiang commented 2 years ago

Want to mention, also trying to work with grid positions and rows - would greatly appreciate the shared implementation as a helpful example.

rquinio1A commented 2 years ago

I've been using the utility from https://github.com/grafana/grafonnet-lib/pull/223, it works great for fixed layout (no dynamic/repeating panels)