Skip to content

[6.x] Hide section behavior control where imported sections can't be preserved - #15604

Open
jaygeorge wants to merge 1 commit into
6.xfrom
fix/15602-hide-section-behavior-in-sets
Open

jaygeorge wants to merge 1 commit into
6.xfrom
fix/15602-hide-section-behavior-in-sets

Conversation

@jaygeorge

Copy link
Copy Markdown
Contributor

Fixes #15602

Imported fieldset sections are only preserved when the import sits directly in a blueprint (Tab::toPublishArray()). Anywhere else, inside Replicator/Bard sets, Grid/Group fields, or another fieldset, they're always flattened. The CP still offered the "Section Behavior" control in those places, so choosing "Preserve" looked like it should work but did nothing.

This PR:

  • Hides the Section Behavior control when linking or configuring a fieldset import anywhere sections can't be preserved.
  • Shows the "Ignoring Sections" badge on those imports, so it's clear the fieldset's sections will be flattened.
  • Stops "Link Existing" from writing section_behavior in those contexts.

The contexts are detected with the existing isInsideSet and isInsideConfigFields injections, plus a new isInsideFieldset provided by the fieldset editor. The check lives in one PreservesImportedSections mixin.

This only changes the UI. Supporting collapsible sections inside sets would be a separate feature.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve Sections in Replicator Sets

1 participant