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

[Dashboard] Generate new panel ids on Dashboard clone #166299

Merged

Conversation

ThomThomson
Copy link
Contributor

@ThomThomson ThomThomson commented Sep 12, 2023

Summary

Fixes #166231

This PR ensures that all panels are given new, unique IDs when a dashboard is cloned. This will fix a bug where some panels weren't refreshed properly on navigation, since the "fast dashboard navigation" relies on IDs to be changed in order to handle the logic for deciding which panels need to be rebuilt.

Checklist

For maintainers

@ThomThomson ThomThomson changed the title [Dashboard] Generate new panel ids on clone [Dashboard] Generate new panel ids on Dashboard clone Sep 13, 2023
@ThomThomson
Copy link
Contributor Author

Closing this for now, as this bug is quite small, and the fix is fairly difficult. We can revisit this later if it becomes a priority.

@Heenawter Heenawter reopened this Sep 27, 2023
@Heenawter Heenawter self-assigned this Sep 27, 2023
@ThomThomson ThomThomson marked this pull request as ready for review September 29, 2023 20:24
@ThomThomson ThomThomson requested a review from a team as a code owner September 29, 2023 20:24
@Heenawter Heenawter added release_note:fix loe:small Small Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed loe:small Small Level of Effort labels Sep 29, 2023
@elasticmachine
Copy link
Contributor

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

@Heenawter Heenawter added bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features labels Sep 29, 2023
@jsanz
Copy link
Member

jsanz commented Oct 2, 2023

I'm still experiencing this issue when using a links panel on old auditbeat dashboards

vokoscreenNG-2023-10-02_17-35-50.webm

@jsanz
Copy link
Member

jsanz commented Oct 3, 2023

Apologies, I forgot to clone the dashboards 🤦. After that, the panels are loaded correctly

Peek 2023-10-03 11-19

@nickpeihl nickpeihl self-requested a review October 3, 2023 13:23
Copy link
Member

@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! I just have one concern about a test.

code review and verified cloned dashboards generate new panel ids.

@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
controls 302 304 +2

Async chunks

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

id before after diff
dashboard 374.3KB 374.4KB +94.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
controls 37.4KB 37.7KB +246.0B
dashboard 35.6KB 35.9KB +350.0B
total +596.0B
Unknown metric groups

API count

id before after diff
controls 309 311 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Heenawter @ThomThomson

@ThomThomson ThomThomson merged commit 92f5a88 into elastic:main Oct 3, 2023
33 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Cloning a dashboard does not generate new panel IDs
7 participants