Commit Graph

121 Commits

Author SHA1 Message Date
Jack Westbrook
d282b7a6f8
Grafana UI: Make it possible to bundle package with plugins (#76191)
* moved themecontext to data

* chore(grafana-ui): re-export ThemeContext from grafana/data for backwards compatibility

* Moved icon bundling to core.

* feat(plugins): share react-inlinesvg with plugins for grafana/ui bundling

* chore(codeowners): add generate-icon-bundle.js to file

* chore(storybook): update path to iconBundle file for theme

* feat(plugins): share i18n dependency via systemjs

* Make sure that icon bundle is initialized for tests.

* Removed comment.

* added tests for icon root.

* Removing the need of having an init variable.

* feat(grafana-ui): add icon svgs to bundle for projects that don't rely on grafana

---------

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2023-10-13 14:11:41 +02:00
Sven Grossmann
39a18ca6ba
Frontend: Fix frontend styleguide emotion example (#70371)
fix wrong example
2023-06-20 13:31:38 +03:00
Alex Khomenko
516baf59fb
StyleGuide: Add testing guide (#69403)
* StyleGuide: Testing Select

* Add mocking section

* Fixes

* Add examples of backendSrv mocks

* Minor tweaks

* Updates after review

* Update examples
2023-06-09 18:21:32 +03:00
Khushi Jain
c178cbc4dc
Docs: updated emotion's cx link (#66180)
updates emotion's cx link
2023-04-11 12:20:11 +02:00
Sven Grossmann
3335d46c5f
Theme: Fix wrong code segment in theme.md (#62488)
* fix wrong markdown

* fix prettier
2023-03-28 12:18:50 +01:00
Levente Balogh
1c6357637d
FE Style Guide: Update component definition (#64869)
* chore: update our FE styleguide related to React.FC

* fix: typo
2023-03-16 09:57:29 +01:00
Ryan McKinley
4f13e78d11
Chore: Avoid explicit React.FC<Props> when possible (round 2) (#64749) 2023-03-15 16:56:09 +02:00
Ryan McKinley
d710507bc5
Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
Emil Tullstedt
649b50055c
Chore: Move all backend contribution documents to a single directory (#61140) 2023-01-11 11:16:52 +01:00
Dan Cech
9ea6a43089
Build: clean up and document integration test convention (#58170)
* clean up and document integration test convention

* clarify integration test conventions

* clean up integration tests that don't follow convention

* mark testIntegration* functions as helpers to avoid confusion
2022-11-04 10:14:21 -04:00
Christopher Moyer
088a4e02e8
Docs: removes writing guidelines, points contributors to Writers' Toolkit (#58011)
* removes writing guidelines, points contributors to the Writers' Toolkit

* Update contribute/documentation/README.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-11-01 14:48:52 -05:00
Torkel Ödegaard
580ca144fd
StyleGuide: Minor fix for themes.md (#56012)
* Update themes.md

* Update themes.md

* Updates
2022-10-05 08:50:39 +02:00
George Rodrigues
8950d86141
fix: some typos (#56171) 2022-10-04 18:43:49 -05:00
Torkel Ödegaard
c9b5acfefc
Frontend: Update frontend styleguide emotion example (#55608)
* Frontend: Update frontend styleguide emotion example

* Update styling guide

* Fixes

* Add back link to cx

* prettier

* Update contribute/style-guides/frontend.md

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* prettier

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-09-23 08:22:16 +02:00
Ryan McKinley
b483ac322f
Chore: replace React.FC<Props> with simple function component (#54123) 2022-08-24 16:54:34 -04:00
Alex Khomenko
b42f3e2c4c
A11y: Create Minimal Styleguide (#46948)
* First draft of the guide

* Fix Select part

* Move a11y PR guidelines

* Update contribute/create-pull-request.md

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-08-11 14:00:38 +03:00
Josh Hunt
583490678b
update e2e docs to remove aria-label mentions (#52999) 2022-07-29 16:42:53 +01:00
Torkel Ödegaard
dfce454eca
StyleGuide: Update frontend style guide (#52471)
We should not explicitly type the return type for React functional components.
2022-07-19 19:12:11 +02:00
Selene
53799973f0
Documentation: Add using mock explanation for testing (#46360)
* Add using mock explanation for testing

* Update information of how to add go:generate in code

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-03-09 14:08:55 +01:00
Dimitris Sotirakis
22eb2df602
E2E: Rename end-to-end-tests-server to grafana-server (#44249)
* Rename to grafana-server / move scripts into new directory

* Change grafana-server step command

* Change scripts paths

* Use test grabpl version

* Update run-suite script

* Further name updates

* Update grabpl version

* Update contribute/style-guides/e2e-core.md

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-01-20 17:01:00 +00:00
Christopher Moyer
e1ad692cb3
docs: contributing updates (#41836)
* contributing updates first draft

* ran yarn prettier

* updated links

* removed test xref

* Update contribute/documentation/README.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-01-04 16:14:32 -05:00
Uchechukwu Obasi
eb4c3a4485
Update frontend guide to reflect new paradigm for api organization (#43435) 2021-12-23 09:28:41 +01:00
Uchechukwu Obasi
e226480e06
Docs: update frontend style guide to highlight new function paradigm (#40347)
* docs: update frontend style guide to highlight new function paradigm

* docs: add section for default exports

* chore: some typo/syntax/grammar fixes

* chore: change new additions from rule to recommendation

* small typo fix
2021-10-19 08:30:43 +02:00
Andrej Ocenas
14d90b0cf8
Link to contributing docs and fix some image markdown examples (#39726) 2021-09-30 12:59:35 -04:00
Torkel Ödegaard
bc01c9cdbc
Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
Uchechukwu Obasi
774f0a0d01
e2e guide: improves data-testid code snippet to be clear and understandable (#38791) 2021-09-06 07:03:02 +01:00
Jack Westbrook
8d3b31ff23
Build: Upgrade Webpack 5 (#36444)
* build(webpack): bump to v5 and successful yarn start compilation

* build(webpack): update postcss dependencies

* build(webpack): silence warnings about hash renamed to fullhash

* build(webpack): enable persistent cache to store generated webpack modules / chunks

* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking

* chore(yarn): run yarn-deduplicate to clean up dependencies

* chore(yarn): refresh lock file after clean install

* build(webpack): prefer output.clean over CleanWebpackPlugin

* build(webpack): prefer esbuild over babel-loader for dev config

* build(babel): turn off cache compression to improve build performance

* build(webpack): get production builds working

* build(webpack): remove phantomJS (removed from grafana in v7) specific loader

* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack

* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles

* build(webpack): clean up redundant code. inform postcss about node_modules

* build(webpack): remove deprecation warnings flag

* build(webpack): bump packages, dev performance optimisations, attempt to get hot working

* chore(storybook): use webpack 5 for dev and production builds

* build(storybook): speed up dev build

* chore(yarn): refresh lock file

* chore(webpack): bump webpack and related deps to latest

* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit

* feat(webpack): prefer react-refresh over react-hot-loader

* build(webpack): update webpack.hot to use react-refresh

* chore: remove react-hot-loader from codebase

* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors

* revert(webpack): remove stats.errorDetails from common config

* build(webpack): bump to v5 and successful yarn start compilation

* build(webpack): update postcss dependencies

* build(webpack): silence warnings about hash renamed to fullhash

* build(webpack): enable persistent cache to store generated webpack modules / chunks

* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking

* chore(yarn): run yarn-deduplicate to clean up dependencies

* chore(yarn): refresh lock file after clean install

* build(webpack): prefer output.clean over CleanWebpackPlugin

* build(webpack): prefer esbuild over babel-loader for dev config

* build(babel): turn off cache compression to improve build performance

* build(webpack): get production builds working

* build(webpack): remove phantomJS (removed from grafana in v7) specific loader

* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack

* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles

* build(webpack): clean up redundant code. inform postcss about node_modules

* build(webpack): remove deprecation warnings flag

* build(webpack): bump packages, dev performance optimisations, attempt to get hot working

* chore(storybook): use webpack 5 for dev and production builds

* build(storybook): speed up dev build

* chore(yarn): refresh lock file

* chore(webpack): bump webpack and related deps to latest

* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit

* feat(webpack): prefer react-refresh over react-hot-loader

* build(webpack): update webpack.hot to use react-refresh

* chore: remove react-hot-loader from codebase

* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors

* revert(webpack): remove stats.errorDetails from common config

* revert(webpack): remove include from babel-loader so symlinks (enterprise) work as before

* refactor(webpack): fix deprecation warnings in prod builds

* fix(storybook): fix failing builds due to replacing css-optimise webpack plugin

* fix(storybook): use raw-loader for svg icons

* build(webpack): fix dev script colors error

* chore(webpack): bump css-loader and react-refresh-webpack-plugin to latest versions

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-08-31 12:55:05 +02:00
Gábor Farkas
8e88600c04
style-guide: frontend: describe directory naming style (#38607)
* style-guide: frontend: describe directory naming style

* apply recommended changes

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-08-27 08:27:56 +02:00
Arve Knudsen
78596a6756
Migrate to Wire for dependency injection (#32289)
Fixes #30144

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2021-08-25 15:11:22 +02:00
Will Browne
ae17cce316
Plugins: Add Hide OAuth Forward config option (#36306)
* add prop

* add angular conf

* invert naming

* undo md changes

* fix wording

* y u fail 4 me

* refactor(datasourcesettings): rename hideForwardOAuthIdentityOption prop

* refactor(datasourcesettings): rename scope.hideForwardOAuthIdentityOption

* Update contribute/style-guides/e2e.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* feat(datasourcehttpsettings): add showForwardOAuthIdentityOption to angular wrappers & template

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-20 15:53:54 +02:00
Ursula Kallio
a058a09b9b
Include voice and tone summary (#37742)
Fix https://github.com/grafana/technical-documentation/issues/35.
2021-08-11 11:30:40 +02:00
Sarah Zinger
f32d200fc0
E2E: Add support for data-test-id over aria labels and add importDashboard flow (#36483)
* E2E: Add support for data-testids and not just aria-labels.
2021-07-19 14:01:31 -04:00
Torkel Ödegaard
d4a990215f
Theme: Update theme style guide and docs with new theme info and variable picking guide (#36530)
* Theme: Update theme style guide and docs with new theme info and variable picking guide

* Minor spell fix
2021-07-10 10:24:14 +02:00
Arve Knudsen
c2c1ec7d0f
Chore: Move from master to main branch (#33693)
* Chore: Move from master branch to main

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* CI: Upgrade build pipeline tool to v2

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-06 16:29:29 +02:00
Jack Westbrook
c809d63065
Buttons: replace usage of .btn classnames (#33226)
* refactor(loginpage): migrate custom button styles to use Button component

* refactor(certificationkey): prefer grafana-ui form elements over html elements and classnames

* refactor(axisselector): prefer grafana-ui Button component over html button element

* refactor(input-datasource): replace use of btn class with grafana-ui components

* chore(grafana-ui): delete deprecated ToggleButtonGroup component

* refactor: replace btn and cta-form__close class usage with IconButton

* chore(closebutton): post master merge use v2 theme

* refactor(permissionlist): remove usage of .btn classname

* Wip

* docs(styling): update styling and theme docs import paths

* refactor(alerting): remote btn classnames from TestRuleResult

* refactor(apikeys): prefer grafana-ui Button components over btn classNames

* refactor(folders): prefer grafana-ui Button components over btn classNames

* refactor(teams): prefer grafana-ui Button components over btn classNames

* refactor(datasources): prefer grafana-ui Button components over btn classNames

* refactor: prefer grafana-ui Button components over btn classNames

* Minor style tweak to service buttons

* test: update snapshots related to button changes

* chore(input-datasource): remove unused import declaration

* refactor(loginservicebuttons): rename theme.palette to theme.colors

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-04-23 10:06:42 +02:00
Diana Payton
50ab6155ff
Update documentation-style-guide.md (#32959) 2021-04-13 21:40:28 +02:00
Harold Dost
9efaa2c13f
Fix style guide: web server (#32817) 2021-04-09 01:02:00 +02:00
Diana Payton
7896c6a7b1
Update documentation-style-guide.md (#32690) 2021-04-05 16:58:38 +02:00
achatterjee-grafana
1a37ba24d3
Added entry for web server. (#30715) 2021-01-28 11:37:14 -05:00
Diana Payton
c1906db21f
Update documentation-style-guide.md (#30611)
* Update documentation-style-guide.md

* Update contribute/style-guides/documentation-style-guide.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-01-26 07:46:27 -08:00
Dominik Prokop
951b11a9a5
Update styling.md guide (#30594) 2021-01-25 12:52:22 +01:00
Ursula Kallio
f97348ff5b
List + before -; rm old Git ref; reformat. (#30543)
* List + before -; rm old Git ref; reformat.

* Update contribute/style-guides/documentation-style-guide.md

* Update contribute/style-guides/documentation-style-guide.md

* Update contribute/style-guides/documentation-style-guide.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update contribute/style-guides/documentation-style-guide.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update contribute/style-guides/documentation-style-guide.md

* Update contribute/style-guides/documentation-style-guide.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update contribute/style-guides/documentation-style-guide.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-01-22 18:30:24 +01:00
Arve Knudsen
4e37941cc4
Backend style guide: Document JSON guidelines (#30267)
* Backend style guide: Document JSON guidelines

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-14 07:49:25 +01:00
Diana Payton
5483fbff7d
Update documentation-markdown-guide.md (#30207) 2021-01-12 13:41:19 -08:00
Diana Payton
d6948bae62
Update documentation-markdown-guide.md (#30235) 2021-01-12 12:25:05 -08:00
Arve Knudsen
21e835f3a6
Backend style guide: Document database patterns (#30219)
* Backend style guide: Document database patterns

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Wording

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Avoid stacked headings

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-12 16:24:22 +01:00
Diana Payton
ad5762cd6a
Update documentation-style-guide.md (#30202) 2021-01-11 11:28:04 -08:00
achatterjee-grafana
0561c941af
Minor correction to explanation on correct MS SQL usage. (#29889)
* Minor correction to explanation added for correct MS SQL usage.

* Update contribute/style-guides/documentation-style-guide.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-12-17 09:45:04 -05:00
Arve Knudsen
0c8498401e
Backend style guide: Add more guidelines (#29871)
* backend style guide: Add more guidelines

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-12-16 19:35:07 +01:00
Alex Khomenko
dd1cbd21f0
Docs: Add info about typing of connected props to Redux style guide (#29842)
* Add info about typing of connected props

* Update with suggestions
2020-12-15 16:27:43 +02:00