I understand your needs, and it would be great for your usercase yes. But a property is not typed. So what if you can both have null and an array/object inside the property ? The UI displayed will depends of what value is currently inside your variable while you’re editing it.
In WeWeb we are working with a static structure and typed variable because it help us to provide a maximum value around it.
So your question is not that unrelated with the thread, it still about working with dynamic structure inside WeWeb.
The issue with dynamic structure is it depends of the runtime execution where everything can happen and your app can be in a whole different state from the one it was when you edited it, because you’re editing things in a static state of your app.
Only you know about the different possibilities you have in mind with your dynamic structure. By putting dynamic JSON and getting ride of using the editor to define your structure you also do WeWeb “blind” about your project.
This is why making a reusable component yourself with with a :is prop and building your rendering logic inside the reusable component (by putting every possible component inside with a rendering condition on every component) feel more the right way to works with WeWeb atm, it ensure you made WeWeb know about what can happen.
This is why I tend to suggest custom code when you’re working with dynamic data structure, because you can handle the dynamic part yourself in the code.
It’s the same for the supabase suggestion you made about binding the table. Once you bind the table how WeWeb know the fields you should be able to configure as everything become possible ?
If we are doing a supabase action where you bind the table and the payload, the value provided by the UI may be not worth enough versus using a custom js action where you call the sdk yourself for exemple.
What I mean is, the more blind WeWeb is about what you want to do and the less it will be able to provide a relevant UI to manage your stuff.
And it’s not a WeWeb thing, To me it’s a general conceptual problem, a huge UI/UX challenge and it will always require balance to put the cursor in the right place, to not make the UI too much complex/clunky but still be able to manage complex stuff. For now our response is, when things become too complex, you can still fallback to code.
As things cannot be represented in a UI the same way they are represented in code, you will always have to think different once you reach a certain point in term of complexity (to achieve the same thing with an UI and with code). We are still trying to push the limit as far as we can, but we have to carefully evaluate the tradeoff for every new step we make
I can give you a simple example, the components variables can exist or not depending of the state of your app, if the component is not rendered, the variable doesn’t exist, so if your component is inside a modal and the modal is not opened, the variable does not exist, a lot of people find this situation confusing. They will try to bind the variable in a workflow, and the workflow will allow it, even if he will be executed only in a situation where the variable doesn’t exist. Because we can’t know what the person will happen in his app.
To me, it’s not a WeWeb limit, it’s the limit of using an UI to build web app as a concept itself, not a purely technical limitation. But yeah, trying to figure out a way to continue to push the limit and yet keep it manageable by most of people is our daily life, the main goal of this company! haha
Hope it make sense!
Note: I just wanted to share my thoughts with you as it’s a subject I also have in mind frequently, still trying to figure out what we can do about it