statamic / ideas

đŸ’¡Discussions on ideas and feature requests for Statamic
https://statamic.dev
32 stars 1 forks source link

Feature Request: Bring back "partial" fieldset for fieldset->fieldset #130

Closed that0n3guy closed 4 years ago

that0n3guy commented 4 years ago

I posted this in discord earlier today.

In v2, I have fieldsets inside multiple fieldsets. The main fieldset I use in several different collections along with other fields. For example a blog post would have the "page builder" fieldset (see image) and Title, seo meta, list image, etc... A "Webinar page" would have the "page builder" fieldset and other fields like speaker, listing description, dates.

fieldset-inception

For many use cases, the replicator/grid/bard works to "link" fieldsets into other fieldsets. But there are often cases where the fieldsets don't need to be replicated (ie, don't need more than 1 of the field on the form).

For example, from the image above, this "padding settings" fieldset: image just needs to show the fields within the "billboard" fieldset.

jackmcdade commented 4 years ago

You can link to a single field or a fieldset. You can do this on the blueprint or inside "meta" fields like Bard or Replicator. I don't understand exactly what you're trying to do if this isn't the solution for you. đŸ¤”

image

jasonvarga commented 4 years ago

You can't do that in a fieldset though.

that0n3guy commented 4 years ago

@jackmcdade In my example above I have a simple fieldset called "padding settings", it only contains 2 fields.

This fieldset is used in other FIELDSET's (but not in a meta replicator, grid, bard way... I just want the fields, no need to have them repeat their), like the "image row" fieldset, or the "accordion" fieldset (in my picture). The image row and accordion fieldsets are added too blueprints, but, currently, the "padding settings" can't be added to the image row/accordion fieldsets (as examples).

Does this make sense? So just like Jason was saying, the above image you show is on a blueprint, not a fieldset.

I think a good location too add this would be here: image

jasonvarga commented 4 years ago

I think we should just make fieldsets work like blueprints, so you can have the same import feature.

That brings up the question of whether fieldsets should be phased out completely, and let you just import other blueprints. Something to think about for later though, when we have some more brain power.

that0n3guy commented 4 years ago

I personally like the separation between fieldsets & blueprints from a "what does this content-type (collection) attach too."

In v2, I was constantly annoyed and forgetting which fieldset did I attach to the "blog" collection.

That said, that seems like a UI problem. If there was a graphical way to see what blueprints are used on which collections and which fieldsets are linked in other fieldsets/blueprints, that would solve my confusion issues.

This image is from something else, but you get the idea of an easy way to "view" what is connected to what. image

goellner commented 4 years ago

I just found this FR and wanted to add my use case for this. Didn't know this wasn't possible till now.

I want to break down my fieldsets to be as reusable as possible. Example fieldsets: buttons, tooltip, headline, copy, ...

Then I would create fieldsets for lets say a hero section where the fieldsets headline, copy and button are getting imported. If there is an additional button style, I would only have to change it in the button.yaml. The hero fieldset itself would get imported in a blueprint.

Why we would need that: using v3 headless in combination with a React Frontend. We have everything in a component like a button and want to write type definitions with TypeScript.