Open iainkirkpatrick opened 6 years ago
maybe still have a CLI arg or something to generate blank components / containers if desired when using createTopic
or createType
?
@iainkirkpatrik —blank as a flag?
@iainkirkpatrick Are you thinking of basing the crud pages on a data structure representing a table or the return from a getter?
It would be cool to do both :)
Also are you thinking of using typescript interfaces, yaml, json schema or something else for documenting the data shape?
@agentlewis the return from a getter makes sense to me (if i'm interpreting you correctly) - i'm imagining though, at least as a first pass, that generating CRUD pages for a topic is based on a super simple default table - just 'id' and 'name'. i.e. the generator creates a migration for a table with those columns, a getter for state, and the pages associated with CRUD (list view, single item view). once those have been generated, the user can always go and edit the migration and the getter.
and then as a second pass perhaps there is some flag / prompt to allow passing a schema definition to generate the table off of - and yeah, haven't thought too much about what format that could be - perhaps json schema?
instead of blank components / containers, instead create CRUD functionality per topic when scaffolding as this will be more generally useful for our real apps.
this might involve multiple components per topic, or maybe not - depends on the UX we decide.