Skip to content

Include widget layout in dashboard roundtrip#87

Merged
zzwong merged 1 commit intomainfrom
zzwong/fix-dashboard-layout
Mar 13, 2026
Merged

Include widget layout in dashboard roundtrip#87
zzwong merged 1 commit intomainfrom
zzwong/fix-dashboard-layout

Conversation

@zzwong
Copy link
Copy Markdown
Contributor

@zzwong zzwong commented Mar 13, 2026

Summary

  • Add layout { column row width height } to the GraphQL response in get, create, and update dashboard operations
  • Add Layout field to DashboardWidget struct
  • Parse layout from API responses in parseDashboardEntity()

Without this, nrq dashboards get silently drops widget layout data, and pushing a dashboard back resets all widgets to NR's default auto-arrangement (equal-sized 4-column tiles).

Changes

  • api/types.go — add Layout field to DashboardWidget
  • api/dashboards.go — add layout to 3 GraphQL queries + 2 parser sites

Test plan

  • go test ./... passes
  • Verified nrq-dev dashboards get now returns layout data
  • Update input path already conditionally includes layout (no change needed)

Add layout { column row width height } to all three dashboard
GraphQL operations and parse it into DashboardWidget. This
preserves widget positioning and sizing during pull/push
roundtrips — previously layouts were silently lost, causing
NR to auto-arrange all widgets into equal-sized tiles on push.
@zzwong zzwong merged commit 211b9a1 into main Mar 13, 2026
2 checks passed
@zzwong zzwong deleted the zzwong/fix-dashboard-layout branch March 13, 2026 16:35
zzwong added a commit that referenced this pull request Mar 13, 2026
Trigger release for layout roundtrip support added in #87.
zzwong added a commit that referenced this pull request Mar 13, 2026
Trigger release for layout roundtrip support added in #87.

The merge commit for #87 didn't use conventional commit format, so the
auto-release didn't fire.
zzwong added a commit that referenced this pull request Mar 13, 2026
Trivial doc comment update to trigger auto-release for layout support
added in #87.

The merge commit for #87 didn't use conventional commit format, and the
empty commit in #88 didn't touch `.go` files, so the release workflow
path filter didn't match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant