Skip to content
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

[8.x] [Dashboard][Collapsable Panels] Fix bug on `layout` update (#202049) #202072

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…02049)

## Summary

When the `layout` prop updates, we cannot assume that it is "safe" (i.e.
we cannot assume it has no floating panels and/or colliding panels).
Because of this, we need to resolve each grid row when this prop
changes. When I added this in
elastic#200793, I accidentally only
**compacted** the rows, which did not account for possible collisions
that the Dashboard's panel placement strategies do not account for. This
PR fixes that by calling `resolveGridRow` (which compacts **and**
detects collisions) instead of just `compactGridRow` (which, as the name
suggests, only compacts the rows)

**Before:**

https://github.com/user-attachments/assets/bcea4efd-35fa-425d-ac04-41434ffaa810

**After:**

https://github.com/user-attachments/assets/6cd205c6-d1d5-4a97-8d14-425c2a4bbeda

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

There are no risks to this PR, since all work is contained in the
`examples` plugin.

(cherry picked from commit 57b8bda)
@kibanamachine kibanamachine merged commit f2e732f into elastic:8.x Nov 27, 2024
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @Heenawter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants