Skip to content

Conversation

Chalks
Copy link
Contributor

@Chalks Chalks commented May 19, 2025

Summary

MA-3940

This PR is mostly a proof of concept for using GridStack for all render paths of dashboards. It has two changes that may generate some discussion:

  1. The layout of certain dashboards is different than what currently exists.
  2. It requires a manual update call to GridStack when the underlying DashboardTiles render new data if its size changes

However, this solves:

  1. having to maintain two render paths
  2. broken dashboard layouts in some edge cases
  3. allows us to remove gridSize and fitToContent from the dashboard definition
  4. allows us to remove a lot of hardcoded heights
  5. allows us to remove a couple components and complicating logic (basically anything touching GridLayout

Current layout path issue, top is editor view, bottom is viewer view

Note that the bottom view cuts off the last visualization and adds a scrollbar

New Project

If we use GridStack instead, we get this for the viewer (which is what is intended):

Screenshot 2025-05-19 at 4 56 10 PM


Dashboards with fit to content tiles are currently special cased

Note the extra space generated by our secondary render path (GridLayout) marked with a red arrow:

Screenshot 2025-05-19 at 5 09 35 PM

Gridstack handles this case a slightly different way, also marked with a red arrow:

Screenshot 2025-05-19 at 5 11 56 PM


Dashboard responsiveness

Gridstack actually does a really good job of this, we just need to turn on the option.

@Chalks Chalks force-pushed the feat/ma-3940-one-render-path branch from 3c708ad to be60af1 Compare May 19, 2025 21:20
@Chalks Chalks force-pushed the feat/ma-3940-one-render-path branch from be60af1 to de80d4e Compare May 19, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant