github grafana/scenes v0.2.0

latest releases: v6.52.2, v6.52.1, v6.52.0...
2 years ago

Release Notes

Layout: Create atomic, layout specific objects (#97)

The interface of SceneFlexLayout and SceneGridLayout has changed. These scene objects now accept only dedicated layout item objects as children:

  • SceneFlexItem for SceneFlexLayout
  • SceneGridItem and SceneGridRow for SceneGridLayout

placement property has been replaced by those layout-specific objects.

Example

// BEFORE
const layout = new SceneFlexLayout({
  direction: 'column',
  children: [
    new VizPanel({
      placement: {
        width: '50%',
        height: '400',
     },
     ...
    })
  ],
  ...
})


// AFTER
const layout = new SceneFlexLayout({
  direction: 'column',
  children: [ 
    new SceneFlexItem({ 
      width: '50%',
      height: '400',
      body: new VizPanel({ ... }),
    }),
  ],
  ...
})

🚀 Enhancement

  • @grafana/scenes

Authors: 3

Don't miss a new scenes release

NewReleases is sending notifications on new releases.