mike-marcacci / angular-schema-form-builder

A user interface for building definitions for angular-schema-form
MIT License
13 stars 3 forks source link

Discussion #2

Open nicklasb opened 9 years ago

nicklasb commented 9 years ago

Great!! I think this is a good start. At least I don't see why it would be wrong with this layout, at least as a prototypical starting point. I suppose that the preview would be in another area to the right of the inspector?

mike-marcacci commented 9 years ago

Hey @nicklasb, thanks – ya, super elementary in design right now, but should be effective for now! My idea was to have the pallete on the left, the preview in the middle, and inspector on the right. (I have an image in the readme file, but I hear Gitub doesn't always render SVGs in its markdown).

___________________________________________________
|             |                     |             |
|             |                     |             |
|             |                     |             |
|   pallete   |       preview       |  inspector  |
|             |                     |             |
|             |                     |             |
|_____________|_____________________|_____________|
nicklasb commented 9 years ago

Aha, no it actually looks like that in the readme, it was me who misunderstood. But I don't get it totally. You mean that the preview is the design area?

mike-marcacci commented 9 years ago

Yep – if you check out the source code I've already been playing around using Angular's decorators (very different thing from schema-form decorators) to extend the actual form items to support drag/drop, etc. This way, the builder automatically works with any custom form types, and lets schema-form handle all the rendering. In a way it's a what-you-see-is-what-you-get form editor, obsoleting the need for a separate preview pane.

I like your name for it better though – the "design" section. Makes way more sense. Your thoughts on this?

nicklasb commented 9 years ago

Aha, yeah, that a pretty nice concept.

BTW, I have this idea on reporting that may be a kind of mutually beneficial thing: https://github.com/Textalk/angular-schema-form/issues/341

I would agree with you about my name. :-) But seriously, yeah, that is the name one usually call that section in these applications.

nicklasb commented 9 years ago

I don't know if you saw my small pull request?

Anyway, this is basically generating form data, which like JSON schema is JSON. So I was thinking that it could go one step further and also design the schema here.

Perhaps not in the first version, but later on. An that one perhaps could have that in mind now, to be able to use a similar interface?

nicklasb commented 9 years ago

I mean, it would be great to be able to do what is in the example, but with a GUI.

mike-marcacci commented 9 years ago

Thanks! I actually had missed it. I completely agree – designing both the form and the schema probably represents a super common use case.

However, I feel like schema-form provides an amazing amount of power by separating the schema and form definition, so I figured that's where I'd start. Definitely an important second step.

nicklasb commented 9 years ago

I agree.

My thought is just that one perhaps could consider the second step when taking the first, to be able to basically use the same code, as both generate JSON from a predetermined set of possible components.

nicklasb commented 9 years ago

Oh, I saw that the commit message became what I wrote in the proposal, hadn't made a change directly in the GUI (had some inexplicable GIT-problems) before. I usually use imperative mood, as people do.

marcussaad commented 9 years ago

Hey, been following schema-form and schema-form-builder. I'm strongly interested on this project and very likely will add support for some customized components I may need in a project (will push back if you guys want it :) ). Do you guys have any idea of when this component will be usable? Looking forward to it!

mike-marcacci commented 9 years ago

Hey @marcussaad, I'd be more than happy to have your help! My idea for customized components (described a bit more here) is to get them directly from the schema-form decorator. This would provide an ideal workflow where new components wouldn't have to be registered in multiple places. However, I think it will be important to provide a temporary configuration option for overriding these (because the current schema-form mapping API needs to change a bit for this to work).

My timeline is to hopefully have a working alpha-quality builder up in early May, and hopefully put in a PR to schema-form to automatically support this later that month.

markomanninen commented 9 years ago

I also need sophisticated form builder ui. Was thinking json-editor on github but angular approach seems to go to finer details with it. Hope to hear from your repository soon.