108 Commits

Author SHA1 Message Date
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
abb885c585 I18n: Move eslint rule to package (#105860) 2025-05-29 16:11:59 +02:00
267e3ffb7c Actions: Add support for custom variables (#105639)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-05-22 06:07:24 -05: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
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
5efb620f1b Canvas: Fix layout calcs for scale mode (#103408) 2025-04-11 11:28:14 -07:00
a420e2f8f2 Internationalisation: More markup (#103634)
* some manual markup

* more markup

* update count names
2025-04-09 11:31:48 +01:00
6822805c32 Grafana Runtime: Use package.json exports for internal code (#102100)
* refactor(frontend): update runtime import paths for grafana/runtime/src -> grafana/runtime

* feat(runtime): introduce internal api entrypoint and exports property

* refactor(frontend): update runtime imports to use internal entrypoint

* chore(betterer): update results file

* refactor(bookmarks): update runtime/unstable import

* chore(betterer): update results file

* test(frontend): fix failing tests due to mocking nested runtime imports

* test(datasourcesrv): fix failing tests due to mocks

* chore(alerting): clean up redundant import

* fix(packages): fix default require export pointing to types declaration file

* docs(packages): update readme related to exports

* chore(internationalization): fix import paths

* chore(betterer): update results file
2025-03-27 08:59:57 +01:00
5aeaa18ac2 Canvas: One click links and actions (#99616)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-02-13 11:46:29 -06:00
19cc2efaf2 Chore: Fix unnecessary nullish-coalescing (#97555)
* Fix unnecessary nullish-coalescing

* Fix nullish use as per code review

* Fix other incorrect use of nullish coalescing
2024-12-11 17:34:06 +00:00
b2e53997e2 Canvas: Fix data links target (#95113) 2024-10-22 09:36:48 -05:00
af48d3db1e Canvas: Add actions support (#90677)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-09-09 09:11:55 -05:00
f6b55ced6f Canvas: Remove null data links (#91859) 2024-08-14 23:58:39 +03:00
787abccfbc Canvas: Fix selection box glitch when adding certain elements (#91654)
* fix selecto glitch when adding certain elements

* minor doc updates
2024-08-08 09:42:24 -07:00
0a870e6a88 Canvas: Element data links refactor (#90636)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-07-25 07:13:21 -05:00
9bc68562d4 Canvas: Element level data links (#89079) 2024-07-12 12:02:49 -05:00
8989ac4a0c Canvas: Improved tooltip (#90162)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-07-10 14:52:15 -05: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
12a45fdeca Canvas: Refactor scene.tsx for better maintainability (#88517)
Co-authored-by: drew08t <drew08@gmail.com>
2024-06-13 03:33:42 +03:00
9e82c85849 Canvas: Chore fix *remaining* betterer issues (#88491) 2024-05-31 13:33:31 -07:00
99262c53b6 Canvas: Chore clean up betterer (#87477) 2024-05-09 10:59:49 -07:00
5e4722fe2e Canvas: Fix canvas style regression (#87363) 2024-05-04 02:47:30 +03:00
1ef1cc7e3f Canvas: Add support to rotate a group of elements (#87358) 2024-05-03 15:58:51 -07:00
1d6d5cc2cd Chore: improve typings (#87306)
* some fixes

* some more fixes

* some canvas fixes

* use removeProperty instead

* few more

* fixy fix

* undo changes to ticks for now
2024-05-03 17:21:37 +01:00
eb86fd867f Canvas: Update new element type with rotation (#85690) 2024-04-11 15:36:33 -05:00
b47f8b429e Canvas: Hide background image size editor options for SVG based elements (#85419) 2024-04-02 09:04:36 -07:00
20eac8d264 Canvas: Fix styles applying glitch on element type changing (#85184)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-03-29 08:10:44 +02:00
26473a0074 Canvas: Add "infinite" pan / zoom functionality (#84968)
* attempt at solving issue and resetting bounds to match panel content

* cleanup failed experiments

* add toggle for infinite pan - dont love naming but open to suggestions; clean up scene transform function

* add ability to "infinite" zoom (i.e. render more canvas via zooming out)

* slight refactor

* revert refactor as it broke things
2024-03-22 21:38:45 +01:00
566cee7d6b Canvas: Add ability to rotate elements (#83295) 2024-03-22 13:00:50 -07:00
0b4830ccfd Canvas: Add corner radius option (#84873)
* Canvas: Add corner radius option

* Update connection radius logic

* Simplify angle calcs

* Simplify math to be a bit more clear and efficient

* Add checks for hyperbola behavior

* Prevent arc calcs if no radius

* Add comments for SOME clarity

* Add some more clarity to comments

* Fix linter issue

* Check for segment overlap for first vertex

* Update public/app/plugins/panel/canvas/components/connections/ConnectionSVG.tsx

* Add comment for calc clarity
2024-03-22 12:32:12 -07:00
8b32073d5f Canvas: New basic elements (#84205)
* feat(canvas): new canvas shapes added
2024-03-21 15:23:35 +01:00
3877d976d6 Canvas: Add snapping to vertex edit (#84417)
* Canvas: Add vertex control to connections

* Add function for vertex conversion

* Add vertex interface

* Add future vertex handling

* Only show vertices when connection selected

* Add vertices to save model

* Apply select constraint to first midpoint

* Add some infrastructure for vertex edit

* Render vertex edit and capture events

* Save vertex edit on button release

* Handle adding new vertices

* Limit number of vertices to 10

* Handle zoom for vertex edit and creation

* Rename future to add

* Remove more references to future

* Remove unsued console log

* Clean up styles

* Add some clarity for path generation

* Add clarity to connections event handling

* Canvas: Add snapping to vertex edit

* Remove unused color styling

* Add horizontal and vertical snap for vertex edit

* Add snapping during vertex creation

* Hide vertex before removal
2024-03-20 23:49:28 -07:00
f273681956 Canvas: Add vertex control to connections (#83653)
* Canvas: Add vertex control to connections

* Add function for vertex conversion

* Add vertex interface

* Add future vertex handling

* Only show vertices when connection selected

* Add vertices to save model

* Apply select constraint to first midpoint

* Add some infrastructure for vertex edit

* Render vertex edit and capture events

* Save vertex edit on button release

* Handle adding new vertices

* Limit number of vertices to 10

* Handle zoom for vertex edit and creation

* Rename future to add

* Remove more references to future

* Remove unsued console log

* Clean up styles

* Add some clarity for path generation

* Add clarity to connections event handling

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-03-15 09:35:07 -07:00
9573c13223 Canvas: Add universal data link support (#84142) 2024-03-13 19:30:12 +02:00
38a0eab137 Canvas: Fix datalink positioning glitch (#83869) 2024-03-05 15:23:10 -08:00
32a1f3955a Canvas: Keep tooltip open until dismissed (#82213) 2024-02-09 09:09:34 -06:00
b0130ecb82 Canvas: Add element snapping and alignment (#80407)
Co-authored-by: drew08t <drew08@gmail.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2024-01-30 15:37:46 -08:00
8784052ccf Canvas: Pan zoom minor refactor (#80337)
* enable context menu for canvas while in panel edit mode

* Disable context menu when editing is not enabled in canvas

* follow up minor refactor
2024-01-18 19:05:15 -08:00
a4b2b86194 Update Moveable (#73726)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-01-17 12:00:41 -08:00
c40b2f90ba Canvas: Support context menu in panel edit mode (#80335) 2024-01-11 19:41:19 +02:00
2502fe4d19 Canvas: Add Pan and Zoom (#76705)
* Canvas: Add Zoom

* Scale selecto components based on zoom state

* Fix pan by reverting to 3.1.0 for zoom-pan

* Update to latest library that fixes pan regression

* Add mini map to canvas pan zoom

* Fix selecto and anchors on hover

* Update naming to be more clear

* Switch back to contentComponent

* Apply transformScale to drag and resize

* Update connection source and target scaling

* Add option to display mini map

* Update yarn lock

* Revert "Update yarn lock"

This reverts commit 3d1dd65d5726fb0fd0813347451884a4034ae5d3.

* Set yarn lock to main

* Revert "Set yarn lock to main"

This reverts commit 64bc50557e75657fae14f81077d1d08b4e9e9029.

* Update to Yarn 4

* Add react-zoom-pan-pinch

* Update react-zoom-pan checksum

* Revert changes to json files

* Remove last line of api merged

* Remove last lines of all impacted jsons

* Update home json

* Update coordinate calc function to include scale

* Fix types in coordinate calc function

* Fix util calculation for transform

* Fix arrow anchor shift behavior

* Fix scale offset when adding elements during zoom

* Fix drag of selected group during zoom

* Add feature flag for canvas pan zoom

* Revert "Add feature flag for canvas pan zoom"

This reverts commit b026e31d8d9ed64b1fe307f852df10292fffadf4.

* Regenerate feature flag after merge

* Apply feature flag to enable pan zoom wrappers

* Add mini map toggle behind feature flag

* Simplify minimap behavior

* Update feature flag registry

* Set minimap to false by default

* fix gen-cue

* Set toggles gen to main

Add blank line to toggle gen csv

* Add canvas pan zoom to csv

* Remove old comment

* Change ref parameter to be more descriptive

* Rename visibleFun to be more descriptive

* Consolidate transformScale transformRef in util

* Remove non-null assertion on connection parentRect

* Consolidate parentRect null coalescing into object

* Remove minimap and change toggle

* Add controls inline help for pan and zoom

* Clean up mouse events

* Pull scale out of ref and isolate transform

* Remove transform ref from scene div

* Fix context menu visible behavior

* Fix connections and update util functions

* Move transform component instance to util

* fix backend test

* minor updates

* Clean up connections / fix minor bug where offset of arrow wasn't being calculated correctly

* missed connection code cleanup

* cleanup scene code a bit more

* actually fix backend test

* move eslint disable line closer to actual issue

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-01-02 11:52:21 -08:00
0c44a6f9bb Chore: Improve typings 🧹 (#74599)
* various type fixes

* candlestick panel type fixes

* few more fixes

* some fixes

* more :)

* moar!

* undo change to SilencesFilter

* undo change to configureStore
2023-09-13 09:17:07 +01:00
9e1f528919 A11y: Fix canvas element accessibility (#73483)
* fix(a11y): canvas tooltip element

* fix(a11y): canvas element selection
2023-08-21 21:34:47 +02:00
f169151143 A11y: Fix canvas setting button accessibility (#73413)
* fix(a11y): canvas setting button
2023-08-18 09:07:48 +02:00
9852b24d61 Chore: Upgrade prettier to v3 (#71764)
* Update dependency prettier to v3 (#71586)

* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* unplug prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 15:58:22 +01:00
5ca382c88a Revert "Update dependency prettier to v3 (#71586)" (#71755)
This reverts commit 2e8cd1c021ffba522457982f3535916bbead22a4.
2023-07-17 14:46:15 +01:00
2e8cd1c021 Update dependency prettier to v3 (#71586)
* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-07-17 09:19:27 +01:00
7a2a5dde8b Chore: Enable remaining jsx-a11y rules (#70990)
enabling remaining a11y rules + ignore existing violations
2023-06-30 16:58:16 +01:00
186cd96447 Canvas: Fix exit panel edit mode issue (#69315)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-06-01 01:31:10 +03:00
f49b9b89cf chore: high level restructure of canvas panel files (#69004) 2023-05-24 18:32:36 +02:00