59 Commits

Author SHA1 Message Date
ee6cbd0efc BarChart/StateTimeline: Use noValue setting for error message when data is empty (#107147)
* fix: use fieldConfig.defaults.noValue in barchart and statetimeline

* change name of test

* remove todo comment

* lean on PanelDataErrorView in the case where no fields are present

* update StateTimeline and StatusHistory to use PanelDataErrorView

* fix test

* self-review cleanup
2025-06-27 08:28:13 -05:00
2b8c74de2e i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook

* chore: fix duplicate imports

* chore: fix import sorting and hook dependencies
2025-06-12 11:03:52 +02:00
119d5897ea i18n: imports use @grafana/i18n (#105177)
* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
2025-05-15 09:17:14 +02:00
8f17f607fa FEMT: Add no-restricted-img-srcs rule (#105006) 2025-05-12 10:34:17 +01:00
9ed3c9ee8a Internationalisation: Final mark up of strings (#104165)
* some more markup

* more markup

* more markup

* almost there...

* more markup

* more markup

* last markup!

* fix unit tests
2025-04-22 11:02:01 +01:00
61cd19c540 Chore: More internationalisation markup (#104051)
* More markup

* fix some ternaries

* more alerting markup

* fix unit tests
2025-04-16 09:25:18 +01:00
e2bc620466 PanelEdit: Adapt panel data error view CTAs to scenes (#102881)
adapt CTAs for scenes
2025-04-04 15:12:52 +03:00
dc5badd9b2 Internationalisation: More automatic markup (#102792)
* more automatic i18n markup

* better labels

* little bit of tidy up

* fix unit tests
2025-03-27 10:12:25 +00:00
c9f563e576 Grafana UI: Use package.json exports for internal code (#101815)
* feat(grafana-ui): introduce development exports to prevent importing from grafana/ui/src

* refactor(theme-generation): move theme templates into scripts so themes continue to build

* refactor(frontend): replace  grafana/ui paths that use nested src with /internal or /unstable

* chore(betterer): update better results file

* feat(grafana-ui): support enterprise, remove Text component from internal

* docs(packages): update readme with exporting code conventions
2025-03-12 14:14:32 +01:00
db5f893ea6 Chore: Remove code related to viz/widget split feature (#95614) 2024-10-30 16:12:03 +00:00
94bbc081c8 Chore: Finish converting emotion styles to object syntax (#95399)
* convert some emotion styles to object syntax

* convert more styles to object syntax

* fix placeholder content
2024-10-25 14:50:28 +01:00
2f965a07ab Ref: datasource picker rudderstack events (#95074)
* ref: ds picker events added

* ref: track opendropdown only on click

* ref: update/update all payload added to the event

* ref: configure more ds button event path to from path

* ref: result count fix, enable/disable track

* ref: debounce search tracks

* ref: track connections_plugin_card_clicked

* ref: call tracking from the child comp with result count

* ref: change event names, add creator_team and schema version
2024-10-24 12:03:17 -04:00
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
c151a97110 Chore: Enable no-unreduced-motion and fix errors (#86572)
* enable `no-unreduced-motion` in betterer

* move all animation calls inside handleReducedMotion

* fix violations + enable rule

* update rule README

* remove unnecessary transition from <Collapse>

* remove handleReducedMotion utility and add handleMotion to theme

* update to use new theme value

* handle Dropdown and IconButton

* handle AppChromeMenu and update lint message

* keep rotation at a reduced speed

* handle DashboardLoading
2024-04-29 13:12:36 +01:00
f7a425d352 DashboardScene: Panel edit visualization suggestions (#82296)
* DashboardScene: Panel edit visualization suggestions

* Tweak

* tweak

* Update betterer

* Update
2024-02-13 11:37:49 +01:00
138079bbd8 Transformations: Fix regression where disabling single transformation would display "No data" (#81320) 2024-01-26 09:14:59 -08:00
ffda25f4a3 Skeleton: Abstract out attach/animation logic (#79309)
* apply styles globally to skeleton

* use abstraction everywhere

* just use withSkeleton

* add comment

* update docs

* use it in News as well

* rename withSkeleton to attachSkeleton

* move to @grafana/ui/src/unstable

* rename skeletonProps to rootProps
2023-12-12 11:05:36 +00:00
6a02863cc9 Library panels: Add loading skeleton (#79087)
* add library panel card skeleton

* lineHeight: 1 instead of 0
2023-12-07 09:56:12 +00:00
7a38a2e48b Scenes: Add ability to change panel viz type (#78477)
* Scenes: Add ability to change panel viz type

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-12-06 16:14:54 +00:00
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
0ffdcbbe52 Chore: improve typings (#72679)
improve typings
2023-08-07 09:32:13 +01:00
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
2ae226de89 Explore: Decouple SplitOpen and getFieldLinksForExplore from Panel visualizations (#71811)
* Allow overriding internal data link supplier

* Remove SplitOpen and getFieldLinksForExplore dependencies

* Fix checking if row index is provided

* Fix unit test

* Add a comment

* Mark SplitOpen as deprecated

* Use Panel Context to provide internal data link supplier

* Update packages/grafana-ui/src/components/PanelChrome/PanelContext.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* Update packages/grafana-data/src/utils/dataLinks.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* Add missing eventsScope

* Fix infinite render loops

* Rename internal data link supplier to data link post processor

* Update packages/grafana-data/src/field/fieldOverrides.ts

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

---------

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-07-31 14:10:03 +02:00
88bb4a778d Dashboards: POC split between visualizations and widgets (#70850) 2023-07-12 10:09:22 -03:00
7a2a5dde8b Chore: Enable remaining jsx-a11y rules (#70990)
enabling remaining a11y rules + ignore existing violations
2023-06-30 16:58:16 +01:00
5c152e5a24 PanelTypeCard: Improve contrast for disabled cards (#69907) 2023-06-15 13:00:14 +01:00
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
f5d97c677b TimeSeries: Explicitly add transformer when timeseries-long exists (#64092) 2023-04-28 06:10:02 +03:00
b24ba7b7ae FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
8fb64cbefd ErrorView: Better detection of no-data responses (#65477) 2023-03-28 17:55:13 -05:00
72d257ed4f PanelRenderer: fix error when variable replacement is used (#60968)
fix panel renderer when using replace
2023-01-04 16:20:44 +02:00
831e7697ae grafana/data: Move useFieldOverrides from core (#60817)
* grafana/data: Move useFieldOverrides from core

* Update packages/grafana-data/src/field/fieldOverrides.ts

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

* Review

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-02 02:27:48 -08:00
c3c4a57c79 grafana/data: Move getPanelOptionsWithDefaults from core (#60813)
* grafana/data: Move getPanelOptionsWithDefaults from core

* Add internal comments
2022-12-29 05:48:22 -08:00
793a3f8d32 Accessibility: clean up VisualizationSuggestions (#60557)
clean up VisualizationSuggestions
2022-12-21 10:40:25 +00:00
8fe9969826 PanelRenderer: Interpolate variables in applyFieldOverrides (#59844)
Update PanelRenderer to interpolate variables in applyFieldOverrides
2022-12-12 07:18:47 -07:00
156ed4b56c VizPanel: Support panel migrations and state changes (#58501)
* VizPanel: Make it more real

* Updates

* Progress on query runner and max data points from width

* Updated

* Update

* Tests

* Fixed issue with migration

* Moving VizPanel

* Fixed migration issue due to pluginVersion not being set

* Update public/app/features/scenes/querying/SceneQueryRunner.test.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Some minor review fixes

* Added expect

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-11-21 15:31:01 +01:00
b804b2f073 Plugins: Added hook to make it easier to track interactions in plugins (#56126)
* first stab at context away plugin tracking.

* adding a plugin context and a hook to get hold of a tracker that always appends the plugin context information.

* wip

* improved the code a bit.

* wip

* Fixed type errors.

* added datasource_uid to data sources.

* fixed error message when trying to use hook outside of context.

* small refactoring according to feedback.

* using the correct provider for data source context.

* check not needed.

* enforcing the interaction name to start with grafana_plugin_

* exposing guards for the other context type.

* added structure for writing reporter hook tests.

* added some more tests.

* added tests.

* reverted back to inheritance between context types.

* adding mock for getDataSourceSrv
2022-11-02 16:57:57 +01:00
e85917f041 Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
64bbb7a7ce Chore: Update and enforce usage of typed react-redux hooks (#55349)
* Chore: Update and enforce usage of typed react-redux hooks
2022-09-19 10:49:35 +01:00
fbfe2b2800 Library Panel: Allow to delete it when disabled or deprecated (#54662) 2022-09-05 16:45:45 +02:00
b483ac322f Chore: replace React.FC<Props> with simple function component (#54123) 2022-08-24 16:54:34 -04:00
7cbf6015db StructureRev: use deep equals for structure revision change detection (#53920) 2022-08-19 08:29:23 -07:00
3a586a6053 PanelRenderer: Improves PanelRenderer performance (#51092)
* PanelRenderer: Improves PanelRenderer performance

* Minor refactor

* remove old func
2022-06-20 14:41:39 +02:00
56a9994a13 Panels: Fixes issue with showing 'Cannot visualize data' when there issue really was no data (#50485) 2022-06-10 16:07:38 +02:00
3c6e0e8ef8 Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
e3590e1a9b Panels: Use the No value option when showing the no data message (#47675)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring

* NoData: Use field config No value option as text when display no data message

* Use PanelDataErrorView in TabelPanel

* Add PanelDataErrorView to PieChart

* Updated
2022-04-14 10:10:03 +02:00
8329cd59f6 LibraryPanels: Increase max description length to 2048 chars (#46601) 2022-03-24 12:14:56 +00:00
8c47373d74 LibraryPanels: Prevent long descriptions and names from obscuring the delete button (#45190)
* fix library panel description wrapping

* make panel name wrap
2022-02-11 10:57:22 +00:00
d76dd7d14b LogsPanel: Show message and actions if panel cannot visualize data (#42878) 2021-12-09 11:46:24 +01:00
8828d5e8d7 BarChart: Use new data error view component to show actions in panel edit (#42474) 2021-12-08 11:45:56 +01:00