Commit Graph

37 Commits

Author SHA1 Message Date
Nathan Marrs
9573c13223 Canvas: Add universal data link support (#84142) 2024-03-13 19:30:12 +02:00
Nathan Marrs
38a0eab137 Canvas: Fix datalink positioning glitch (#83869) 2024-03-05 15:23:10 -08:00
Adela Almasan
32a1f3955a Canvas: Keep tooltip open until dismissed (#82213) 2024-02-09 09:09:34 -06:00
Drew Slobodnjak
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 3d1dd65d57.

* Set yarn lock to main

* Revert "Set yarn lock to main"

This reverts commit 64bc50557e.

* 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 b026e31d8d.

* 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
Ashley Harrison
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
Ihor Yeromin
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
Ashley Harrison
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
Ashley Harrison
5ca382c88a Revert "Update dependency prettier to v3 (#71586)" (#71755)
This reverts commit 2e8cd1c021.
2023-07-17 14:46:15 +01:00
renovate[bot]
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
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
Adela Almasan
58c9618160 Canvas: Update connection info on element rename (#62532) 2023-01-30 22:36:57 -06:00
Adela Almasan
cef15873d6 Canvas: Add tooltip for data links (#61648) 2023-01-20 16:26:51 +00:00
Nathan Marrs
b1a24232e4 Canvas: Add support for basic arrows (#57561)
Co-authored-by: Ryan McKinley <ryan.mckinley@grafana.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Drew Slobodnjak <drew.slobodnjak@grafana.com>
2023-01-13 02:38:00 +00:00
Adela Almasan
88a8cba6b0 Canvas: Save element placement (#61007) 2023-01-04 18:29:01 -05:00
Nathan Marrs
ff7225745a Canvas: Add metric value element type (#55205) 2022-09-22 10:21:45 -07:00
Adela Almasan
6c58ea66a9 Canvas: Fix inconsistent border behavior (#53262) 2022-08-03 16:23:08 -05:00
Adela Almasan
5797fbc0b2 Canvas: Cleanup default elements (#52958) 2022-08-01 15:34:05 -05:00
Drew Slobodnjak
e2044cde13 Canvas: Enable ability to instantly select and drag an element (#52861)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-07-28 16:55:31 -07:00
Drew Slobodnjak
bf8bb26f63 Canvas: Set element cursor to grab (#52503)
* Only display grab cursor when editing enabled

* Apply grabbing cursor while dragging an element
2022-07-21 13:17:25 -07:00
Nathan Marrs
48e757ff87 Canvas: Show constraints on element drag #52074 2022-07-12 07:22:16 -07:00
Nathan Marrs
5d74701848 Canvas: Address center constraint on drag glitch (#51270) 2022-06-22 20:30:24 -07:00
Nathan Marrs
097583e952 Canvas: Fix element placement UX (#49665) 2022-05-26 09:50:35 -07:00
Nathan Marrs
bb4a834ee3 Canvas: Fix resize breaking certain constraints (#49551) 2022-05-24 20:19:08 -07:00
Nathan Marrs
5eb20739c2 Canvas: Fix inconsistent element resizing UX (#49450) 2022-05-23 20:13:58 -07:00
Nathan Marrs
646dcfccf9 Canvas: Implement minimum element size + center constraint UX (#49294) 2022-05-20 00:04:34 -07:00
Nathan Marrs
35ea67c210 47853 canvas constraint visualizations (#49206)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2022-05-18 18:49:57 -07:00
Nathan Marrs
ff38f24044 Canvas: Refactor group to frame (#48671) 2022-05-03 22:58:00 -07:00
Nathan Marrs
66d7105b34 Canvas: Group constraint support (#48563) 2022-05-03 19:51:01 -07:00
Nathan Marrs
2b2f275a08 Canvas: Support scale + center constraints (#48085) 2022-04-22 14:02:36 -07:00
Josh Hunt
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
Nathan Marrs
d442608eb9 Canvas: Implement new constraint system (#47911)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-20 09:59:49 -07:00
Nathan Marrs
2af5ad4764 Canvas: use name as UID (#42696) 2021-12-06 21:04:58 -08:00
Nathan Marrs
e07abd76c0 Canvas: refactor layer editor (#42562)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-02 15:54:45 -08:00
Nathan Marrs
84d13c3f35 Canvas: add layer elements editor functionality (#40968) 2021-10-28 09:58:31 -07:00
Nathan Marrs
8de30ccf9a Canvas: Add basic responsive design and layer editor UX (#40404) 2021-10-13 13:12:16 -07:00
Nathan Marrs
f7576b3cdf Canvas: Ability to move and resize elements freely (#40179) 2021-10-12 10:52:15 -07:00
Ryan McKinley
9a0040c0ae Canvas: add alpha canvas panel and initial interfaces (#37279) 2021-09-02 10:01:08 -07:00