vue-form-generator icon indicating copy to clipboard operation
vue-form-generator copied to clipboard

Add subgroups + custom group tags

Open johnsusek opened this issue 4 years ago • 9 comments

  • What kind of change does this PR introduce?
    • A feature to add a subgroup within a group
    • A feature to specify group tag per group
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?) No, feature addition only.
  • Other information: Please see https://github.com/vue-generators/vue-form-generator-docs/pull/28 for documentation

I've also added subgroups to the dev group example:

Screen Shot 2020-04-18 at 2 16 29 PM

Since these changes allow custom tags and subgroups, complex behavior like putting subgroups into tabs is possible. Here's what it looks like with bootstrap-vue tabs for subgroups:

Screen Shot 2020-04-18 at 2 17 12 PM

Please let me know if there's anything you would like done differently! I hope we can get this subgrouping behavior in, we are using vfg in a project with very complex forms and could really use something like this.

Related issue: #285

johnsusek avatar Apr 18 '20 19:04 johnsusek

Coverage Status

Coverage remained the same at 89.979% when pulling 9bbb143125ce7ece78cabf487213c58593077335 on johnsusek:feature/subgroups into 721a4eebbde77040a1318e60aa9ef21229bbcf99 on vue-generators:master.

coveralls avatar Apr 18 '20 19:04 coveralls

This is interesting but I think a visible key really needs to be part of this to make it really useful. I think a visible tag in on another PR. I don't see a sample of what the schema would look like, I am assuming it can go multiple levels deep?

DelfsEngineering avatar Apr 18 '20 19:04 DelfsEngineering

For our use case, this functionality is definitely useful and would go into use right away to group forms into subsections. And other people would like it too imho, as evidence I would point to #285.

But maybe I don't understand - can you elaborate on this "visible" feature and why it is important for this PR?

Thanks for the feedback!

johnsusek avatar Apr 18 '20 19:04 johnsusek

A visible key at the group level to hide the entire group, currently it must be done via css.

DelfsEngineering avatar Apr 18 '20 20:04 DelfsEngineering

That sounds like it would be a useful addition to vfg. If that feature is added to the codebase I would be happy to help integrate it with this subgroups feature.

johnsusek avatar Apr 18 '20 20:04 johnsusek

Basically it would allow you to have a login, password reset and sign up groups all in one form.

DelfsEngineering avatar Apr 18 '20 20:04 DelfsEngineering

@johnsusek Would this support recursive groups also? or just one level down?

DelfsEngineering avatar May 08 '20 15:05 DelfsEngineering

This is a nice feature. Why it is not merged yet? 🤔

Mohammad-Alavi avatar Dec 09 '20 17:12 Mohammad-Alavi

@icebob merge it please :(

vortechron avatar Feb 28 '21 09:02 vortechron