houston icon indicating copy to clipboard operation
houston copied to clipboard

Collection2 and possibly AutoForm

Open Sivli-Embir opened this issue 10 years ago • 4 comments

Adding new objects to collections right now is a bit hacky. Looking at the source it looks like your just taking the first object and using its data structure to define the collection schema. While I don't think it should be mandatory it would be nice to manually define the schema.

My thought was you could accept a simple schema object for the schema and possibly use AutoForm to generated your forms.

Regardless it would be nice if you checked if Collection2 is present and used the internal schema for the form. That check would be a very easy if (Package['aldeed:collection2']) {}

Thoughts?

Sivli-Embir avatar Dec 28 '14 19:12 Sivli-Embir

My reason for this and #266 is I want my admin layer to be run completely from Houston if possible. If I could make this work it would simplify a number of my apps. I am happy to help make this a possibility, but if you had other plans I don't want to fork&clash.

Sivli-Embir avatar Dec 28 '14 20:12 Sivli-Embir

Here is a quick example of what I am talking about: https://github.com/Kestanous/houston/tree/autoform

The code would need to be cleaned and I may have broken something by exporting the Houston object to the client.

Sivli-Embir avatar Dec 28 '14 21:12 Sivli-Embir

This would be great, I'm going to try your implementation @Kestanous

benjick avatar Feb 12 '15 07:02 benjick

+1 great idea. I'm using collection2, and having admin using it too would be great.

@Kestanous your branch is not working out of the box. Should I define something to make autoform work?

Kostanos avatar Dec 19 '15 22:12 Kostanos