Skip to content

Latest commit

 

History

History
1910 lines (1160 loc) · 64.9 KB

CHANGELOG.md

File metadata and controls

1910 lines (1160 loc) · 64.9 KB

v2.0.0 (Mon Jan 22 2024)

Release Notes

Variables: Notify scene after each variable completion or value change (#525)

VariableDependencyConfigLike interface has changed so that scene objects now get notified after each variable update is completed (or changed value). Before, the SceneVariableSet waited for all variables to complete before notifying scene objects.

The function variableUpdatesCompleted has changed name and signature:

variableUpdateCompleted(variable: SceneVariable, hasChanged: boolean): void;

VariableDependencyConfig has also some breaking changes. The function named onVariableUpdatesCompleted has changed name and signature to:

 onVariableUpdateCompleted?: () => void;

VariableDependencyConfig now handles the state logic for "waitingForVariables". If you call VariableDependencyConfig.hasDependencyInLoadingState and it returns true it will remember this waiting state and call onVariableUpdateCompleted as soon as the next variable update is completed, no matter if that variable is a dependency or if it changed or not.


💥 Breaking Change

  • @grafana/scenes
    • Variables: Notify scene after each variable completion or value change #525 (@torkelo)

🚀 Enhancement

  • @grafana/scenes

Authors: 1


v1.30.0 (Thu Jan 18 2024)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

Authors: 3


v1.29.0 (Tue Jan 16 2024)

🚀 Enhancement

  • @grafana/scenes
    • SplitLayout: Allow pane style overrides to be passed through #531 (@kaydelaney)

🐛 Bug Fix

  • Correct developer docs link in README #522 (@annanay25)
  • @grafana/scenes
    • Variables: Checking if a dependency is loading should also check that dependency dependencies #523 (@torkelo)

Authors: 3


v1.28.6 (Sat Jan 06 2024)

🐛 Bug Fix

  • Update README with developer docs #520 (@annanay25)
  • Moving the grafana monitoring demo app to scenes-app #512 (@torkelo)
  • Demos: Adds an example with InteractiveTable with exandable rows that shows sub scenes #505 (@torkelo)
  • @grafana/scenes

Authors: 5


v1.28.5 (Wed Dec 20 2023)

🐛 Bug Fix

Authors: 1


v1.28.4 (Wed Dec 20 2023)

🐛 Bug Fix

Authors: 2


v1.28.3 (Tue Dec 19 2023)

🐛 Bug Fix

  • @grafana/scenes
    • IntervalVariable: Makes it return the original variable expression when data or request is not present #508 (@torkelo)

Authors: 1


v1.28.2 (Tue Dec 19 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneQueryRunner: Improve the way to find adhoc filter set #506 (@torkelo)
    • CustomVariable: Interpolate query #502 (@torkelo)
    • VizPanel Re-render skipDataQuery panels when time range change #492 (@torkelo)

Authors: 1


v1.28.1 (Wed Dec 13 2023)

🐛 Bug Fix

  • @grafana/scenes
    • Variables: Fixes issue with chained variable and cascading updates #501 (@torkelo)

Authors: 1


v1.28.0 (Thu Dec 07 2023)

🚀 Enhancement

Authors: 2


v1.27.0 (Tue Dec 05 2023)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

  • @grafana/scenes
    • QueryVariable: Run query with scene time range on when configured to run on load #490 (@dprokop)

Authors: 1


v1.26.0 (Mon Dec 04 2023)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

Authors: 2


v1.25.0 (Fri Dec 01 2023)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

  • @grafana/scenes
    • VizPanelMenu: Fix auto focus / keyboard navigation issue #483 (@torkelo)

Authors: 2


v1.24.6 (Mon Nov 27 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneQueryRunner: Fixes issue with cloned scene query runner would issue new query #482 (@torkelo)

Authors: 1


v1.24.5 (Fri Nov 24 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneQueryRunner: Fixes issue with waiting for variables #481 (@torkelo)

Authors: 1


v1.24.4 (Fri Nov 24 2023)

🐛 Bug Fix

  • @grafana/scenes
    • VizPanelRenderer: Round visualization width pushed to data provider #478 (@dprokop)

⚠️ Pushed to main

  • @grafana/scenes
    • Revert "VizPanelRenderer: Round viz width pushed to data provider" (@dprokop)
    • VizPanelRenderer: Round viz width pushed to data provider (@dprokop)

Authors: 1


v1.24.3 (Thu Nov 23 2023)

🐛 Bug Fix

  • @grafana/scenes
    • VizPanel: Only pass data layers to panel when plugin supports them #477 (@dprokop)

Authors: 1


v1.24.2 (Wed Nov 22 2023)

🐛 Bug Fix

  • @grafana/scenes
    • Variables: Clear error state #476 (@torkelo)
    • Variables: Fixes validation issue where the current saved value only matches text representation #475 (@torkelo)

Authors: 1


v1.24.1 (Tue Nov 21 2023)

🐛 Bug Fix

  • @grafana/scenes
    • Fix non-null assertion in SceneQueryRunner #474 (@dprokop)

Authors: 1


v1.24.0 (Tue Nov 21 2023)

🚀 Enhancement

  • @grafana/scenes

Authors: 1


v1.23.1 (Fri Nov 17 2023)

🐛 Bug Fix

  • @grafana/scenes

Authors: 1


v1.23.0 (Fri Nov 17 2023)

🚀 Enhancement

  • @grafana/scenes
    • Variables: Add natural sort from core grafana to query variables #459 (@axelavargas)

🐛 Bug Fix

  • @grafana/scenes

Authors: 4


v1.22.1 (Tue Nov 14 2023)

🐛 Bug Fix

  • @grafana/scenes
    • Variables: Fixes url sync issue for key/value multi value variables #455 (@torkelo)

Authors: 1


v1.22.0 (Mon Nov 13 2023)

🚀 Enhancement

🐛 Bug Fix

  • @grafana/scenes

Authors: 2


v1.21.1 (Thu Nov 09 2023)

🐛 Bug Fix

  • @grafana/scenes
    • Variables: Register variable macro #452 (@torkelo)
    • Variables: Support for variables on lower levels to depend on variables on higher levels #443 (@torkelo)
    • VizPanel: Handle empty arrays when merging new panel options #447 (@javiruiz01)
    • PanelContext: Eventbus should not filter out local events #445 (@torkelo)
    • Variables: Support __org and __user variable macros #449 (@torkelo)
    • SceneQueryRunner: Fixes adhoc filters when using a variable data source #422 (@torkelo)
    • VizPanel: Support passing legacyPanelId to PanelProps #446 (@torkelo)

Authors: 2


v1.21.0 (Mon Nov 06 2023)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

  • DemoList: Fixes demo list card height #435 (@torkelo)
  • @grafana/scenes
    • VizPanel: Fixes series visibility toggling #444 (@torkelo)
    • Vertical layout for variable selectors and a simple mode for adhoc filters #427 (@torkelo)
    • feat: support gridRow and gridColumn for SceneCSSGridItem #440 (@erj826)
    • Remove checkbox from time window comparison #415 (@javiruiz01 @torkelo)

Authors: 3


v1.20.1 (Mon Oct 30 2023)

🐛 Bug Fix

  • @grafana/scenes
    • VizPanel: Allow title items configuration #437 (@dprokop)
    • SceneByFrameRepeater: Fixes issue with not processing repeats on activation when there is data #436 (@torkelo)

Authors: 2


v1.20.0 (Thu Oct 26 2023)

Release Notes

DataSourceVariable: Value should be uid, and other fixes (#400)

DataSourceVariable value is now the uid of the data source not the name. Please test and verify that your data source variables works like before.


🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

Authors: 3


v1.19.1 (Fri Oct 20 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneTimeRange: Respect time zone when updating time range #420 (@dprokop)
    • UrlSync: Fixes and one update #419 (@torkelo)
    • AdhocFilterVariable: Render expr (value) in constructor #417 (@torkelo)
    • Revert "SceneTimeRange: Respect time zone when updating time range" #418 (@torkelo)
    • AdHocFiltersVariable: Fixes issue with unnessary change events #414 (@torkelo)
    • SceneTimeRange: Respect time zone when updating time range #413 (@dprokop)

Authors: 2


v1.19.0 (Mon Oct 16 2023)

🚀 Enhancement

  • @grafana/scenes

Authors: 1


v1.18.0 (Thu Oct 12 2023)

🚀 Enhancement

  • @grafana/scenes
    • VizPanel: Adds extendPanelContext so that consumers can control some of the PanelContext functions #409 (@torkelo)

Authors: 1


v1.17.0 (Wed Oct 11 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneTimePicker: Add posibility to navigate backwards/forwards an absolute time range #408 (@kaydelaney)

Authors: 1


v1.16.0 (Wed Oct 11 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneVariableSet: isVariableLoadingOrWaitingToUpdate should ignore isActive state #405 (@torkelo)

Authors: 1


v1.15.1 (Wed Oct 11 2023)

🐛 Bug Fix

  • @grafana/scenes

Authors: 1


v1.15.0 (Tue Oct 10 2023)

🚀 Enhancement

  • @grafana/scenes
    • Markup: element data keys changes #403 (@torkelo)
    • QueryVariable: Fix sort default value #398 (@torkelo)
    • QueryVariable: Support for queries that contain "$__searchFilter" #395 (@torkelo)
    • TextBoxVariable: Fixes and make it auto size #394 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes
    • VizPanel: Add support for a custom migration handler #396 (@torkelo)
    • SceneAppPage: Fix enrichDataRequest call for drilldown pages #402 (@torkelo)
    • ActWhenVariableChanged: Add behavior to onChange callback #393 (@torkelo)
    • Variables: Updates the demo scene #388 (@torkelo)

Authors: 1


v1.14.0 (Wed Oct 04 2023)

🚀 Enhancement

  • @grafana/scenes
    • Variables: Fix issue with all value state and no options #391 (@torkelo)

Authors: 1


v1.13.0 (Wed Oct 04 2023)

🚀 Enhancement

  • @grafana/scenes
    • Compatability: Add global window object that points to the current active EmbeddedScene #390 (@torkelo)

Authors: 1


v1.12.0 (Tue Oct 03 2023)

🚀 Enhancement

  • AdhocFilters: Add docs for AdhocFilterSet and AdhocFiltersVariable #377 (@torkelo @dprokop)
  • @grafana/scenes
    • AdhocFilters: Pass filters via request object #382 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes
    • SceneTimeRange: Implement onZoom behavior #374 (@polibb)

Authors: 3


v1.11.1 (Tue Oct 03 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneAppPageView: Fixes react and scene state missmatch #381 (@torkelo)

Authors: 1


v1.11.0 (Tue Oct 03 2023)

🚀 Enhancement

  • @grafana/scenes
    • TimePicker: Show and update fiscal year month #386 (@torkelo)

Authors: 1


v1.10.0 (Mon Oct 02 2023)

🚀 Enhancement

🐛 Bug Fix

  • @grafana/scenes

Authors: 3


v1.9.0 (Fri Sep 29 2023)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

  • @grafana/scenes
    • SceneTimeRange: Add weekStart support and make sure fiscalYearMonth is used everywhere #375 (@torkelo)
    • EmbeddedScene: Patch TimeSrv #379 (@dprokop)
    • AdHocFiltersSet and AdhocFiltersVariable with manual and automatic modes #346 (@torkelo)

Authors: 2


v1.8.1 (Wed Sep 27 2023)

🐛 Bug Fix

Authors: 1


v1.8.0 (Mon Sep 25 2023)

🚀 Enhancement

  • @grafana/scenes
    • VizPanel: Allow options and field config updates #363 (@dprokop)

Authors: 1


v1.7.1 (Mon Sep 25 2023)

🐛 Bug Fix

  • @grafana/scenes
    • AnnotationsDataLayer: Support query request enriching #364 (@dprokop)

Authors: 1


v1.7.0 (Mon Sep 25 2023)

🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

Authors: 2


v1.6.0 (Fri Sep 22 2023)

🚀 Enhancement

  • @grafana/scenes
    • AnnotationsDataLayer: Add variables support #358 (@dprokop)

Authors: 1


v1.5.3 (Fri Sep 22 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneApp: Introduce a useSceneApp hook that should replace useMemo as method of caching SceneApp instance #357 (@torkelo)

Authors: 1


v1.5.2 (Thu Sep 21 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneDataTransformer: Handle transformation errors #354 (@dprokop)
    • AnnotationsDataLayer: Events deduplication #351 (@dprokop)

Authors: 1


v1.5.1 (Wed Sep 20 2023)

🐛 Bug Fix

  • @grafana/scenes
    • AnnotationsDataLayer: Provide inheritance extension points #347 (@dprokop)

Authors: 1


v1.5.0 (Wed Sep 20 2023)

🚀 Enhancement

  • @grafana/scenes

Authors: 1


v1.4.0 (Wed Sep 20 2023)

🚀 Enhancement

  • @grafana/scenes
    • Variables: Fixes issue with running variable queries with custom or legacy runner #348 (@torkelo)
    • QueryVariable: Fixes queries with older model #340 (@torkelo)

Authors: 1


v1.3.3 (Mon Sep 18 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneAppPage: Fix infinite recurision of enrichDataRequest #345 (@torkelo)
    • Data layer controls: Allow hiding #344 (@dprokop)

Authors: 2


v1.3.2 (Mon Sep 18 2023)

🐛 Bug Fix

  • @grafana/scenes
    • Annotations filtering operator: Correctly populate filtered frames #343 (@dprokop)

Authors: 1


v1.3.1 (Mon Sep 18 2023)

🐛 Bug Fix

  • @grafana/scenes
    • AnnotationsDataLayer: Handle data source error #342 (@dprokop)
    • DataLayers: Allow cancelling layers from layer control #337 (@dprokop)

Authors: 1


v1.3.0 (Mon Sep 18 2023)

🚀 Enhancement

  • @grafana/scenes
    • NestedScene: Update design to match grid row, add controls property and update demo scene to include variables #335 (@torkelo)

🐛 Bug Fix

Authors: 2


v1.2.0 (Wed Sep 13 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneObject: Add getRef for easier SceneObjectRef usage #330 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes

Authors: 1


v1.1.1 (Sat Sep 09 2023)

🐛 Bug Fix

  • @grafana/scenes

Authors: 1


v1.1.0 (Thu Sep 07 2023)

🚀 Enhancement

Authors: 1


v1.0.0 (Wed Sep 06 2023)

💥 Breaking Change

Authors: 1


v0.29.2 (Wed Sep 06 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneObject: Support changing $data, $timeRange and $variables during the active phase #324 (@torkelo)

Authors: 1


v0.29.1 (Tue Sep 05 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneGridRow: Small design change and fixes, add actions support #321 (@torkelo)

Authors: 1


v0.29.0 (Tue Sep 05 2023)

🚀 Enhancement

  • @grafana/scenes
    • TestVariable: Add optionsToReturn and other unrelated changes #314 (@torkelo)
    • Variables: New LocalValueVariable to better support repeating panels #317 (@torkelo)
    • VizPanel: Remove left-over isDraggable/isResizable state #315 (@torkelo)
    • QueryVariable: Support null ds #316 (@torkelo)
    • SceneTimeRangeTransformerBase #312 (@torkelo)
    • VizPanel: Allow panels to rendered without layout parent #302 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes

Authors: 2


v0.28.1 (Thu Aug 31 2023)

🐛 Bug Fix

  • @grafana/scenes

Authors: 1


v0.28.0 (Thu Aug 31 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneObjectRef: Provide a way to have references to other scene objects without impacting parent #304 (@torkelo)

Authors: 1


v0.27.0 (Tue Aug 29 2023)

Release Notes

Allow time range comparison (#244)

You can now automatically perform queries against a secondary time range to visualize time-over-time comparisons. Use SceneTimeRangeCompare as in the example below:

const queryRunner = new SceneQueryRunner({
  datasource: {
    type: 'prometheus',
    uid: 'gdev-prometheus',
  },
  queries: [
    {
      refId: 'A',
      expr: 'rate(prometheus_http_requests_total{handler=~"/metrics"}[5m])',
    },
  ],
});

const scene = new EmbeddedScene({
  $data: queryRunner,
  $timeRange: new SceneTimeRange({ from: 'now-5m', to: 'now' }),
  controls: [
    new SceneTimePicker({}), 
    new SceneTimeRangeCompare({}) // Use this object to enable time frame comparison UI
  ],
  body: new SceneFlexLayout({
    direction: 'row',
    children: [
      new SceneFlexItem({
        width: '100%',
        height: '100%',
        body: PanelBuilders.timeseries().setTitle('Panel using global time range').build(),
      }),
    ],
  }),
 });

🚀 Enhancement

Authors: 2


v0.26.0 (Tue Aug 29 2023)

🚀 Enhancement

  • @grafana/scenes

Authors: 1


v0.25.0 (Tue Aug 22 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneQueryRunner: Fixes issues when being cloned #288 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes

Authors: 2


v0.24.2 (Mon Aug 21 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneTimeRange: Don't update state if time range has not changed #291 (@dprokop)

Authors: 1


v0.24.1 (Fri Aug 18 2023)

🐛 Bug Fix

  • Adding developer portal dev workflow and config #276 (@tolzhabayev)
  • @grafana/scenes
    • SceneObject: Warn if parent is already set to another SceneObject #284 (@torkelo)
    • VizPanel: Handle plugin not found scenario correctly #287 (@dprokop)
    • VariableValueSelectors: Don't wrap labels #285 (@dprokop)
    • SceneDebugger: Scene graph explore & state viewer #262 (@torkelo)

Authors: 3


v0.24.0 (Fri Aug 04 2023)

🚀 Enhancement

🐛 Bug Fix

  • @grafana/scenes
    • PanelBuilders: Fix default options being mutated #274 (@dprokop)

🔩 Dependency Updates

Authors: 3


v0.23.0 (Wed Jul 19 2023)

🚀 Enhancement

  • @grafana/scenes
    • Behaviors: Provide behavior for visualization cursor sync #259 (@dprokop)

Authors: 1


v0.22.0 (Wed Jul 19 2023)

🚀 Enhancement

  • @grafana/scenes
    • Mark grafana dependencies as peerDependencies #268 (@dprokop)

Authors: 1


v0.21.0 (Tue Jul 18 2023)

🚀 Enhancement

  • @grafana/scenes
    • FieldConfigOverridesBuilder: Simplify matchFieldsByValue API #267 (@dprokop)

Authors: 1


v0.20.1 (Thu Jul 13 2023)

🐛 Bug Fix

  • @grafana/scenes
    • PanelBuilders: Fix regex matcher for overrides #264 (@dprokop)

Authors: 1


v0.20.0 (Tue Jul 11 2023)

🚀 Enhancement

  • @grafana/scenes
    • Behaviors: Enabled type stateless behavior params #254 (@torkelo)

Authors: 1


v0.19.0 (Tue Jul 11 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneQueryRunner: Provide rangeRaw in request #253 (@dprokop)
    • SceneGridItem: Makes isDraggable and isResizable optional #251 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes
    • GridLayout: Default isDraggable to false (unset) #246 (@torkelo)

Authors: 2


v0.18.0 (Wed Jul 05 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneGridLayout: Fixes draggable attribute #245 (@torkelo)
    • SceneGridLayout: Fixes issues with unmount on every re-render #243 (@torkelo)
    • Querying: Support runtime registered data source #159 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes
    • SceneGridRow: Fix rows auto collapsing on load due to url sync #241 (@torkelo)
    • SceneQueryRunner: Support liveStreaming #239 (@kaydelaney)

Authors: 2


v0.17.2 (Tue Jun 27 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneQueryRunner: Cancel previous request when starting new one #238 (@kaydelaney)

Authors: 1


v0.17.1 (Wed Jun 21 2023)

🐛 Bug Fix

Authors: 2


v0.17.0 (Mon Jun 19 2023)

🚀 Enhancement

Authors: 2


v0.16.0 (Mon Jun 19 2023)

🚀 Enhancement

  • @grafana/scenes
    • PanelBuilders: Typed API for VizPanel creation #225 (@dprokop)

⚠️ Pushed to main

Authors: 1


v0.15.0 (Fri Jun 09 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneAppPage: Fix page with tabs and drilldown on main page level #228 (@torkelo)

Authors: 1


v0.14.0 (Thu Jun 01 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneQueryRunner: Only use containerWidth when maxDataPointsFromWidth is true #223 (@torkelo)
    • SceneQueryRunner: Re-run queries onActivate when time range changed #221 (@torkelo)
    • TimeRangePicker: Default to the "isOnCanvas" true look #222 (@torkelo)

Authors: 1


v0.13.0 (Tue May 30 2023)

🚀 Enhancement

  • @grafana/scenes

Authors: 1


v0.12.1 (Fri May 26 2023)

🐛 Bug Fix

  • @grafana/scenes
    • QueryVariable: Correct picker for multi-value variable #218 (@dprokop)

Authors: 1


v0.12.0 (Thu May 25 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneAppPage: Support react elements in subtitle #196 (@torkelo)

📝 Documentation

Authors: 2


v0.11.0 (Tue May 23 2023)

🚀 Enhancement

Authors: 2


v0.10.0 (Tue May 23 2023)

🚀 Enhancement

Authors: 2


v0.9.0 (Mon May 22 2023)

🚀 Enhancement

  • @grafana/scenes
    • Scene utils: Expose helper for building drilldown links #193 (@dprokop)

Authors: 1


v0.8.1 (Thu May 18 2023)

🐛 Bug Fix

  • @grafana/scenes
    • SceneDataTransformer: Correctly resolve isDataReadyToDisplay #194 (@dprokop)

Authors: 1


v0.8.0 (Thu May 18 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneQueryRunner: Initial data state to avoid unnecesary No data messages #190 (@dprokop)

Authors: 1


v0.7.1 (Wed May 17 2023)

🐛 Bug Fix

  • Docs: Bring back missing sections #185 (@dprokop)
  • @grafana/scenes

📝 Documentation

Authors: 2


v0.7.0 (Mon May 08 2023)

Release Notes

Add support for timezones (#167)

You can now use multiple time zones in Scene. SceneTimeRange and SceneTimePicker respect time zone settings. Additionally, a new object was added, SceneTimeZoneOverride. It can be used to override the time zone provided by a time range object higher in the scene hierarchy. Objects within SceneTimeZoneOverride scope will use the closest SceneTimeRange range, but a locally specified time zone.

Example:

const scene = new EmbeddedScene({
  $timeRange: new SceneTimeRange({ from: 'now-6h', to: 'now', timeZone: 'browser'}),
  children: [
    // Will use global time range and time zone
    new VizPanel({
      $data: new SceneQueryRunner({ ... }),
      ...
    }),
    // Will use global time range and locally specified time zone
    new VizPanel({ 
      $timeRange: new SceneTimeZoneOverride({ timeZone: 'America/New_York' }),
      $data: new SceneQueryRunner({ ... }),
      ...
    }),
  ],
  ...
})

🚀 Enhancement

  • @grafana/scenes
    • VizPanel: Support adding header actions to top right corner of PanelChrome #174 (@torkelo)
    • SceneAppPage: Add support for custom title #171 (@torkelo)

🐛 Bug Fix

Authors: 2


v0.6.0 (Fri Apr 21 2023)

🚀 Enhancement

  • @grafana/scenes
    • SceneObjectBase: Fixes issue with useState subscription misses state change that happens between frist render and useEffect #161 (@torkelo)

Authors: 1


v0.5.0 (Thu Apr 20 2023)

🚀 Enhancement

🐛 Bug Fix

Authors: 3


v0.4.0 (Tue Apr 18 2023)

Release Notes

Behaviors: Add state and runtime behavior to any scene object (#119)

You can now augment any scene object with runtime state & behavior using the new $behaviors state key. Behaviors are implemented as SceneObjects that are activated when their parent is activated or as pure functions that get called when the SceneObject they are attached to get's activated.

With behaviors you can easily implement conditional display of panels using the new isHidden property on SceneFlexItem. and other dynamic layout behaviors. View the behaviors demo for some examples.


🚀 Enhancement

  • @grafana/scenes
    • Behaviors: Add state and runtime behavior to any scene object #119 (@torkelo)
    • SceneObjectBase: Activate parents before children #148 (@torkelo)

🐛 Bug Fix

  • Docs: Getting started and core concepts #136 (@dprokop)
  • SceneApp: Share defaults between demos #132 (@torkelo)
  • PackageJson: Simple scripts to run app dev from root #133 (@torkelo)
  • @grafana/scenes
    • SceneQueryRunner: Return after setting empty state #145 (@torkelo)
    • SceneGridLayout: Support lazy rendering of items out of view #129 (@kaydelaney @torkelo)
    • UrlSync: Makes url sync work on SceneAppPage level #143 (@torkelo)
    • SceneAppPage: Refactorings and adding default fallback routes #142 (@torkelo)
    • Flex layout item parent direction #141 (@dprokop @torkelo)
    • SceneApp: Correctly build demo pages with getParentPage #137 (@torkelo)
    • Templating: Add macros for __data, __field and __series #131 (@torkelo)
    • FlexLayout: Allow SceneFlexLayout to be child of another flex layout #135 (@dprokop)
    • FindObject: Fixes search logic so that it does not get stuck in infine loops #140 (@torkelo)
    • sceneGraph: findObject #127 (@torkelo)
    • SceneAppPage: Support dynamic pages (changing tabs, title, controls) #71 (@torkelo)
    • scene-app: Refactor to use SceneAppPage for demos #125 (@torkelo @dprokop)
    • Packages: Update grafana/* to latest #130 (@torkelo)
    • QueryEditor: Adds inline query editor scene object #43 (@kaydelaney @dprokop)
    • SceneVariableSet: Refresh variables that depend on time range #124 (@dprokop)
    • ValueMacro: Fixes so __value works for rowIndex 0 #123 (@torkelo)

Authors: 3


v0.3.0 (Mon Apr 03 2023)

Release Notes

SceneObject: Rename SceneObjectStatePlain to SceneObjectState (#122)

SceneObjectStatePlain is now named SceneObjectState. So if you have custom scene objects that extends SceneObjectStatePlain just do a search and replace for SceneObjectStatePlain and replace withSceneObjectState.


🚀 Enhancement

  • @grafana/scenes
    • SceneObject: Rename SceneObjectStatePlain to SceneObjectState #122 (@torkelo)
    • VizPanel: Updates to support panel context #113 (@torkelo @dprokop)
    • SceneObject: Add forEachChild to SceneObject interface and SceneObjectBase #118 (@torkelo)
    • SceneObject: Change how activate works and remove deactivate #114 (@torkelo)

🐛 Bug Fix

  • @grafana/scenes
    • LayoutTypes: Cleanup old types that are no longer needed #120 (@torkelo)
    • Interpolation: Add support for __value.* macro that uses new scopedVar data context #103 (@torkelo)

⚠️ Pushed to main

  • @grafana/scenes
    • Revert "VizPanelRenderer: Only render when width and height greater than 0" (@dprokop)
    • VizPanelRenderer: Only render when width and height greater than 0 (@dprokop)

Authors: 2


v0.2.0 (Wed Mar 29 2023)

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


v0.1.0 (Mon Mar 27 2023)

Release Notes

UrlSync: Simplify url sync interface (#100)

The SceneObjectUrlSyncHandler interface has changed. The function getUrlState no longer takes state as parameter. The implementation needs to use the current scene object state instead.


🚀 Enhancement

  • @grafana/scenes

🐛 Bug Fix

Authors: 1


v0.0.32 (Mon Mar 27 2023)

  • Scene: Support for new types of "macro" variables starting with __all_variables #98 (@domasx2 @torkelo)
  • UrlSyncManager: Improvements and fixes #96 (@torkelo)
  • UrlSync: SceneObject that implement url sync _urlSync property will now see a change to how updateFromUrl is called. It is now called with null values when url query parameters are removed. Before the UrlSyncManager would remember the initial state and pass that to updateFromUrl, but now if you want to preserve your current state or set to some initial state you have to handle that logic inside updateFromUrl.

v0.0.28 (Tue Mar 21 2023)

  • Removal of isEditing from SceneComponentProps (also $editor from SceneObjectState, and sceneGraph.getSceneEditor)
  • DataSourceVariable state change, query property is now named pluginId

0.21 (2023-03-17)

SceneObject subscribeToState parameter change

Signature change. Now the parameter to this function expects a simple function that takes two args (newState, prevState).

Before:

this._subs.add(
  sourceData.subscribeToState({
    next: (state) => this.transform(state.data),
  })
);

Becomes:

this._subs.add(sourceData.subscribeToState((state) => this.transform(state.data)));

addActivationHandler

SceneObject now has a new function called addActivationHandler that makes it much easier to add external behaviors to core scene componenents. The activation handler (callback) can return a deactivation handler. This works very similar to useEffect.

For custom components that used to override activate and then call super.activate() we now recommend that you instead use addActivationHandler from the constructor. See grafana#77 for some examples.

VizPanelMenu

A new scene object to enable panel menu for VizPanel.

Example usage:

const menu = new VizPanelMenu({});

// Configure menu items
menu.addActivationHandler(() => {
  menu.setItems(menuItems);
});

// Attach menu to VizPanel
const panelWithMenu = new VizPanel({
  title: 'Panel with menu',
  menu,
  // ... VizPanel configuration
});

To see more examples, please look at VizPanelMenu demo.

Scene App demos

Scene App included with this repo now contains Demos page in which we will continue providing examples of particular @grafana/scenes usages. Run ./scripts/demo.sh and navigate to http://localhost:3001/a/grafana-scenes-app/demos to see available demos.

0.20 (2023-03-15)

AppScenePage

The getScene for drilldowns now expect the parent property to be of type AppScenePageLike (interface).

0.19 (2023-03-15)

SceneQueryRunner no longer has transformations

Instead you have to use SceneDataTransformer and set its internal $data property to the SceneQueryRunner to get the same effect.

Example:

 $data: new SceneDataTransformer({
    $data: new SceneQueryRunner({...}),
    transformations: [
      {
        id: 'reduce',
        options: {
          reducers: ['mean'],
        },
      },
    ],
  }),

SceneDataTransformer can still be used to transform parent scoped data, it will look for this if there is no $data property set.

The reasons for this change it to have more control over when only transformations should be re-processed (to not issue query again when only a dependency on the transforms changed). It also removes some duplication between SceneQueryRunner and SceneDataTransformer. There is also a new interface SceneDataProvider.

export interface SceneDataProvider extends SceneObject<SceneDataState> {
  setContainerWidth?: (width: number) => void;
}

Change PR grafana#55