Enhance the Text-Input Group to place chips beneath the toolbar. #5511
Replies: 0 comments 11 replies
-
cc @mmenestr Let's discuss. |
Beta Was this translation helpful? Give feedback.
-
@arburka Thanks for filing this issue. Everything you say here definitely makes sense. The current Attribute-value filter demo under text-input-group is just one example, but not necessarily the best approach in all cases. @mmenestr is currently working on an issue to clarify our filter guidance (patternfly/patternfly-design#1045) so we will include this into the mix. |
Beta Was this translation helpful? Give feedback.
-
@mcarrano is this more simply solved by using a Text input group as the search input on a Toolbar? The toolbar can render the applied filters as chips already? |
Beta Was this translation helpful? Give feedback.
-
Yes, I think so. There's no reason this can't be built today with existing components. |
Beta Was this translation helpful? Give feedback.
-
That would be exciting! So we think that we can use the current control and change where the chips are rendered with the existing control? |
Beta Was this translation helpful? Give feedback.
-
I think we could wire up a toolbar -such as in this example - with a text input group instead of the multiple dropdowns. Then, instead of the text input group displaying attribute-value pairs as chips in the text input group, it could render them in the chip groups that the toolbar builds. I could try writing up a quick POC tomorrow. |
Beta Was this translation helpful? Give feedback.
-
@mcarrano I played with it some, and I do think the current implementation of Toolbar does limit us a little bit. We would need to make an update to the react implementation (and possibly the core implementation). Right now, you need to have a separate control for each category/chip group. So having multiple chip groups associated with the same control will complicate the component. The thing that makes the Toolbar so complicated, is the way that it builds its responsive view. It dynamically builds its expandable form at smaller screen widths. it is only able to do that by enforcing some rules like 1 control = 1 chip group. It would take some refactoring to allow this, but with more and more products wanting to use text input groups with attribute/value searches, it is probably an unavoidable enhancement we need to make. It may will be a complex effort to avoid breaking changes. |
Beta Was this translation helpful? Give feedback.
-
Thanks @nicolethoen I will add this to the roadmap then. I agree this is something that consumers will likely want to do. Do you think this needs to start in core? |
Beta Was this translation helpful? Give feedback.
-
possibly - it may be hard to know until we start evaluating exactly the changes we will need to make to enable this. |
Beta Was this translation helpful? Give feedback.
-
I am going to transfer this issue to React to get it into a future milestone. Sounds like the solution will be to create a React demo that shows this. If core refactoring is needed, we can open a core issue at that time. |
Beta Was this translation helpful? Give feedback.
-
Currently, a Toolbar is wired so that each It's possible this is not feasible to simply refactor the toolbar to accommodate this request without introducing breaking changes. But it may be possible to expose the various pieces of a toolbar to allow this variant to be built composably. |
Beta Was this translation helpful? Give feedback.
-
In Fleet Management, we plan to expand what inventory can be filtered to include Insights Facts and use the text-input group as our filtering component.
Using the text-input group to filter views allows for faster filtering, can be completed without going back and forth from keyboard to mouse, and can handle more attributes to filter on than the existing name-attribute filter.
When mocking up the flows, we came across a few concerns with keeping the chips inside the input. So, we request that the component be enhanced to allow the filter chips to save below the toolbar (similar to other filters) or save them inside the input (the current way the text-input group works.)
Reasons!
Mockups:
Exploration of chips "Outside" for Fleet
Exploration of chips "Inside" for Fleet
Beta Was this translation helpful? Give feedback.
All reactions