grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
141 stars 21 forks source link

ScenesReact: Move new react contexts, hooks and components to new @grafana/scenes-react package #755

Closed torkelo closed 5 months ago

torkelo commented 5 months ago

PR Base: https://github.com/grafana/scenes/pull/734 (Main Scenes React PR)

Creating a separate PR to show the changes needed for a separate package

New exports needed from @grafana/scenes

Some utils. / types duplicated

Removed features due to move

Current name conflicts (where @grafana/scenes exports type with same name as @grafana/scenes-react)

To fix this name conflict we could rename the scene object variants (maybe CustomVariable => CustomVariableObject or CustomVariableDef). Or we rename the react versions. Anyway I think we can live with the name conflicts for the initial phase / versions until everything is feeling more solid.

Hook names feedback / ideas (not implemented)

📦 Published PR as canary version: 4.24.2--canary.755.9282326022.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes-react@4.24.2--canary.755.9282326022.0 npm install @grafana/scenes@4.24.2--canary.755.9282326022.0 # or yarn add @grafana/scenes-react@4.24.2--canary.755.9282326022.0 yarn add @grafana/scenes@4.24.2--canary.755.9282326022.0 ```