@grafana/create-plugin 6.3.0-canary.2314.19540157259.0 → 6.3.0-canary.2314.19540598852.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "6.3.0-canary.2314.
|
|
3
|
+
"version": "6.3.0-canary.2314.19540598852.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/create-plugin",
|
|
6
6
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=20"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "45cfdfb7b4869737a8f7f437da9028de3e618024"
|
|
65
65
|
}
|
|
@@ -50,33 +50,33 @@ A typical panel plugin includes:
|
|
|
50
50
|
|
|
51
51
|
## Coding guidelines
|
|
52
52
|
|
|
53
|
-
- Use **TypeScript
|
|
53
|
+
- Use **TypeScript**, functional React components, and idiomatic patterns
|
|
54
54
|
- Use **@grafana/ui**, **@grafana/data**, **@grafana/runtime**
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
- Use
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
55
|
+
- Use **`useTheme2()`** for all colors, spacing, typography
|
|
56
|
+
- **Never hardcode** colors, spacing, padding, or font sizes
|
|
57
|
+
- Use **Emotion** + `useStyles2()` + theme tokens for styling
|
|
58
|
+
- Keep layouts responsive (use `width`/`height`)
|
|
59
|
+
- Avoid new dependencies unless necessary + Grafana-compatible
|
|
60
|
+
- Maintain consistent file structure and predictable types
|
|
61
|
+
- Use **`@grafana/plugin-e2e`** for E2E tests and **always use versioned selectors** to interact with the Grafana UI.
|
|
62
62
|
|
|
63
63
|
## Boundaries
|
|
64
64
|
|
|
65
|
-
You must **
|
|
65
|
+
You must **NOT**:
|
|
66
66
|
|
|
67
|
-
- Change plugin
|
|
68
|
-
- Modify anything
|
|
69
|
-
- Add a backend
|
|
70
|
-
- Remove
|
|
67
|
+
- Change plugin ID or plugin type in `plugin.json`
|
|
68
|
+
- Modify anything inside `.config/*`
|
|
69
|
+
- Add a backend (panel plugins = frontend only)
|
|
70
|
+
- Remove/change existing options without a migration handler
|
|
71
71
|
- Break public APIs (options, field configs, panel props)
|
|
72
|
-
- Store or
|
|
72
|
+
- Store, read, or handle credentials
|
|
73
73
|
|
|
74
|
-
You **
|
|
74
|
+
You **SHOULD**:
|
|
75
75
|
|
|
76
|
-
-
|
|
77
|
-
- Preserve
|
|
78
|
-
-
|
|
79
|
-
-
|
|
76
|
+
- Maintain backward compatibility
|
|
77
|
+
- Preserve option schema unless migration handler is added
|
|
78
|
+
- Follow official Grafana panel plugin patterns
|
|
79
|
+
- Use idiomatic React + TypeScript
|
|
80
80
|
|
|
81
81
|
## Instructions for specific tasks
|
|
82
82
|
|