Ideaboard: Plugin elements' states accessible in Styles

Hello plugin users and developers!

I have developed numerous of visual element plugins, but I am always frustrated by the fact that the exposed states of these elements are not accessible in the element styles.

For example, for a plugin’s “button icon” element, I add a custom exposed state “is clickable,” but I can’t define visual changes with conditionals in style, only on individual element properties.

The same applies to an “is disabled”, “is focused”, “checked”, exposed state of plugins input… etc. Many elements need visual property changes depending on certain state values.

I know that many plugins are developed with these “conditionals” directly as properties, so you can change that in styles. However, I think being able to do that with conditionals, like native elements, could be a much better and more flexible practice.

In this above example, users can only change opacity, not other properties like colors, border properties, etc. Managing appearance with a conditional “when button isn’t clickable” would be much more flexible and more coherent because all native elements are managed that way.

I think the custom exposed states in the plugin editor should have an “in style” checkbox, exactly like element custom properties fields. When checked, the exposed states should be accessible in style conditionals.

I didn’t find anything on the forum or ideaboard. I contacted Bubble about that, and they explained that it was a good idea, but not their priority, and that i should create a new suggestion on ideaboard.

So here is the idea:

Bubble Ideaboard - Plugin element states accessible on Styles page

If you think that it could be a better way to manage styling for plugin elements, don’t hesitate to upvote!

8 Likes

Hey @fede.bubble any news or plans about this since Bubble is working on the mobile plugin editor?

I also came across the same considerations as @thomas.mey had.

I think for input-type elements, these states (is focused, isn’t focused, is hovered, isn’t hovered, is clickable, etc.) should already be exposed by default, or at least have an option to select which ones we want to expose, but leaving us to handle with the code to trigger them. This would make everything more flexible, specially styles.

Another benefit that could also be included is the binding of the “This input should not be empty” property to any action that uses the input value. Currently, this binding isn’t possible between input-type plugins and actions that save or update data. Even the Multi Dropdown plugin maintained by Bubble doesn’t have this connection forcing us to control these cases with additional conditionals.

Hey @fede.bubble, please, let us know about “this input should not be empty” property that we need to add on plugin. It’s very important on web, but, on mobile app it’s crucial.