* grafana/master: (32 commits) Fixed more typescript no implicit any issues Also push to ci metrics to new shared HM instance Fixed type issues introduced by adding angular types Typescript noAny fixes, start of a long journey Updated code stats collection Updated path to new script POC on collecting metrics in ci process changelog: add notes about heatmap issues #15683 #14019 added two new variables in default theme for panel padding, replaced panelhorizontalpadding and variables.panelverticalpadding with new variables renamed default variables: s -> sm, m -> md, l -> lg removed gf-form-margin variable and replaced with space- variables where it was used heatmap: able to hide buckets with zero value #12080 s -> sm, m -> md, l -> lg heatmap: fix prometheus buckets sorting, closes #15637 s -> sm, m -> md, l -> lg removed headings-margin-bottom variable remove kbn test Added scopedVars argument in datasourceSrv.get in DataPanel heatmap: able to reverse Y buckets order, #15683 Refactoring of multi-value datasource PR #15812 ... |
||
---|---|---|
.. | ||
.storybook | ||
src | ||
CHANGELOG.md | ||
index.js | ||
package.json | ||
README.md | ||
rollup.config.ts | ||
tsconfig.build.json | ||
tsconfig.json | ||
tslint.json |
Grafana UI components library
@grafana/ui is a collection of components used by Grafana
Our goal is to deliver Grafana's common UI elements for plugins developers and contributors.
See package source for more details.
Installation
yarn add @grafana/ui
npm install @grafana/ui
Development
For development purposes we suggest using yarn link
that will create symlink to @grafana/ui lib. To do so navigate to packages/grafana-ui
and run yarn link
. Then, navigate to your project and run yarn link @grafana/ui
to use the linked version of the lib. To unlink follow the same procedure, but use yarn unlink
instead.
Building @grafana/ui
To build @grafana/ui run npm run gui:build
script from Grafana repository root. The build will be created in packages/grafana-ui/dist
directory. Following steps from Development you can test built package.
Releasing new version
To release new version run npm run gui:release
script from Grafana repository root. The script will prepare the distribution package as well as prompt you to bump library version and publish it to the NPM registry.
Automatic version bump
When running npm run gui:release
package.json file will be automatically updated. Also, package.json file will be commited and pushed to upstream branch.
Manual version bump
To use package.json
defined version run npm run gui:release --usePackageJsonVersion
from Grafana repository root.
Preparing release package without publishing to NPM registry
For testing purposes there is npm run gui:releasePrepare
task that prepares distribution package without publishing it to the NPM registry.
V1 release process overview
- Package is compiled with TSC. Typings are created in
/dist
directory, and the compiled js lands in/compiled
dir - Rollup creates a CommonJS package based on compiled sources, and outputs it to
/dist
directory - Readme, changelog and index.js files are moved to
/dist
directory - Package version is bumped in both
@grafana/ui
package dir and in dist directory. - Version commit is created and pushed to master branch
- Package is published to npm
Versioning
To limit the confusion related to @grafana/ui and Grafana versioning we decided to keep the major version in sync between those two. This means, that first version of @grafana/ui is taged with 6.0.0-alpha.0 to keep version in sync with Grafana 6.0 release.