[8.19] [Embeddable Rebuild] Fix panel title sync with saved object when using defaultTitle (#225237)#225443
Merged
kibanamachine merged 4 commits intoelastic:8.19from Jul 1, 2025
Conversation
…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)
Contributor
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @olapawlus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation