Quick areas without declaration in the content field schema #3805
Replies: 1 comment 1 reply
-
I appreciate why some frontend developers really liked this feature. Unfortunately it made it very difficult for Apostrophe to perform introspection and determine the correctness and safety of content being submitted by an editor. Is this content valid, or a hack that doesn't belong here? No way to know except by inspecting the template files, which are only read on the fly in some and not all cases. We worked around it using a mechanism called "blessings" that was based on the user's session. But this caused a lot of bugs and was not a sustainable pattern. "Spontaneous areas" also make it difficult to potentially deliver an accessible editing experience or just a more "schematic" editing experience for times when the content is hard to find and edit on the page. In A3, all content can potentially also be edited via the modal, which is a good thing, although we have some way to go in making that experience good in all cases. Since all page types and widget types have a corresponding module, it is generally not very difficult to add their fields to So while I do understand it was a popular feature, we don't have any plans to go back to allowing "spontaneous areas." |
Beta Was this translation helpful? Give feedback.
-
Hi,
Defining areas/singletons directly inside the template is a one neat feature that I miss from the A2. I believe that it has a good use case especially when you want to give the user an ability to quickly modify text contextually (using rich text widget). It also helps when your template is mostly static and you want to fit it one button or a certain element/widget. Let's say there is a bunch of sections (think a more complex structure e.g. grid) in the template - a definition needs to be declared in the content field schema for each section/area. I am sure there are good reasons to require the definitions, however it can be a bit limiting in some scenarios (+ adding dev time).
Beta Was this translation helpful? Give feedback.
All reactions