betodealmeida commented on PR #38376:
URL: https://github.com/apache/superset/pull/38376#issuecomment-4035422404

   I think we all agree that extensions should be easy to write. Right now, to 
add a new semantic layer, you only need 3 classes:
   
   1. A semantic layer
   2. A semantic view
   3. A Pydantic schema for the configuration
   
   The person writing 1 an 2 will probably be familiar with 3. They don't need 
to know Javascript, React, CSS; all they need to know is the parameters needed 
to configure the SL/SV and their types. The UI is built for them declaratively, 
and if later they want to modify the configuration form to add a new variable, 
they just need to add it to one single place — the Pydantic schema. No need to 
update the GET response schema, the frontend client that fetches the data, the 
React component that renders the form, the POST request schema, the SQLAlchemy 
model, the database schema.
   
   I like @villebro's idea that we should try to find common patterns them for 
forms, and try to make it so most of the forms can be made just with Pydantic + 
jsonforms. It's a huge win for new developers, and if we can get 95% of the use 
cases covered with this flow we have very little code to maintain, and code 
that is easily maintanable.
   
   But I do expect cases where we might want pixel perfect forms, or very 
complex interactions that are hard to define declaratively. For those cases the 
extensions could expose a custom React component — I'm not sure if using the 
existing `view` contribution is better, or if we need to define a new `form` 
contribution, since I'm not familiar with extensions yet.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to