Skip to content

Comments

[8.19] [Embeddable Rebuild] Fix panel title sync with saved object when using defaultTitle (#225237)#225443

Merged
kibanamachine merged 4 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-225237
Jul 1, 2025
Merged

[8.19] [Embeddable Rebuild] Fix panel title sync with saved object when using defaultTitle (#225237)#225443
kibanamachine merged 4 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-225237

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…g defaultTitle (elastic#225237)

## Summary

Bug description (also the bug video below):
The bug occurred in the Customize Panel Editor, where the
PanelTitle—even when matching the defaultTitle from the central Saved
Object—was not always properly synchronized with that object. This led
to situations where the title was incorrectly stored as a custom
override, breaking the link to the saved object. There were two specific
cases where this happened:

Adding a panel from the library, then opening Customize Panel and
clicking Apply without making changes
After adding a panel from the library, the user opens the Customize
Panel Editor via the settings icon. Without making any changes to the
title, they exit the editor by clicking the Apply button instead of the
close icon. This causes the defaultTitle to be unnecessarily written
into the title field of the API object, which then treats it as a custom
title—breaking future synchronization with the saved object.

Resetting the title to default after a change
The user changes the panel title in the Customize Panel Editor and
clicks Apply. Later, they reopen the editor and click Reset to default.
This correctly restores the title from the central saved object, but it
is again written into the title field of the API object. Although the
value matches the current defaultTitle, it is now treated as custom. If
the central title changes later, the panel title will no longer
update—breaking synchronization again.

Fix:
The logic was updated to correctly detect when the panel title matches
the defaultTitle. In such cases, it clears the title field in the API
(by setting it to undefined) to indicate that the panel should inherit
the title from the saved object. This ensures proper synchronization:
any future updates to the saved object's title will be reflected
automatically in the panel.

Closes elastic#188858

Below the bug video:

https://github.com/user-attachments/assets/f784679c-8eaa-47b4-942d-e3802faee076
(cherry picked from commit cead1a7)
@ThomThomson
Copy link
Contributor

@elasticmachine merge upstream

@kibanamachine kibanamachine merged commit e261d9b into elastic:8.19 Jul 1, 2025
8 checks passed
@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
presentationPanel 95.0KB 95.1KB +138.0B

History

cc @olapawlus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants