grafana/packages/grafana-ui
Kyle Cunningham 80e7f54166
Table Panel: Refactor Cell Options to Allow for Options per Cell Type (#59363)
* Update table data structure schema.

* Update table panel configuration options for new structure

* Fix TS errors from refactor

* Separate background and gauge display modes

* Remove the now used Bar Gauge display from the mud

* Fix types up

* Reorganize data structures

* Fix type issues.

* Start stubbing necessary code.

* Continue implementing option refactor

* Change category for cell type selection.

* Consolidate cell options

* Fix various typing issues

* Clean up dead code

* Stub handling display mode changes

* Make subOption editor dynamic

* Setup interface for sub-option editor props

* Remove unused imports

* Remove console.log call

* Persist display mode changes, stub sub options change, update comments.

* Make sure updates from cells are persisted

* Persist sub-option changes

* Update BarGaugeCell to take into account new settings.

* Add deprecated field back

* Remove unecessary options in configuration

* Update default cell to accept new settings

* Make sure color text display works

* Add deprecated property notice

* Use constant as opposed to string

* Make sure we name globally namespaced things uniquely

* Update to use unique name

* Use union type with discriminator.

* Simplify types and operation

* Update type definitons

* Update types

* Update property names in cells

* Remove React.FC usage

* Update option editor signature

* Update options structure

* Change variable name

* Fix "Color Text" display

* Remove debug statement

* Make sure we remain backwards compatible with display mode.

* Add migration for configuration.

* Export BarGaugeDisplayMode from grafana-ui

* Update import

* Fix bar gauge and dashboard migrator tests

* Fix potential undefined references causing test failures

* Fix another potential reference error in DefaultCell

* Try to fix breaking change detection.

* Cache setting changes

* Make sure we return with onChange invocation

* Fixed migrating overrides

* Fix a number of review comments

* Simplify option editors

* Fix unused imports

* Fill out comments for types

* Actually use defaultPanelConfig for editor default

* Move TableCellEditorProps alongside TableCellOptionEditor

* Update docs for table panel

* Also make sure we remove TableCellEditorProps from model file

* Stub migration tests

* Add tests for default config migration

* Add basic overrides test

* Flesh out tests a bit more

* Add inspect to same category as cell editor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-12 18:42:57 +07:00
..
.storybook Chore: remove @storybook/addon-knobs package (#60524) 2022-12-19 15:35:32 +00:00
scripts Icons: Move unicons icons to the repository and generate the iconsBundle.js with nodejs (#53766) 2022-08-23 15:47:14 +02:00
src Table Panel: Refactor Cell Options to Allow for Options per Cell Type (#59363) 2023-01-12 18:42:57 +07:00
.eslintrc I18n: Add lint rule to enforce correct i18n imports (#56487) 2022-10-07 11:46:28 +01:00
CHANGELOG.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
LICENSE_APACHE2 Re-license Grafana to AGPLv3 (#33184) 2021-04-20 19:03:30 +02:00
package.json Revert "Chore: Update typescript to 4.9.3 (#60538)" (#60774) 2022-12-27 06:30:52 -08:00
README.md Chore: Move from master to main branch (#33693) 2021-05-06 16:29:29 +02:00
rollup.config.ts Build: Introduce ESM and Treeshaking to NPM package builds (#51517) 2022-08-03 15:47:09 +02:00
tsconfig.build.json Chore: Update slate and related packages (#54566) 2022-09-06 15:23:48 +01:00
tsconfig.json Storybook: Fix asset paths for hosted storybooks (#56319) 2022-10-05 12:10:29 +02:00

Grafana UI components library

@grafana/ui is currently in BETA.

@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.

Browse the Storybook catalog of the components.

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.

Storybook 6.x migration

We've upgraded Storybook to version 6 and with that we will convert to using controls instead of knobs for manipulating components. Controls will not require as much coding as knobs do. Please refer to the storybook style-guide for further information.