-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SceneCSSGridLayout: Add support for dragging and dropping panels #993
base: main
Are you sure you want to change the base?
Conversation
parentState?: SceneCSSGridItemPlacement; | ||
} | ||
|
||
export class SceneCSSGridItem extends SceneObjectBase<SceneCSSGridItemState> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand doing pocs here (if you need to make changes to VizPanelRenderer esp),
just be aware we have a special class in core for this CSS grid items, https://github.com/grafana/grafana/blob/main/public/app/features/dashboard-scene/scene/layout-responsive-grid/ResponsiveGridItem.tsx#L13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this wasn't a POC, I just factored it out from SceneCSSGridLayout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, just know we are not using it dashboards.
I think a challenge with this work is what logic needs live in scenes vs the core repo implementation (and the ResponsiveGridLayoutManager)
@torkelo The css grid demo should work now - made some fixes. |
@kaydelaney works really well! I am not sure it helps or not but might be useful to go directly from this and explore how moving a panel between layouts would work (as as an early exploratory poc/test, to understand the problem etc) . |
and by "between layouts" i mean between two separate CSS grids in this case (moving between CSS grid and the default grid is a separate problem, one we might have to solve as well) |
There's a lot of code here but the gist of it is enables support for dragging and dropping panels in the responsive grid layout (when paired with the PR linked below)
Let me know if there are any questions or parts of the code that could use further explanation.
Related: grafana/grafana#97495