Skip to content

Conversation

roncodingenthusiast
Copy link
Contributor

@roncodingenthusiast roncodingenthusiast commented Jul 11, 2025

Which problem is this PR solving?

  • changes internals of position on flexible board panel to handle computed values better.
  • This allows the API to compute height, width and coordinates (x,y)
  • Without this change, we cannot solve the problem of auto assigning panels to specific grid spots

How to verify that this has the expected result

  • create a flexible board with panels without positions
  • create a flexible board with panels with positions

fixes #692

@roncodingenthusiast roncodingenthusiast changed the title first working state fix(flexible-board, resource): Allow panel positions to be autogenerated via the API Jul 11, 2025
@roncodingenthusiast roncodingenthusiast force-pushed the ronald/fix-tf-auto-grid branch 2 times, most recently from 44900ce to 83f0874 Compare July 14, 2025 15:24
@roncodingenthusiast roncodingenthusiast marked this pull request as ready for review July 14, 2025 15:24
@roncodingenthusiast roncodingenthusiast requested a review from a team as a code owner July 14, 2025 15:24
@@ -0,0 +1,103 @@
package validation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW: I've learned that resource-specific ValidiateConfig methods are a bit nicer to reason about, but there is already some "one resource only" examples of validators here in the project.

@@ -289,6 +302,301 @@ func (r *flexibleBoardResource) ImportState(ctx context.Context, req resource.Im
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
}

func (*flexibleBoardResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader {
// upgrade state as position is not an object and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job on this! A first in our codebase ✨

Copy link
Collaborator

@jharley jharley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

Before merging please change the PR title to feat(r/flexible_board): allow panel positions to be autogenerated with the appropriate github label change.

),
},
// now add an SLO panel, remove chart settings from the query panel, remove tags
// now add an SLO panel, remove chart settings from the query panel, remove tags and update from generated positions to provided positions
Copy link
Collaborator

@jharley jharley Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed: there is a non-blocking bug here where switching panels from provided positions to unprovided positions isn't detected (manual -> auto). This can be fixed in followup as a bugfix.

@roncodingenthusiast roncodingenthusiast changed the title fix(flexible-board, resource): Allow panel positions to be autogenerated via the API feat(r/flexible_board): allow panel positions to be autogenerated Jul 21, 2025
@roncodingenthusiast roncodingenthusiast merged commit 12252d0 into main Jul 21, 2025
9 of 10 checks passed
@roncodingenthusiast roncodingenthusiast deleted the ronald/fix-tf-auto-grid branch July 21, 2025 15:54
@jharley jharley added the feature This issue wants to add new functionality. label Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue wants to add new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrating to honeycombio_flexible_board puts all panels in a single column
3 participants