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

[Lens] Hide the edit panel title for new metric visualizations #148563

Closed
stratoula opened this issue Jan 9, 2023 · 12 comments · Fixed by #149662
Closed

[Lens] Hide the edit panel title for new metric visualizations #148563

stratoula opened this issue Jan 9, 2023 · 12 comments · Fixed by #149662
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@stratoula
Copy link
Contributor

Describe the feature:
The new metric visualization doesn't allow to add a panel title (on purpose for now). We would like to hide this option on the dashboard level as it confused users.

In the future we are going to give the users the option to add a title on the new metric #137770 possibly from the Lens editor but we don't want the users to add a panel title (at least for now).

image

We should discuss with the @elastic/kibana-presentation team ways to make it configurable by the embeddable for this specific chart type.

@stratoula stratoula added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jan 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@stratoula
Copy link
Contributor Author

cc @andrewctate not sure if it was discussed when we were adding the new metric but it seems that it confuses the users so we decided to hide it for now.

@nickpeihl
Copy link
Member

In the future we are going to give the users the option to add a title on the new metric #137770 possibly from the Lens editor but we don't want the users to add a panel title (at least for now).

In this case, would the Lens editor to use the existing title property in the embeddable? I think that would be preferable rather than LensEmbeddable implementing a separate property for the vis title.

With the Unified Panel Options pane we are expecting to move "Edit panel title" into a flyout that allows updating the title, description, and time range (when applicable) with the expectation that any embeddable could have a title and description.

If #137770 was implemented, would we still need the option to hide the "Edit panel title" action from the metric visualization context menu?

@stratoula
Copy link
Contributor Author

@markov00 keep me honest here but I understand that we don't want to show on the metric viz the title of the SO but a title that gives important information for the metric and makes sense to be part of the metric viz.

We haven't figured out the details here but I feel that we might not want to show the panel title or at least the SO title (if it is saved on the library)

I understand that it comes to conflict with the flyout, maybe we need to rediscuss it.

@markov00
Copy link
Member

I think we should make some clear definitions and distinctions:

  • a visualization title: a text that describes the visualization content in a concise and clear way (similar to the title on the first slide of a Presentation or the title an artist give to one of his photo on a gallery)
  • a SO title: is a label given to a SO to be recognizable among other saved objects (similar to a file name of a Presentation, or the filename of the photo)
  • a panel title: an additional label that is applied on top of a panel, that has a general purpose but with a limited usage IMHO if the visualization title will be available
  • a visualization title should never change, or better, it doesn't make sense calling in two different way the same exact chart: the title describes it so if there is no changes in the configuration, the title should remain the same.
  • a SO title can change: it can follow a different semantics to be recognized across others, I can add prefix/suffix, I can have copies of the same visualization with two different SO titles if I have changed the color in one chart.

The two types of titles should not be mixed or the default of the SO title can be derived from the visualization title but not the opposite. It should be clear to the user how to change one or the other.

Within Lens the user shouldn't care much about the SO title. The only important title is the visualization title that is crafted specifically for that visualization, and, as explained above, should never change. I should never have the same visualization with two different titles, in the same way, an artist will never show the same photo giving two different titles.

The same concept of a photo Gallery applies to Dashboard: I want all my visualization with their original title given at design time in Lens. I can't find a good use case for showing a different title just because I'm using a different dashboard.
The only edge case I can think of is when I want to rephrase or hide the title to be even more concise because my chart is placed in a very narrow space.

Embedding a visualization: the same example of the photo gallery applies, the visualization title should not change except for the edge case highlighted before.

In my mind, I don't see an Edit panel title option, but I see more of an Edit visualization title: a specific quick-action that can be done at a dashboard level (or wherever it is made available) that can change the visualization title (within viz) for that specific instance (the new title only applies to that instance and doesn't alter the original visualization title).
If a table, a video, or something else needs a title, I think those embedded elements should bring their own implementation of title and expose it to the panel. The panel title is instead an additional construct on top of the embedded content and should probably be used with care only in specific cases because is a general style that doesn't apply well to all the application designs.

The description is instead a piece of metadata attached to the visualization or panel.
In some cases, it could be part of the visualization too like in this example below, or can be exposed in a different way, like a tooltip/flyout. I think it really depends on how you want to use such text: a description can be also placed on an additional panel in a dashboard aside of the visualization or above.
image

A few more notes about the panel title:

  • if we change the subject of the panel from a Visualization to a Markdown what is the scope of the panel title? A title has usually a larger font size than the subsequent content but, in this case, is not. I will use Markdown to add a header for my text and I will remove completely the panel title from my dashboard.
  • I'm expecting a near future where the title is dynamic, like the TSVB markdown where, for example, the time bucket specific changes accordingly to the time window like: from Hourly document counts for 1h buckets to Weekly document counts for 1w buckets. The same can be if we apply chart colors to the title text like in the example above.
    This could help reducing the wasted space used by the Legend moving its functionality to the title

Screenshot 2023-01-10 at 12 13 06

@drewdaemon
Copy link
Contributor

@stratoula

not sure if it was discussed when we were adding the new metric but it seems that it confuses the users so we decided to hide it for now.

It was noticed, but left in there since we expected that panel title to be shown inside the visualization once #137770 was complete. We were not drawing any distinctions like @markov00 has outlined.

If it's easier than just completing #137770, or if we are accepting @markov00 's proposal to make the visualization title a different thing than the panel title, it probably makes sense to hide that menu option.

@nickpeihl
Copy link
Member

Thanks for the detailed clarifications @markov00. With respect to titles, do you also see a breakdown for descriptions, ex. SO description, visualization description, and panel description?

@ThomThomson
Copy link
Contributor

@markov00, I very much like your distinction between the SO Title and Visualization title, but I wanted to clarify that there isn't really any such thing as a panel title as you describe it at the moment. While it's true that the same by reference visualization can have different titles on different dashboards, this is just a historical quirk relating to how the titles are stored.

The panel title is very much mis-named, and would be better understood as the visualization title because it is stored in the input like everything else that defines the visualization itself. If it's useful, we can look into renaming that to avoid this confusion - we could potentially remove the word panel and just call it title @KOTungseth FYI.

If at all possible, I would propose moving forward with adding the title to metric vis as is, using the existing title infrastructure. On the Presentation team side, we're considering shifting the embeddables system towards a more flexible method-call / interface based approach. Once we do that, it will be straightforward to change how any embeddable type or sub-type handles its titling.

@stratoula
Copy link
Contributor Author

I like all the ideas here, my only concern is that having this panel title menu on the new metric while it doesn't do anything creates some confusion to the users (and support engineers) as they report it as bug. It is on technical preview and it is fine but I see 2 paths here:

  • hide it for now to not create confusion (or maybe this is not easy with the current architecture?)
  • if we say that we leave it as it is until we deliver this [Lens] Support metric vis title #137770 (new metric will be in technical preview until then) then how the panel title will work with the new metric title? Because if this is saved on the library it defaults to the SO title which I feel should not be shown on the metric viz.

@markov00
Copy link
Member

Thanks for the detailed clarifications @markov00. With respect to titles, do you also see a breakdown for descriptions, ex. SO description, visualization description, and panel description?

@nickpeihl I see a visualization description but I have doubts about what an SO or panel description could be, what do they bring more than the visualization description? Bringing back the photo example, I don't see the need of describing a file, if the file itself have an internal description that specify what it represent. In the same example, I don't see why the "frame" of the photo needs a description, if the photo itself has a description.

I wanted to clarify that there isn't really any such thing as a panel title as you describe it at the moment. While it's true that the same by reference visualization can have different titles on different dashboards, this is just a historical quirk relating to how the titles are stored.

Thanks @ThomThomson definitely I prefer not to have an additional title over the visualization title. Due to the abstract nature of the Panel, I was considering that as a different title, attached to the panel frame and the internal rendering can render anything, and a title too. If that concept doesn't exist I'm happy to merge those ideas together in the visualization title: if the rendering has a title capability then we use the rendered one, if not the panel can render it on the frame

@stratoula we have already the metric title design from @gvnmagni, so adding it is relatively quick. Let's quickly chat together about what to show by default reusing the "panel title" feature of the embeddable.

@ThomThomson
Copy link
Contributor

@markov00, yes that ability does exist! You can read the title from the input, and render it internally instead, turning the panel title off with selfStyledEmbeddable.

@stratoula, out of the two, I'd prefer looking into the second potential plan for the time being. I am pretty sure there is a way currently without any changes to the underlying architecture, to show only the Vis title in metric panel, without having to deal with the saved object title.

@stratoula
Copy link
Contributor Author

Yes, we are happy with it too Devon, as long as it doesnt confuse the users!

@stratoula stratoula added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Jan 16, 2023
stratoula added a commit that referenced this issue Jan 27, 2023
## Summary

Closes #148563

After this [PR](
#148301) being merged, it will be
easier to add the description info icon and the custom data range to the
new metric. For this reason we decided to also allow the panel title for
now.

On the next minors we are going to hide it from the panel and display
all the aforementioned info on the viz title.
<img width="988" alt="image"
src="https://user-images.githubusercontent.com/17003240/215037834-0f556673-8628-484e-aa32-c34188fc7064.png">

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this issue Feb 6, 2023
## Summary

Closes elastic#148563

After this [PR](
elastic#148301) being merged, it will be
easier to add the description info icon and the custom data range to the
new metric. For this reason we decided to also allow the panel title for
now.

On the next minors we are going to hide it from the panel and display
all the aforementioned info on the viz title.
<img width="988" alt="image"
src="https://user-images.githubusercontent.com/17003240/215037834-0f556673-8628-484e-aa32-c34188fc7064.png">

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants