Commit Graph

31 Commits

Author SHA1 Message Date
Ivana Huckova
431f454d57
@grafana/ui: Create Icon component and replace part of the icons (#23402)
* Part1: Unicons implementation (#23197)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Remove color prop from icon, remove color implemetation in mono icons

* Update navbar styling

* Move toPascalCase to utils/string

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Resolve type errors resulted from merge

* Part2: Unicons implementation (#23266)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Implment icons in Tabs

* Implement icons in search items and  empty  list

* Update buttons

* Update button-related snapshot tests

* Update icons in modals and page headers

* Create anfular wrapper and update all icons on search screen

* Update sizing, remove colors, update snapshot tests

* Remove color prop from icon, remove color implemetation in mono icons

* Remove color props from monochrome icons

* Complete update of icons for search screen

* Update icons for infor tooltips, playlist, permissions

* Support temporarly font awesome icons used in enterprise grafana

* Part1: Unicons implementation (#23197)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Remove color prop from icon, remove color implemetation in mono icons

* Update navbar styling

* Move toPascalCase to utils/string

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Icons update

* Add optional chaining to for isFontAwesome variable

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Part3:  Unicons implementation (#23356)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Implment icons in Tabs

* Implement icons in search items and  empty  list

* Update buttons

* Update button-related snapshot tests

* Update icons in modals and page headers

* Create anfular wrapper and update all icons on search screen

* Update sizing, remove colors, update snapshot tests

* Remove color prop from icon, remove color implemetation in mono icons

* Remove color props from monochrome icons

* Complete update of icons for search screen

* Update icons for infor tooltips, playlist, permissions

* Support temporarly font awesome icons used in enterprise grafana

* Part1: Unicons implementation (#23197)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Remove color prop from icon, remove color implemetation in mono icons

* Update navbar styling

* Move toPascalCase to utils/string

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update icons in Explore

* Update icons in alerting

* Update + and x buttons

* Update icons in configurations and settings

* Update close icons

* Update icons in rich history

* Update alert messages

* Add optional chaining to for isFontAwesome variable

* Remove icon mock, set up jest.config

* Fix navbar plus icon

* Fir enable-bacground to enableBackgournd

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Merge remote branch origin master to icons-unicons

* Revert "Merge remote branch origin master to icons-unicons"

This reverts commit 3f25d50a39.

* Size-up dashnav icons

* Fix alerting icons, panel headers, update tests

* Fix typecheck error

* Adjustments - add panel icon, spacing

* Set TerserPlugin sourceMap to false to prevent running out of memory when publishing storybook

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-08 14:33:31 +02:00
Tobias Skarhed
21f55d1345
@grafana/ui docs: Input (#23228)
* Add prefix and suffix example

* Update doc

* Update packages/grafana-ui/src/components/Forms/Input/Input.mdx

Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com>

* Add light theme to be loaded for docs

* Add more docs

* Make Legacy stories internal

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-04-07 09:24:24 +02:00
Torkel Ödegaard
53630b5f13
StatPanels: Refactoring DisplayValueOptions and renaming & adding new panel options to react panels (#23153)
* StatPanels: Refactoring DisplayValueOptions and renaming

* added return

* Progress

* Updated

* Made radio groups full width by default in panel options

* Fixed ts issue

* Updated

* Added remaining options

* Removed unused type

* Updated snapshot

* Renamed to ReduceDataOptions
2020-03-28 23:11:50 +01:00
Tobias Skarhed
6d6d86f940
Storybook: Add internal stories functionality (#23139) 2020-03-27 14:37:08 +01:00
Tobias Skarhed
c7951a2575
Storybook: Solve deployment issues (#22873) 2020-03-19 07:51:22 +01:00
Tobias Skarhed
81fed255fd
Storybook: add canary deploy from master (#22843)
* Canary from master latest from release

* Fix logo URL
2020-03-17 15:03:59 +01:00
Dominik Prokop
22fc1e91f5
Storybook: Bring back theme switch (#22826) 2020-03-17 09:52:46 +01:00
Tobias Skarhed
8a03703837
Storybook: Add relative logo url (#22786) 2020-03-14 09:04:14 +01:00
Alex Khomenko
a8531978b6
Grafana-UI: add storysource addon to Storybook (#22490)
* Add @storybook/addon-storysource

* Enable the addon

* Fix Select label

* Lock storysource version
2020-02-28 18:44:18 +02:00
Tobias Skarhed
029a6c64b4
Storybook: Add color theme and theme switcher (#22005)
* Add color theme and serve static files for storybook

* Add color theme and serve static files for storybook

* Export dark and light theme

* Add storybook-dark-mode package

* Add theme toggle functionality

* Toggle story theme too

* Remove unused import

* webpack config changes not needed
2020-02-17 10:36:16 +01:00
Steven Vachon
f48169633c
TSLint → ESLint (#21006)
* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
2020-02-08 02:40:04 +01:00
Tobias Skarhed
165c3adf1d
Storybook: Update categories (#21898)
* Update paths for Storybook categories

* Restructure categories
2020-02-06 10:32:35 +01:00
Marcus Andersson
6dada090b3
Chore: Upgrade Storybook to 5.3.9 (#21550)
* Upgraded to latest stroybook.

* Upgraded to version 5.3.9

* updated yarn.lock file.
2020-01-30 07:49:43 +01:00
Dominik Prokop
386035da4d Storybook: Remove reference to jquery.flot.pie file from storybook config (#21378) 2020-01-07 13:35:10 +01:00
Peter Holmberg
24183ba390
Forms: Introduce new Primary, Secondary and Destructive buttons (#19973)
* Implement Label component

* Expose next-gen form components from grafana-ui under Forms namespace

* adding knobs to story, setting new variants and sizes

* handle next gen button in their own component

* removing duplication

* fix Thresholds test

* removing blank lines

* moving noUnusedLocals

* new button should not need theme

* remove not used export

* pseudo classes for focus state

* remove not used things

* use correct border radius

* extracting focus styles to commonStyles for reuse

* tidying up getButtonStyles

* Adding a few examples to the doc

* Adding props table
2019-10-25 14:35:29 +02:00
Dominik Prokop
2a8762f6a3
grafana/ui: Enable mdx imports in stories (#19937) 2019-10-22 09:05:14 +02:00
Dominik Prokop
3119f35715
grafana/ui: Enable storybook docs (#19930) 2019-10-21 16:39:43 +02:00
Andrej Ocenas
16b041608d
Explore: Move data source loader into the select (#19465) 2019-10-02 10:15:06 +02:00
Dominik Prokop
5f1bb3947c
Storybook: fix type error (#18934)
* Use window.setTimeout/Interval instead of nodejs versions

* Remove awesome-typescript-loader dependency
2019-09-06 10:23:24 +02:00
Dominik Prokop
739cdcfb6e
Feature: Migrate Legend components to grafana/ui (#16468)
* Introduced Abstract list, List and InlineList components for easier lists generation
* Enable custom item key on abstract list items
* Enable $.flot in storybook
* Expose onOptionsChange to react panel. Allow React panels to be function components
* Update type on graph panel options to group graph draw options
* Introduce GraphPanelController for state and effects handling of new graph panel
* Group visualisation related stories under Visualisations
2019-04-24 10:14:18 +02:00
Dominik Prokop
7764f04abf
Chore: bump storybook and add build script (#16340) 2019-04-02 13:18:13 +02:00
Dominik Prokop
c9e4fedaa8
Feat: Introduce Button and LinkButton components to @grafana/ui (#16228)
- Bumped Storybook to v5
- Introduced Emotion
- Add additional config for storybook (combinations add-on, default padding in preview pane)
- Added basic react based button components
- Introduced AbstractButton, Button and LinkButton components together with stories
- Exposed button components from @grafana/ui
2019-03-27 11:50:36 +01:00
Dominik Prokop
35f6039da7 Enable sass theme change in Storybook 2019-03-21 16:06:55 +01:00
Dominik Prokop
71576a634e Do not use js theme variables in sass (poor dev experience for now) 2019-02-08 14:06:06 +01:00
Dominik Prokop
7762d72ae3 Updated stories to use new theming 2019-02-06 17:03:42 +01:00
Dominik Prokop
5b63ee4bfb Storybook - add actions addon 2019-01-22 13:19:47 +01:00
Dominik Prokop
0505add7f6 Enabled knobs for storybook and implemented some stories 2019-01-22 09:11:30 +01:00
Dominik Prokop
c08313842c Use light theme in storybook 2019-01-16 18:22:08 +01:00
Dominik Prokop
6d3e6b1fcb Experimenting with generating doc for ui component 2019-01-16 10:27:09 +01:00
Dominik Prokop
602bbcb0db Update storybook static files option to load statics correctly 2019-01-09 14:01:46 +01:00
Dominik Prokop
0fb23bd334 WIP 2019-01-09 09:40:57 +01:00