Skip to content

Conversation

@nreese
Copy link
Contributor

@nreese nreese commented Aug 6, 2025

Closes #230818

PR updates getChildApi with logic to return undefined if panel is in a collapsed section.

@nreese
Copy link
Contributor Author

nreese commented Aug 6, 2025

/ci

@nreese
Copy link
Contributor Author

nreese commented Aug 6, 2025

/ci

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 620.2KB 620.3KB +52.0B

@nreese nreese marked this pull request as ready for review August 6, 2025 19:57
@nreese nreese requested a review from a team as a code owner August 6, 2025 19:57
@nreese nreese added release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// backport:version Backport to applied version labels v9.2.0 v9.0.5 v9.1.1 v8.19.1 labels Aug 6, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@nreese nreese removed the v9.0.5 label Aug 6, 2025
Copy link
Contributor

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

lgtm! code review and confirmed that it fixes the bug with duplicating panels when there is a collapsed section.

@nreese nreese merged commit 3095ceb into elastic:main Aug 6, 2025
27 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16788552547

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 230842

Questions ?

Please refer to the Backport tool documentation

@nreese
Copy link
Contributor Author

nreese commented Aug 6, 2025

💚 All backports created successfully

Status Branch Result
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

nreese added a commit to nreese/kibana that referenced this pull request Aug 6, 2025
…psed section that are closed on page load (elastic#230842)

Closes elastic#230818

PR updates getChildApi with logic to return `undefined` if panel is in a
collapsed section.

(cherry picked from commit 3095ceb)

# Conflicts:
#	src/platform/plugins/shared/dashboard/public/dashboard_api/layout_manager/layout_manager.test.ts
nreese added a commit to nreese/kibana that referenced this pull request Aug 6, 2025
…psed section that are closed on page load (elastic#230842)

Closes elastic#230818

PR updates getChildApi with logic to return `undefined` if panel is in a
collapsed section.

(cherry picked from commit 3095ceb)

# Conflicts:
#	src/platform/plugins/shared/dashboard/public/dashboard_api/layout_manager/layout_manager.test.ts
nreese added a commit that referenced this pull request Aug 7, 2025
… collapsed section that are closed on page load (#230842) (#230875)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[dashboard] fix duplicate panel action hangs when dashboard has
collapsed section that are closed on page load
(#230842)](#230842)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-08-06T21:05:19Z","message":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page load (#230842)\n\nCloses
https://github.com/elastic/kibana/issues/230818\n\nPR updates
getChildApi with logic to return `undefined` if panel is in a\ncollapsed
section.","sha":"3095cebf0680288689a5fe9d9bd1a3f99146be98","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page
load","number":230842,"url":"https://github.com/elastic/kibana/pull/230842","mergeCommit":{"message":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page load (#230842)\n\nCloses
https://github.com/elastic/kibana/issues/230818\n\nPR updates
getChildApi with logic to return `undefined` if panel is in a\ncollapsed
section.","sha":"3095cebf0680288689a5fe9d9bd1a3f99146be98"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230842","number":230842,"mergeCommit":{"message":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page load (#230842)\n\nCloses
https://github.com/elastic/kibana/issues/230818\n\nPR updates
getChildApi with logic to return `undefined` if panel is in a\ncollapsed
section.","sha":"3095cebf0680288689a5fe9d9bd1a3f99146be98"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
nreese added a commit that referenced this pull request Aug 7, 2025
…s collapsed section that are closed on page load (#230842) (#230877)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[dashboard] fix duplicate panel action hangs when dashboard has
collapsed section that are closed on page load
(#230842)](#230842)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2025-08-06T21:05:19Z","message":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page load (#230842)\n\nCloses
https://github.com/elastic/kibana/issues/230818\n\nPR updates
getChildApi with logic to return `undefined` if panel is in a\ncollapsed
section.","sha":"3095cebf0680288689a5fe9d9bd1a3f99146be98","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page
load","number":230842,"url":"https://github.com/elastic/kibana/pull/230842","mergeCommit":{"message":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page load (#230842)\n\nCloses
https://github.com/elastic/kibana/issues/230818\n\nPR updates
getChildApi with logic to return `undefined` if panel is in a\ncollapsed
section.","sha":"3095cebf0680288689a5fe9d9bd1a3f99146be98"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230842","number":230842,"mergeCommit":{"message":"[dashboard]
fix duplicate panel action hangs when dashboard has collapsed section
that are closed on page load (#230842)\n\nCloses
https://github.com/elastic/kibana/issues/230818\n\nPR updates
getChildApi with logic to return `undefined` if panel is in a\ncollapsed
section.","sha":"3095cebf0680288689a5fe9d9bd1a3f99146be98"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Aug 7, 2025
…psed section that are closed on page load (elastic#230842)

Closes elastic#230818

PR updates getChildApi with logic to return `undefined` if panel is in a
collapsed section.
@mistic mistic added v9.1.2 and removed v9.1.1 labels Aug 7, 2025
denar50 pushed a commit to denar50/kibana that referenced this pull request Aug 8, 2025
…psed section that are closed on page load (elastic#230842)

Closes elastic#230818

PR updates getChildApi with logic to return `undefined` if panel is in a
collapsed section.
@ThomThomson
Copy link
Contributor

This is a good temporary solution, but the getTitles function should really return a complete list of panels.

Could we update it to get the titles from the Dashboard state directly rather than going through the embeddable APIs? This should be okay as the intention is to get only Dashboard panel titles, not saved object titles.

@nreese
Copy link
Contributor Author

nreese commented Aug 12, 2025

Could we update it to get the titles from the Dashboard state directly rather than going through the embeddable APIs? This should be okay as the intention is to get only Dashboard panel titles, not saved object titles.

I don't think dashboard should reach into embeddable state because there is no guarantee which key is used to saved titles. An embeddable could use its own implementation and its own key to store the title.

Maybe getTitles should only return titles from the current section?

@ThomThomson
Copy link
Contributor

Ah true, I forgot we had moved titles into the embeddable config. Getting titles from the current section could be a good workaround.

NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…psed section that are closed on page load (elastic#230842)

Closes elastic#230818

PR updates getChildApi with logic to return `undefined` if panel is in a
collapsed section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v8.19.1 v9.1.2 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dashboard] duplicate panel action hangs when dashboard has collapsed section that are closed on page load

6 participants