086d8b7363
* initial restructuring
* add weights for ordering
* fix links
* remove aliases, add script
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: David Harris <david.harris@grafana.com>
* make pretty
* use correct link for angular to react guide
* refactor: move the migration guide to /Developers
* Revert "refactor: move the migration guide to /Developers"
This reverts commit 8f31af8dfd.
* fix: only redirect if the URL-hash has a valid redirect
* fix: use a rel-ref for the Angular-React migration guide link
* fix: update the hash redirects
---------
Co-authored-by: David Harris <david.harris@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
1.8 KiB
1.8 KiB
description, keywords, title, menutitle, weight
| description | keywords | title | menutitle | weight | |||||
|---|---|---|---|---|---|---|---|---|---|
| Guide for migrating plugins from Grafana v9.1.x to v9.2.x |
|
Migrating plugins from Grafana 9.1.x to 9.2.x | v9.1.x to v9.2.x | 2100 |
Migrating plugins from Grafana version 9.1.x to 9.2.x
React and React-dom as peer dependencies
In earlier versions of Grafana packages react and react-dom were installed during a yarn install regardless of a plugins dependencies. In 9.2.0 the @grafana packages declare these react packages as peerDependencies and will need adding to a plugins package.json file for test commands to continue to run successfully.
Example:
// before
"dependencies": {
"@grafana/data": "9.1.0",
"@grafana/ui": "9.1.0",
},
// after
"dependencies": {
"@grafana/data": "9.2.0",
"@grafana/ui": "9.2.0",
"react": "17.0.2",
"react-dom": "17.0.2"
},
NavModelItem requires a valid icon name
The typings of the NavModelItem have improved to only allow a valid IconName for the icon property. You can find the complete list of valid icons here. The icons specified in the list will work for older versions of Grafana 9.
Example:
// before
const model: NavModelItem = {
id: 'settings',
text: 'Settings',
icon: 'fa fa-cog',
url: `${baseUrl}/settings`,
};
// after
const model: NavModelItem = {
id: 'settings',
text: 'Settings',
icon: 'cog',
url: `${baseUrl}/settings`,
};
Additional type availability
FieldProps, ModalProps, and QueryFieldProps are now exposed from @grafana/ui. They can be imported in the same way as other types.
Example:
import { FieldProps, ModalProps, QueryFieldProps } from '@grafana/ui';