-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] [Discuss] Dimension workflow #38905
Comments
This is pretty similar to what we've talked about, but I'd like to clarify it in using a specific and very limited example. We're not assuming that our dragging is accessible, so to have an accessible way of editing dimensions we need it to be possible to edit a dimension without a prior field selection. So in this example, we are starting with a blank state. Let's assume that we are only allowing aggregations. The user:
Our bar chart should require that the X axis is bucketed by date histogram or terms. So in the field dropdown, I would only expect to see string or date fields. No other fields would ever work on the X axis, so I propose hiding them. Do you agree? Let's say the user selects a string field like "category" as their X axis. Using our suggestions, we would automatically select the "Top Values" function with the default of the Top 5. In the list of other functions, there are no other possible functions- it's not possible to do a date histogram of a string, or to use a numeric function like Cardinality on the X axis. If I understand your proposal correctly, you are proposing that if the user changes their mind after seeing Top 5 Values of Category, there should be clickable options for changing either the field or the function. You are also proposing that there is an invalid state, so that in this example the user would be able to select "Date Histogram" and be shown a warning message saying "Date Histogram only works with date fields, and this is a string field." This could work, but I'm not sure introducing the invalid state improves the UX of this example. Is there another option? This is a really limited example because the only possible selections are Date Histogram or Terms with a small number of fields, but I think we can describe all the possible functions as fitting into one of these four categories: a. Functions that are valid based on the current field and dimension The biggest question that we haven't yet decided on is whether to introduce an invalid state where the function+field+other dimensions combination could be invalid, or whether to prevent users from entering those invalid states. I think the possibilities are:
My preference is for option 3, which you can see in action in #38863 Another question that you've raised is whether to allow users to select a function first. If we supported this, what would users expect the field selector options to be after selecting a function? Normally, the field selector would show all possible fields that can work with that dimension. Would users expect two different behaviors in the field selector based on context? |
✅
✅
This invalid state is what I'm proposing because it tells the user why this field-aggregation combination does not work. By limiting their set based on their field does not inform the user why some option is missing. This is the only option I'm proposing at the moment.
Let's not worry about this case for now
This is what I'm trying to avoid. That's how the POC works and when users had I'm advocating for option 2, you're advocating for option 3. This might be a good one to test with users.
I am not advocating for this. |
Many of our users have hundreds of fields and drop downs that shows all fields will not serve them well, they will have too many options that can be too similar with long field name. In the field panel, we can treat these problems more gracefully allowing users to search, filter and see all the field names, types and possible values. I think we will benefit more by presenting limited number of the most used aggregation based on the field type and the less common/advance aggregations can require an extra click, that way for regular users it is obvious which aggregations go well with their fields and for advance users another click will open more advanced options e.g. pipeline aggregation. Allowing them to change the aggregation after adding the data to an aggregation that doesn't work with the field they already selected creates confusion more than it benefits IMO. Maybe we can start without it and if users want we will introduce it later but it also not such a priority ATM |
I want to make sure we don't lose this, as @cchaos summarized our latest agreement about how this behavior could work:
I think this behavior should be able to solve all of the concerns raised with "magical" switching and with showing too many options. Because there are very few aggregations supported in the initial beta plan, we probably don't need to hide those aggregations. |
I believe we are happy with the current implementation of the dimension editor, and if not then it might be more useful to create a new issue for this. With this understanding I'm closing the issue, if there's disagreement feel free to reopen. |
There have been many conversations around how the configuration panel should handle editing a dimension (field, aggregation, and aggregation options).
Here is my proposal as talked it over a bit with @flash1293
All options in a single popover, with all aggregations available (similar to POC)
Allow users to explore all types of aggregations for the dimension type but simply show an error as to why a selected field does not work with the selected aggregation. Do not automatically change the field to one that is the correct field type. And do not remove options that don't work with the selected field.
Pros:
Cons:
There are essentially 2 ways to create a dimension:
And they are both field-first:
Another way to layout the panel
Would be to put the field selection up top, then the aggregation and options below. However, we lose the 3rd point made in the pros section:
IF (and it's a big IF) we must limit the aggregation list based on field selection
Then we're basically back to the current vis editor UI (swap aggregation and field) where it's a top down approach.
Which doesn't align with the human-readable summary and causes more clicks to change the aggregation and options.
cc @wylieconlon @chrisdavies @AlonaNadler
The text was updated successfully, but these errors were encountered: