Hi Roger,
Adding a toggle to the Articleblocks MCF field and handling the rendering/hiding on the frontend is definitely a workable temporary solution.
However, there are some drawbacks to this approach:
- API Data Exposure: Unwanted or disabled fields still send data in the API response, which means it can be accessed through the network tab, potentially leading to unintended data exposure.
- UI Clutter: Adding a boolean option to a field increases the whitespace, making the field longer and less clear. This issue is similar to what I mentioned in my other feature request for enhanced content editor layout with customizable field widths.
- Field Collapse Management: Since the default collapsed state is managed by the MCF field, control over field visibility is limited.
- When all fields are open by default, disabled fields will also be open, which can create confusion and clutter.
- Conversely, if fields are collapsed by default, there’s no visible indication of whether a field is disabled, as this is hidden within the collapsed field, forcing users to manually expand each field to find the one they need.
While the frontend solution is a sufficient workaround for now, I do keep my fingers crossed and hope we will see this feature in a future DatoCMS update.
Thank you