When using the VS Code extension to create data models, I found a few things that we should improve:
- In the
Data section, when you create new models, they should be persistent by default. If we have just one data source, we don't have to ask. If there are more than one data source, we should ask which one to use.
- When I try to execute an operation over a node but I don't have that file open, it is triggering an error. For example, I'm looking at the file
index.ts and I right-click on Project and execute Add field. I see an error saying it is not a model file. I have to open the Project.ts file to be able to execute Add field. I'm noticing the same error when the class extends from PersistentModel or PersistentComponentModel. We should allow all operations if at some point in the hierarchy we have BaseModel, because developers might add their own chain of hierarchy.
- I see that we are not understanding
@Composition() as the same as @Relationship({type:'composition'}) because it is not nesting the model inside the parent model.
- There are some types available in the VS Code extension that do not exist in the framework yet. For example, I was able to use
LongText which doesn't exist yet and so it was giving me an error. Let's sync the types in the VS Code extension with what we have in the framework. Ideally, we should be able to read the types from the framework.
- For the names of the fields in the tree, I would use the name as it is, without trying to make them nicer. For example, instead of
Title show just title.
- When your provide docs for a model, it is adding those docs as comments while we have the docs property in the Model decorator. We should put the information there. The same for docs in fields.
- When creating a new model, if you provide information about fields that need to be process by AI, we should automatically execute the agent without asking for user confirmation.
- Some fields might require more details than just the name and type. For example, choice fields need to ask you for the possible values and create an enumeration. We need to improve it, making sure that each field type is asking for the minimum information to create it.
- If we don't have to set any properties for the Field decorator, leave it without parameters. This is, it should be Field() instead of Field({}) .
- When you create an HTML field, it is trying to import the decorator Html but it
- When creating a new relationship field, we should use the decorators Reference and Composition whenever possible instead of Relationship.
When using the VS Code extension to create data models, I found a few things that we should improve:
Datasection, when you create new models, they should be persistent by default. If we have just one data source, we don't have to ask. If there are more than one data source, we should ask which one to use.index.tsand I right-click onProjectand executeAdd field. I see an error saying it is not a model file. I have to open theProject.tsfile to be able to executeAdd field. I'm noticing the same error when the class extends fromPersistentModelorPersistentComponentModel. We should allow all operations if at some point in the hierarchy we haveBaseModel, because developers might add their own chain of hierarchy.@Composition()as the same as@Relationship({type:'composition'})because it is not nesting the model inside the parent model.LongTextwhich doesn't exist yet and so it was giving me an error. Let's sync the types in the VS Code extension with what we have in the framework. Ideally, we should be able to read the types from the framework.Titleshow justtitle.