-
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
Truncate long field names in filter editor #13379
Conversation
@cjcenizal It looks like, although this fixes the error, we now don't have the benefit of having the params field/text input expanding to fill up space unused by the field select. Can you think of some way to get the best of both worlds? |
@lukasolson What's the params field/text input? What do you mean by "space unused by the field select"? |
@cjcenizal Sorry for the confusion. Looking at the screenshots in the description, there are three inputs. From left to right, they are the "field" input, "operator" input, and "params" input. I'm not sure if you remember, but you suggested that we add some styles so that the params input could expand to fill up any extra space that wasn't being used by the field and operator inputs. The problem now is that if the value for the field input is really big, the operator and params inputs flow outside the container. This PR updates these styles such that, even if the field input is really big, they don't overflow off outside the container. However, it has the downside that both the field input and params input have the Here are some screenshots of what I'm talking about... Before this PR: After this PR: I'm wondering if there is some way we can get the best of both worlds, where we wouldn't expect to see any overflow (even if both the field and params input were extremely long) but such that the params inputs get as much space as possible. Thoughts? |
@lukasolson Ahhh, I see! I think you can solve this problem by removing .filterEditorFieldInput {
flex: 0 1 auto;
} This will cause it to shrink and expand to fit its content, instead of expanding to try to take up as much space as possible. On a separate note, I found a weird bug when the "operator" input is set to "is one of", where the "params" input gets squished: You can solve this with another custom class: .fieldEditorOperatorInput {
min-width: 100px;
} You might need to remove |
@cjcenizal Thanks! I've made the updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛸ LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Truncate long field names in filter editor * Update filter editor styles
* Truncate long field names in filter editor * Update filter editor styles
* Truncate long field names in filter editor * Update filter editor styles
* Truncate long field names in filter editor * Update filter editor styles
Fixes #13365.
This PR adds an additional class to the field selector in the filter editor that properly truncates (with an ellipsis) it when it is too long.
Before:
After: