appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Feature]: Review the need for `dynamicPropertyPathList` in Widget DSL

Open dvj1988 opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Summary

In a widget DSL the key dynamicPropertyPathList lists the widget properties which have been toggled to the JS mode. Can this be derived from the value set to these properties? The predefined values are usually a boolean or one of the values in a predefined enum. For eg. In a Button widget if the user toggles property buttonVariant to JS mode it is added to the dynamicPropertyPathList. Is it possible to derive this by checking if the value set to the property is equal to 'PRIMARY' | 'SECONDARY' | 'TERTIARY' Non JS Mode Screenshot 2023-05-12 at 12 11 41 PM JS Mode Screenshot 2023-05-12 at 12 12 58 PM

In case of actions we could also evaluate the JS expression to identify if they can be represented in non JS mode. The validation logic seems to be already in place as we use the same to enable and disable the JS mode button. ezgif com-crop (1)

Why should this be worked on?

This could reduce the size of the application DSL and save us the trouble of maintaining a separate value.

dvj1988 avatar May 12 '23 06:05 dvj1988