After testing it for a bit, I have a suggestion for a quick way to implement Component Variants:
It would be great to have a Select Field that we could set as Component property. This way we could then for example define Options like “Variant A”, “Variant B”, etc.
Then there would need to be an option under the Conditions for each element inside of the component that’s connectable to the select property. That way, we could just duplicate the component content for each desired state/variant and have its display condition be dependent on the chosen select option.
I tried to do something like this with the state components already are, but to no avail. Under the display conditions, I was able to select dynamic data and as property I was able to connect it with a component text field. Set it to “==” and then set the value to “First”. But when I placed the component and filled the property with “First”, that didn’t work.
yeah, conditions in current state don’t work with properties, and we have a bug report opened about this.
So, basically, once this is fixed, it’s actually working like you intended, right?
well making the conditions working with properties in general, would solve at least 75%.
But to make it easier for editors to for example place a component for a section and then just choose an option to have a light or dark background (just an over-simplified example), we would need to have a select field as property where the editor can choose “light” or “dark” and then the content inside of the component (two sections with different background-colors and classes) that has the display condition connected to their fitting select-property option, would be displayed.
That would basically be a good workaround for an official implementation of variants (like they are working in figma components).
@Matej could you give a very rough estimate as to which (if any) of the many improvement suggestions here in the forum regarding components will make it into the official Bricks 2.0 release?
I can’t say for sure what will be or what will not be included, but from what I see, many reported bugs/issues are already fixed in development and some ideas are already integrated.
We do review each idea you guys post, so keep them coming And the same for bugs