lesaff / statamic-sections

Add accordion or tabs interface to your fieldset sections
10 stars 5 forks source link

Sections collapsing parent #6

Open KimKJDesigns opened 6 years ago

KimKJDesigns commented 6 years ago

I've been using this for a few days now. It was perfect to pull all my fields into shape as I have a huge amount of flexibility in my fieldset. I hit a roadblock first using tabs, it completely messed the whole CP when accessing a page.

image

Changed to accordion (which was my preferred choice anyway) and bam, everything looked perfect.

image

But I've just run into an issue. As you can see, I'm using a replicator inside a replicator. This still works, however, I have child grids as well. Inside these grids, I'm using a partial with a section. This partial is used in the grid parent as well, which is why when I click on the child sections, it collapses the parent and not the child.

image

This makes accessing the child sections impossible without disabling Sections :(.

feature_1:
  display: Feature 1
  instructions: Background Video with content and features in the foreground.
  fields:
    section_settings:
      type: partial
      fieldset: theme/section_settings
    background_video:
      type: partial
      fieldset: theme/background_video
    content_copy:
      type: partial
      fieldset: theme/content_settings
    features:
      type: grid
      display: Features
      min_rows: 0
      max_rows: 3
      mode: stacked
      add_row: Add New Feature Item
      fields:
        content:
          type: partial
          fieldset: theme/content_settings
lesaff commented 6 years ago

@KimKJDesigns I think the later version of Statamic has this tabbed sections built in already which makes this addon irrelevant

KimKJDesigns commented 6 years ago

@lesaff you are correct and I can live without tabs for this extension. However, the accordion was perfect for non-nested partials. It cleans all the replicators as desired, it's just any nested partials that have the same section in it that messes the whole thing.

If you're no longer supporting the addon, I understand, but I do think that the accordion sections has its place in Statamic. Especially for those that are creating many (some of my replicators have 60+) options for page creation.