-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Dimensions with empty names are difficult to edit #151271
Comments
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations) |
I agree with this as a general enhancement, but I also think it points to a deeper problem which is that we don't allow folks to hide the metric subtitle in a breakdown situation. This particular case should be alleviated by #137770 |
I had a look at this problem, from a general prospective, and explored few "simple" solutions. The proposed ideas will work for any title string that once trimmed will result in a empty string ( First ideaFill the dimension button of whitespaces to make most of the area clickable
I've experimented with several unicode ways to render whitespaces but didn't find anything better than a regular white space. Second ideaUse an alternative title for the specific case.
Of course in both cases the choice of |
I like the second idea! :) |
PR with the second proposal implementation available here: #154368 |
@markov00: Forgive my confusion, but could you elaborate on why you are supplying a single space for the dimension name? What is the case for it being preferable to have dimension items with no name? Based on how Lens currently operates, if the dimension name input is cleared, it reverts back to using the auto-generated name. If there isn't a very compelling reason to allow unnamed dimension items, my first instinct would be to simply treat the name input with only space values as if it were empty (i.e. revert back to the auto-generated name). Alternatively, if there is indeed a compelling reason to allow unnamed dimension items, and we want to support this hacky workaround of inserting a space character as the dimension name, I prefer @dej611's second idea of supplying an "Untitled" string. However, this begs the question as to whether we should even bother making the dimension name input required (if we're going to allow people to circumvent it like this). With that in mind, should we make the dimension name input optional and show the "Untitled" string in situations where the input was empty or filled with space characters. If so, we'd also have to consider whether we need to provide users with the ability to restore the auto-generated dimension names. Thoughts? |
I agree with @MichaelMarcialis 's general sentiment. Is hiding the subtitle for multi-metric visualizations the only place these empty dimensions are coming up? If so, maybe we just need to fix that specific case and close this back door by following @MichaelMarcialis 's suggestion
As I said above, I assumed #137770 would take care of the metric subtitle question. However, if we are not sure about moving the title into the visualization anymore, maybe we need a new solution to the metric subtitle question. |
@MichaelMarcialis in this case for example, if I'm using a panel in a dashboard with a title like: To achieve the desired result, today I can only use the There is another possible way to fix this by providing an option to hide the subtitle or other title like in the axes for example. |
@markov00: Thanks for that explanation. I understand now, and I like your alternative idea of providing users with an option to hide subtitles. Since it's an option that extends across multiple dimensions (primary metric and breakdown in this case) and is applied across the entire visualization, it probably would make sense to have an option added for it in the toolbar area above the visualization, like we do for other visualization types. In doing so, we could also prevent the dimension name inputs from accepting and using a space character (and instead restore the auto-generated name). Thoughts? |
Yes this seems as a good solution to me Michael. I am changing this to enhancement, I will add it to 8.9. |
This is not the first time I see this bug coming up, before the new metric. I think it was a way to keep the axis padding on the chart without providing a title to it. While having a new metric solution would fix @markov00 's case, it would be nice to provide a general solution also for other visualization types.
I think it kind of make sense to have the auto-generated name on both cases, but still not 100% it's the same thing. |
Another use case to have an empty dimension label is when using the "Split metrics by" table dimension. |
…4368) ## Summary Fixes #151271 This PR is a proposal to provide a fallback title in case the user decides to provide an empty value for dimensions title. <img width="1230" alt="Screenshot 2023-06-14 at 12 05 46" src="https://github.com/elastic/kibana/assets/924948/521d00db-4c1e-4aff-a142-086fa3456884"> <img width="1238" alt="Screenshot 2023-06-14 at 12 05 35" src="https://github.com/elastic/kibana/assets/924948/9a272fac-02e6-4585-81d1-5e0b2686eaf1"> Note that this applies only to the presentation of the dimension button, but the title remains as empty space in the configuration itself. Tests added with testing-library. ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Kibana version:
8.7.0
Describe the bug:
I've discovered that issue mainly working with the new Metric visualization, where I want a bit more controls of what is rendered on the chart. When, for example, I'm creating a small multiple of metrics but I don't want to render multiple time the same primary metric text on each metric, I usually insert a simple space as the
name
of the primary metric.This creates the following problems:
Screen.Recording.2023-02-15.at.12.11.55.mov
Screen.Recording.2023-02-15.at.12.13.01.mov
Steps to reproduce:
Expected behavior:
I probably expect that the button still is clickable with ease even if the name is short or empty. The same for the keyboard focus.
The text was updated successfully, but these errors were encountered: