b13 / container

A TYPO3 Extension for creating custom nested content elements
GNU General Public License v2.0
165 stars 58 forks source link

Do not hide children on copy or localize #400

Open jonakieling opened 1 year ago

jonakieling commented 1 year ago

Hi there,

Issue

when an instance runs without neverHideAtCopy the child elements will be hidden after copying.

This is an issue when some of the originals are hidden and some are not. This information is lost with the copied elements.

In our cases the hiding or not hiding of the container itself is sufficient.

Proposals

  1. We patched the CommandMapPostProcessingHook to always set neverHideAtCopy for child elements.
  2. This could be a configuration option for containers instead which would be more flexible but more complex.

Kind regards Jona

tastendruecker commented 1 year ago

+1! Especially in complex container structures it is quite annoying for editors to un-hide every child element of a copied container. Would be really nice if just the copied container were hidden.

achimfritz commented 8 months ago

Hi guys, i would suggest to use the value of the "original" DataHandler (passed to the Methods)?, like

$localDataHandler->neverHideAtCopy = $dataHandler->neverHideAtCopy

for $dataHandler->neverHideAtCopy (can be easily implemented) and TYPO3-Core methods for general use cases:

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Ctrl/Properties/HideAtCopy.html https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceMain.html#pagetcemaintables-disablehideatcopy

i would not like to introduce such a special case into the EXT:container

kitzberger commented 8 months ago

@achimfritz, with your suggestion integrators would have to come up with some sort of CType based tsconfig override, right? Or would you do that in EXT: container already?

I'd favor the solution with the least possible todos for integrators and would be fine with just respecting hideOnCopy for the container itself and disabling it for all children, so their actual hidden value remains unaltered as @jonakieling suggested.

saitho commented 2 months ago

:+1: We're also discussing this currently with our client.

Hiding the container after copy is sufficient to hide it in the frontend until contents have been adjusted. It's tedious for our editors to copy a container with let's say 20 elements and needing to enable them one-by-one.