apostrophe: On-page, in-context editing of areas nested in array elements does not save
This turns out to be a longstanding issue:
If I have an area inside a field of type array
and I want to edit that area contextually on the page, I can’t.
I hoped to fix this simply, but there’s a problem. The contextualConvert
mechanism depends on scoping the search for relevant elements via a parent element, and array items don’t necessarily have one on the front end of websites, or it’s site-dependent.
We could address it by saying something ilke this:
“If you want contextual editing of the content of the array elements, you have to introduce a [data-apos-array-item="item._id"]
attribute on a wrapper element. You don’t have to do this, but you can’t have contextual editing unless you do.”
This would require minimum change to the code.
Or, we could address it by locating contextually editable fields by their full dot paths, which would mean it wouldn’t matter if the intervening structures had a representation in the DOM or not. This would involve tricky fallbacks for bc and could complicate things if someone actually introduces array editing in context (adding/removing/etc).
The first solution makes the most sense to me. We could provide a helper to make it less awkward. People are going to forget to do it and complain. Hmm.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 36 (22 by maintainers)
Definitely not intentional, good catch, thank you. I am bringing this fix back.
On Fri, Nov 30, 2018 at 2:19 PM antoine beauᵛᵃᴵˢ⁻lacᵃˢˢᵉ < notifications@github.com> wrote:
–
Thomas Boutell, Chief Software Architect P’unk Avenue | (215) 755-1330 | punkave.com
Thanks @boutell ! Out of interest, would it be worth submitting simple widgets such as multi col one back to the apos community? IF so, how do you do that?