Replies: 3 comments 3 replies
-
Regarding My largest concern with baking in the toggle and other interactions is that the new Select will run into the same situation as the previous implementation, which became fragile and difficult to update cleanly as it attempted to handle numerous disparate designs and edge cases. Even for simpler designs, there can still be a wide variety of customization for a toggle that would have to be exposed through properties (placeholder text, badges/chips, clear button, event handlers, etc) which will make the Select component more complicated/weighted. I'm not sure if it would be that much less complex with props than building a toggle, and would be far less flexible. What are you thinking for simple use cases? Single select only? I think it would be ideal to have one place to apply The |
Beta Was this translation helpful? Give feedback.
-
One thought: we could have an extension to offer a more "out of the box functional" Select. We could even have the extension be a toolbox of different selects for the most common use cases to keep each one simpler and hopefully avoid ever getting into another 1,500 line component situation. |
Beta Was this translation helpful? Give feedback.
-
Some of the PF team dug into this conversation a little deeper again today. We discussed a few different possible ways to aid in reducing boilerplate.
Ultimately, PF is not planning to provide abstractions ourselves because of the possible volume of requests and ongoing future maintenance that could create for which we don't have the bandwidth. But we are open to supporting any team as they try to build out PF Selects, Dropdowns or any menu like components! |
Beta Was this translation helpful? Give feedback.
-
In cockpit we decided on an early adoption of PF5 (https://cockpit-project.org/blog/patternfly-v5-alpha.html) and I am coming back here with some feedback.
The topic here will be the new
<Select>
component. All in all I find it a bit unnecessarily complicated as exposed to the consumers. Let's enumerate the parts that could be IMO simplified.SelectOption: right now itemId and children are required properties, otherwise the component will not render. This is asking the user to pass the same value twice for most of the simple cases. Additionally itemId feels like 'id', html dom element identifier. The old property name 'value' is more exact to what this is.
MenuToggle component can be hidden from the consumers in the simple cases at least. Compared to the previous implementation which hided the MenuToggle from the users, now the users of this components need to write much more boilerplate code.
This includes:
Two places to define if the select menu is open:
Three places to control the open state of the component
Let me know if you 're open to re-design this for a better consumer experience.
CC @nicolethoen @tlabaj
Beta Was this translation helpful? Give feedback.
All reactions