Skip to content

v0.2.0

Compare
Choose a tag to compare
@grafanabot grafanabot released this 29 Mar 08:27

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