[Time to Visualize] Panel Title Fixes#78365
Conversation
|
Yeah, I was messing around with that, and found that if you were choosing to add a panel title, you wouldn't want the 'show panel title' switch to be off, because that just adds an extra click. It's an easy enough behaviour to change though if people feel strongly either way! |
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
ryankeairns
left a comment
There was a problem hiding this comment.
Looks and works as expected; addresses my outstanding questions from the other PR.
Thanks!!
|
|
||
| .embPanel__placeholderTitleText { | ||
| @include euiTextTruncate; | ||
| font-weight: lighter; |
There was a problem hiding this comment.
Please always use an EUI variable for font weight. It ensures that the correct font variant is available.
| font-weight: lighter; | |
| font-weight: $euiFontWeightRegular; |
There was a problem hiding this comment.
Makes sense, I've used $euiFontWeightLight for this.
b30badb to
9d045d2
Compare
|
Turns out the book embeddable was just missing the |
💚 Build SucceededMetrics [docs]page load bundle size
History
To update your PR or re-run it, just comment with: |
* [Dashboard][Embeddable] Add placeholder title to embeddable panel, stored 'show panel title' prop in embeddable input. Co-authored-by: Maja Grubic <maja.grubic@elastic.co>



Summary
This PR contains 3 small changes to the way embeddable panel titles work.
1. Placeholder Title
In a continuation of #74960, embeddable panels render a placeholder title when all of the following conditions are met:
Open Question: Should manually setting the panel title to a blank string be a valid input? Currently it is considered valid, and results in showing the placeholder title. Another option is having a blank string title fall back on the default title, which means that the placeholder title will only appear on by value embeddables because they are the only ones with no default title.
2. Show Panel Title State Storage
Fixes #77862
Previously, the setting of the show panel switch on the customize panel modal was encoded in the title itself. The value of an empty string was interpreted as meaning 'hide the panel title'.
This PR stores the setting in an existing & unused embeddable input prop:
hidePanelTitles. This change means that any custom panel titles are no longer lost when flipping the 'show panel title' switch3. Text Input Value
Previously, when there was no title present, the default title (saved object title) would be populated into the placeholder prop of the title input. This was frustrating because making a small change to the title would result in the user having to retype the full title from scratch. Now loading with a default title, and resetting to the default title put it directly into the value prop of the input so it can be edited as is.
Checklist
Delete any items that are not applicable to this PR.
For maintainers