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] Custom interval appends "per <unit>" post fix to datatable header title #98054

Closed
Tracked by #184459
dej611 opened this issue Apr 22, 2021 · 10 comments
Closed
Tracked by #184459
Labels
enhancement New value added to drive a business result Feature:Lens good first issue low hanging fruit 🧊 iceboxed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@dej611
Copy link
Contributor

dej611 commented Apr 22, 2021

Describe the bug:

When using a date histogram on a Lens datatable, if the custom interval feature is enabled, it will append a post fix "per day/hour/minute/etc..." to the table dimension title

Steps to reproduce:

  1. Select table as visualization in Lens
  2. Drop any metric to the Metrics area
  3. Drop a time field to the Rows area
  4. Configure the time dimension to use a custom interval, i.e. 1 day
  5. Notice the title of the time dimension becoming "X per day"

Expected behavior:

The Display name field should be first updated with the postfix, and the user should be able to customize it.

Screenshots (if relevant):
Screenshot 2021-04-22 at 18 27 19

@dej611 dej611 added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Apr 22, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@wylieconlon
Copy link
Contributor

We probably need to have a toggle for whether to apply the per <unit> suffix or not. I don't want the suffix to be part of the label because it the suffix changes every time the chart is rendered.

Not blocked by, but related to #84419

@flash1293
Copy link
Contributor

A toggle sounds good, but I'm concerned about the config flyout getting too busy. @MichaelMarcialis do you think an accordion like for top values would be the right answer here?

@MichaelMarcialis
Copy link
Contributor

A toggle sounds good, but I'm concerned about the config flyout getting too busy. @MichaelMarcialis do you think an accordion like for top values would be the right answer here?

@flash1293: I agree with your concerns about making the interface busier for such a small issue.

Rather than adding a new toggle to determine whether to apply the suffix, could we not just apply the suffix (and also show it in the "Display name" field) by default when a configuration is being auto-named? Then, if a user chooses to customize the "Display name", there is no application of any suffix, as the user has opted to no longer rely on auto-naming. Thoughts?

@wylieconlon
Copy link
Contributor

@MichaelMarcialis I'm not sure it's accurate to say that a user who has changed the label is opting out of the suffix. For example, the default Count of records is kind of long. I might want to say Count, but still use the suffix so it's Count per 3 hours or Count per 12 hours depending. So I think we actually have 3 states that are desirable for users:

  1. Default label with suffix automatically added
  2. Custom label with suffix automatically added
  3. Custom label without suffix

The auto-suffix is important because it's the only way we communicate the interval to the user. Sometimes the interval matches what they configured, but Lens rewrites the interval if it's too small. So for example you might request a metric at a 5 second interval, but Lens might rewrite it to 60 seconds.

@MichaelMarcialis
Copy link
Contributor

Thanks for those details, @wylieconlon. So in your example, just because the user requests a certain interval doesn't necessarily mean that's the interval that Lens will display, hence the need for the suffix to remain dynamic (even after a potential change the the display name). Is my understanding correct?

If so, that's interesting. I wasn't aware that was the case. Given that information, I would be inclined to agree with you that an EuiSwitch control to apply or omit automatic suffixing makes sense.

@flash1293, as for your placement comment above, do you mean placing such a switch inside the advanced settings accordion? My primary concern with that approach is that it would cause the switch to appear both before and apart from the "Display name" field. Since this option directly affects the display name output, I'd be more inclined to place it as a field immediately after "Display name".

@flash1293
Copy link
Contributor

your placement comment above, do you mean placing such a switch inside the advanced settings accordion

Yeah, that would be weird as well. I think we can put one other switch in there - it will only be visible for date histogram.

@dej611
Copy link
Contributor Author

dej611 commented Apr 28, 2021

Maybe it's a bad pattern, but I'll try: what about a checkbox within an append on the Display name input? Something like:

Display name: | Count of records |[ ] add unit |

@MichaelMarcialis
Copy link
Contributor

Maybe it's a bad pattern, but I'll try: what about a checkbox within an append on the Display name input? Something like:

Since Lens automatically applies configuration changes to the visualization, I'd suggest an EuiSwitch over an EuiCheckbox, as switches indicate immediate change. I also worry that placing this control in an append to the "Display name" field may look a bit odd and eat into a lot of that field's available space. I think immediately below would be nice.

@flash1293 flash1293 added the good first issue low hanging fruit label Jun 30, 2021
@stratoula stratoula added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Feb 15, 2023
@markov00
Copy link
Member

markov00 commented Jun 4, 2024

In order to provide better transparency of priorities, issues that will not be prioritized within the next 24 months are being closed.

Tracking request in Lens general improvements ice box #184459

@markov00 markov00 closed this as completed Jun 4, 2024
@markov00 markov00 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
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 good first issue low hanging fruit 🧊 iceboxed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

7 participants