Conversation
|
👋 Atrax1, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
|
There was a problem hiding this comment.
Pull request overview
Adds support for creating collapsed Grafana rows by nesting panels inside rows (AddPanelToRow), and refactors dashboard assembly to buffer row/panel operations and replay them during Build() to preserve call order even when interleaved.
Changes:
- Introduce
AddPanelToRow(rowTitle, ...panels)to nest panels under a row (collapsed rows behavior). - Refactor dashboard building to buffer
AddRow/AddPanel/AddPanelToRowcalls and apply them inBuild()via a two-pass replay. - Update tests and README examples to cover collapsed rows and mixed layouts; remove explicit row-collapsing options.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
observability-lib/grafana/builder.go |
Adds buffering/replay mechanism, row tracking, and AddPanelToRow; removes row options. |
observability-lib/grafana/builder_test.go |
Adds/updates tests for collapsed rows, ordering, and mixed layouts; removes collapsed-row option test. |
observability-lib/README.md |
Documents AddPanel vs AddPanelToRow and provides examples for collapsed and mixed layouts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
using a two-pass approach, ensuring correct ordering when calls are interleaved
AddPanelToRow
Test plan
order