Commit Graph

90 Commits

Author SHA1 Message Date
Ashley Harrison
b321dc7280
Chore: Migrate from react-beautiful-dnd to @hello-pangea/dnd (#90328)
* migrate from react-beautiful-dnd to @hello-pangea/dnd

* revert comment
2024-07-12 10:23:29 +01:00
Ashley Harrison
47f8717149
React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
Nathan Marrs
9e82c85849
Canvas: Chore fix *remaining* betterer issues (#88491) 2024-05-31 13:33:31 -07:00
Krishna Dhakal
deb6d27406
Core: Replace deprecated jest matcher toBeCalledWith (#86635)
* Replace depredated matcher from jest

* perform rechecks

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-05-01 15:33:26 +01:00
Ashley Harrison
3c69de6be5
Chore: removing some type assertions (#85839)
* fix some type assertions in loops

* some more cleanup

* some alerting fixes

* put comments in correct place to ignore rule

* couple more

* undo SilencesFilter changes
2024-04-10 14:54:31 +01:00
Nathan Marrs
391d2ba7c7
Canvas: Limit connection vertex radius to numeric fields (#85420) 2024-04-05 16:09:19 -06:00
Ryan McKinley
ae3156d727
XYChart: Config cleanup and refactoring (#79915)
* xy config cleanup

* more cleanup

* clean up betterer some

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-12-31 16:50:53 -08:00
Khushi Jain
54dc5846c2
Chore: Refactor dataviz aria-label e2e selectors to data-testid (#78938)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-12-17 02:10:04 +02:00
Josh Hunt
8ce4faf5ea
Chore: Deprecate FieldConfigEditorProps in favor of StandardEditorProps (#78319)
* Deprecate FieldConfigEditorProps in favor of StandardEditorProps

* update editors to no longer use FieldOverrideEditorProps
2023-12-07 13:03:18 +02:00
Nathan Marrs
d269a123e7
XYChart: Minor improvements (#78506)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-11-22 11:50:02 -08:00
kay delaney
9e11779921
Chore: Clean up usage of deprecated stylesFactory function (#78419) 2023-11-21 14:01:53 +00:00
Ashley Harrison
2c0c51a0df
Chore: improve types (#78126)
* fix some types

* more type updates

* some more fixes

* more changes

* string instead of unknown

* more like original logic

* remove outdated comment

* update betterer
2023-11-16 12:39:12 +00:00
Drew Slobodnjak
9116043453
Storage: Add maxFiles to list functions (#76414)
* Storage: Add maxFiles to list functions

* Add maxDataPoints argument to listFiles function

* Add maxFiles to ResourceDimensionEditor

* Update pkg/services/store/http.go

* rename First to Limit

---------

Co-authored-by: jennyfana <110450222+jennyfana@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-11-01 09:42:24 -07:00
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
Ihor Yeromin
546b2deb13
A11y: Fix resource picker accessibility (#73488)
* fix(a11y): resource picker
2023-08-21 21:35:18 +02:00
Ihor Yeromin
ab587b6884
A11y: Fix resource cards accessibility (#73487)
fix(a11y): resource cards
2023-08-21 12:26:12 +02:00
Ashley Harrison
963fffeef1
Chore: fix some more types (#72726)
fix some more types
2023-08-14 16:04:04 +01:00
Ashley Harrison
e0587dfb30
Chore: Replace deprecated usage of shape.borderRadius() (#72672)
* properly mark borderRadius() as deprecated, replace borderRadius() with default

* undo a couple of changes

* use radius.pill in FilterPill
2023-08-01 14:46:07 +01:00
Ryan McKinley
09cc63329f
XYChart: Improve base options setup (#67878) 2023-07-10 17:54:01 -07:00
Ashley Harrison
7a2a5dde8b
Chore: Enable remaining jsx-a11y rules (#70990)
enabling remaining a11y rules + ignore existing violations
2023-06-30 16:58:16 +01:00
Ashley Harrison
13e3308959
Chore: some type fixes (#69860)
* some type fixes

* restore empty object

* undo 1 fix for now

* commit betterer update

* explicitly type slug and uid as string | undefined
2023-06-20 17:13:49 +01:00
Laura Benz
24502c4c4a
Add tooltip to instances of IconButton (#68880)
* refactor: tooltip is required

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: add tooltips

* refactor: adjust tests

* refactor: apply changes from code review

* refactor: adjust component for e2e test

* refactor: adjust fallback

* refactor: apply changes from code review

* refactor: apply changes from code review

* refactor: set IconButton default as type=button and remove from use cases

* refactor:  remove aria-labels when duplicated and type=button from use cases

* refactor: clean up

* refactor: fix tests

* refactor: fix type errors

* refactor: remove changes in order in order to add them to a separate PR

* refactor: set IconButton default as type=button

* refactor: remove tooltip

* refactor: apply changes requested in review
2023-06-08 10:23:28 +02:00
Torkel Ödegaard
2966989525
ResourcePicker: Fix missing border bug on cancel button (#68966)
* ResourcePicker: Fix missing border bug

* remove unused imports
2023-05-24 15:10:46 +02:00
Adela Almasan
24037ddd59
ResourcePicker: Fix selecting icons (#68419) 2023-05-12 18:37:43 -05:00
Torkel Ödegaard
debf04eb2c
Modals: Be more consistent with Modal cancel button styling (#68302)
* Modals: Be more consistent with Modal cancel button styling

* Update docs

* Fix tests

* fixing tests
2023-05-12 09:21:07 +02:00
Ryan McKinley
854d497f94
Schema: Fix dimension schemas (#67935) 2023-05-05 12:16:31 -07:00
Sonia Aguilar
3854be1fcb
Alerting: Implement template preview for Grafana AlertManager (#65530)
* Add Preview template and payload editor to templates form

* Add TemplatePreview test and update css

* Preview errors for each template that is wrong

* Enable preview templating only for Grafana Alert Manager

* Use harcoded default payload instead of requesting it to the backend

* Update error response in the api definition

* Add spinner when loading result for preview

* Update api request followind DD changes

* Use pre instead of TextArea to render the preview

* Fix tests

* Add alert list editor

* Add start and end time for alert generator

* Add preview for data list added in the modal

* Update copies and move submit button in alert generator to the bottom

* Copy updates

* Refactor

* Use tab instead of button to preview

* Move payload editor next to the content

* Copy update

* Refactor

* Adress PR review comments

* Fix wrong json format throwing an exception when adding more data

* Use monaco editor for payload

* Only show text 'Preview for...'  when we have more than one define

* Fix some errors

* Update CollapseSection style

* Add tooltip for the Payload info icon explaining the available list of alert data fields in preview

* Set payload as invalid if it's not an array

* Fix test

* Update text in AlertTemplateDataTable

* Add separators to distinguish lines that belong to the preview

* Fix text

* Use subDays instead of addDays for substracting days
2023-04-28 17:05:45 +02:00
Ryan McKinley
607b94aaa2
FieldValues: Use standard array functions (#67012) 2023-04-20 22:03:38 -07:00
Ryan McKinley
09f03e92bf
FieldValues: Use simple array in panel visualizations (#66706)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-17 14:46:29 -07:00
Ryan McKinley
313b3dd2af
Chore: Reuse findFieldIndex from findField (#65973) 2023-04-04 16:54:38 -07:00
Ashley Harrison
85e5326040
Chore: Adjust unit tests so they work with react 18 (#64698)
tweak unit tests so they work with react 18
2023-03-14 17:24:04 +00:00
Ryan McKinley
d710507bc5
Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
Ashley Harrison
53186c14a4
Chore: Improve some types (#64675)
* some type fixes

* few more

* more type fixes

* fix the majority of (window as any) calls

* don't make new variable for event

* few more

* MOAR
2023-03-14 09:51:44 +00:00
Ashley Harrison
f8d89eff56
Chore: fix type errors in tests (#63270)
* fix any's in tests

* fix more any's in tests

* more test type fixes

* fixing any's in tests part 3

* more test type fixes

* fixing test any's p5

* some tidy up

* fix template_srv
2023-02-14 16:46:42 +01:00
Nathan Marrs
8b574e22b5
SVG: Add dompurify preprocessor step (#62143)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-25 10:37:29 -08:00
Adela Almasan
cef15873d6
Canvas: Add tooltip for data links (#61648) 2023-01-20 16:26:51 +00:00
Ryan McKinley
48fbe51d37
Chore: Avoid FC in canvas elements and dimension editors (#61014) 2023-01-05 09:55:55 -08:00
renovate[bot]
e84a01e870
Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00
Nathan Marrs
e157ef1171
Canvas: Add icon value mapping (#59013) 2022-11-22 14:39:19 -08:00
Nathan Marrs
47055561ec
Canvas: Fix setting icon from field data #58499 2022-11-10 10:56:31 -08:00
kay delaney
f37e53f060
Chore: Migrate more theme v1 usage to v2 (#58121) 2022-11-03 09:54:18 -04:00
Nathan Marrs
9d857f4d61
Canvas: Improve resource picker initialization (#57319) 2022-10-24 13:40:28 -07:00
kay delaney
5d53a983d8
React18: Update useCallback arg types where needed (#57084) 2022-10-17 14:52:12 +01:00
Ashley Harrison
5af36e48ba
convert ThresholdsEditor to RTL (#56791) 2022-10-13 08:56:36 +01:00
Laura Fernández
fca252e7dc
A11y: enable rule jsx-a11y/alt-text (#55832)
* Enable jsx-a11y/alt-text rule

* Fix errors

* Fix tests

* Enable jsx-a11y/alt-text rule after solving merge conflict

* Delete unused import

* Modify files according to the reviewer's comments

* Revert test changes and update snapshot

* tweaks to image alt names

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-10-03 09:27:04 +01:00
Nathan Marrs
fc62f7ae23
Canvas: Add text element (#56137)
Co-authored-by: Drew Slobodnjak <drew08t@users.noreply.github.com>
2022-09-30 17:21:02 -07:00
Nathan Marrs
d9d7bff793
Canvas: Fix resource picker folder UX (#55877) 2022-09-27 21:05:13 -07:00
Adela Almasan
0707d682e0
Geomap: Local color range for dimensions (#54348)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-26 15:39:59 -05:00
Ryan McKinley
b483ac322f
Chore: replace React.FC<Props> with simple function component (#54123) 2022-08-24 16:54:34 -04:00
Ashley Harrison
3cf95d7eee
Chore: fix some anys pt.2 (#53928)
* correctly type some more any's

* undo this change for now...
2022-08-22 16:51:33 +01:00