We should be able to drag and drop rows across the dashboard if we are not dragging a row within another row. If we try to drag and drop a row after an uncollapsed row and all its panels, this should be a valid state.
Currently if we drop a row after an uncollapsed row it will become a child of that row, since we do not properly delimit between dropping an item in or outside the area of an uncollapsed row.
This PR changes that and checks whether the dragged row is dropped after all the previous rows children, in which case it will assume the layout as parent and allow the drop. If the row is dragged and dropped in between children of another row, it's parent will be considered the row that holds the children, this being an invalid state. We cannot have rows within rows.
📦 Published PR as canary version: 4.24.1--canary.756.9268571916.0
:sparkles: Test out this PR locally via:
```bash
npm install @grafana/scenes@4.24.1--canary.756.9268571916.0
# or
yarn add @grafana/scenes@4.24.1--canary.756.9268571916.0
```
We should be able to drag and drop rows across the dashboard if we are not dragging a row within another row. If we try to drag and drop a row after an uncollapsed row and all its panels, this should be a valid state.
Currently if we drop a row after an uncollapsed row it will become a child of that row, since we do not properly delimit between dropping an item in or outside the area of an uncollapsed row.
This PR changes that and checks whether the dragged row is dropped after all the previous rows children, in which case it will assume the layout as parent and allow the drop. If the row is dragged and dropped in between children of another row, it's parent will be considered the row that holds the children, this being an invalid state. We cannot have rows within rows.
https://github.com/grafana/scenes/assets/36818606/f20849c8-fa91-4d80-bdb0-c9c6ff3a8f97
Fixes https://github.com/grafana/grafana-org/issues/106
📦 Published PR as canary version:
4.24.1--canary.756.9268571916.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes@4.24.1--canary.756.9268571916.0 # or yarn add @grafana/scenes@4.24.1--canary.756.9268571916.0 ```