Releases: grafana/scenes
Releases · grafana/scenes
v6.1.0
🚀 Enhancement
🐛 Bug Fix
@grafana/scenes
Authors: 3
v6.0.2
v6.0.1
v6.0.0
💥 Breaking Change
@grafana/scenes-react
,@grafana/scenes
- Updating to
react-router@6
#979 (@leventebalogh)
- Updating to
Authors: 1
- Levente Balogh (@leventebalogh)
Migration guide for an app plugin
- Bump
react-router-dom
-package.json
-"react-router-dom": "^5.2.0",
+"react-router-dom": "^6.22.0",
- Remove
@types/react-router-dom
-package.json
-"@types/react-router-dom": "^5.2.0",
- Stop externalising
react-router-dom
-.config/webpack/webpack.config.ts
externals: [
// Required for dynamic publicPath resolution
{ 'amd-module': 'module' },
'lodash',
'jquery',
'moment',
'slate',
'emotion',
'@emotion/react',
'@emotion/css',
'prismjs',
'slate-plain-serializer',
'@grafana/slate-react',
'react',
'react-dom',
'react-redux',
'redux',
'rxjs',
'react-router',
- 'react-router-dom',
'd3',
'angular',
'@grafana/ui',
'@grafana/runtime',
'@grafana/data',
- Enable
react-router@v6
-.cprc.json
Add the following line in the.cprc.json
:
{
"features": {
+ "useReactRouterV6": true
}
}
<Route>
: use relative wildcard routes
-<Route path="/a/myorg-example-app/home ... />
+<Route path="home/*" ... />
<Route>
: use theelement
prop
-<Route ... component={WithDrilldown} />
+<Route ... element={<WithDrilldown />} />
<Switch>
: replace withRoutes
-import { Switch } from "react-router-dom";
+import { Routes } from "react-router-dom";
-<Switch> ... </Switch>
+<Routes> ... </Routes>
- Add a relative
routePath
prop to each<SceneAppPage>
. It needs to include a wildcard if there are any drill-down or tab pages under it.
-new SceneAppPage({
- url: "/a/myorg-example-app/home",
- ...
- });
+new SceneAppPage({
+ url: "/a/myorg-example-app/home",
+ routePath: "home/*",
+ ...
+})
- Make the
routePath
prop defined on drill-downs relative and include a wildcard.
v5.42.0
v5.41.3
🐛 Bug Fix
@grafana/scenes
- SceneTimePicker: Add support for custom quick ranges #1048 (@Sergej-Vlasov)
Authors: 1
v5.41.2
🐛 Bug Fix
@grafana/scenes
@grafana/scenes-react
,@grafana/scenes
Authors: 3
v5.41.1
🐛 Bug Fix
@grafana/scenes
- LazyLoader: Prevent empty panels from not being hidden #1039 (@svennergr)
Authors: 1
- Sven Grossmann (@svennergr)
v5.41.0
v5.40.0
🚀 Enhancement
@grafana/scenes
🐛 Bug Fix
@grafana/scenes
- Combobox: Displaying value instead of valueLabels on edit #1036 (@gtk-grafana)
Authors: 2
- Galen Kistler (@gtk-grafana)
- Torkel Ödegaard (@torkelo)