Dear Community,
I have a very unique scenario for which I am running out of ideas and suddenly realized there are certain things that require overlaying or extending done in a specific manner.
Here is the use case I am dealing with. We had to alter responsive grid markup to include a few extra tags or classnames or may be not render all the child components, etc. We tried a few different ways and finally felt that overlaying the html file of responsive grid is the best way to ensure there is consistent experience across. And here is the catch, I overlayed the html file choosing option to not match types (the checkbox you see while overlaying). Everything worked fine.
Now very interestingly, our SPA Editor is. broken. I wasn't able to figure out very easily what went wrong. Basically pages are loading but all editable overlays are lost, i.e. cant edit any components that are rendered. Upon thorough debugging found that editcontext.json calls for the page are returning an empty json, which obviously is supposed to return details of editable configurations, policy info, etc for all components in the page structure. Then i understood because I chose the option to not specifically match the type while overlaying, overlayed html is created inside an nt:folder, however probably editcontext.json tried to resolve the path and it may have resolved the path to /apps and since the folder is not a component, editcontext.json returned empty json
Now I re-did the overlay and then opted for the match type (checkbox checked), so the parent node for html is now a node with primary type set to cq:Component. Now realize that technically we have introduced a new component and that too without extending it. Technically I feel this is an antipattern. Component library may recognize the same component as 2 instances if we don't take proper measures.
But this fixes the SPA Editor issue, since the overlayed path is recognized as a component. But this started a brand new issue. Existing pages loaded fine. But unable to add any more components where responsive grid is loaded. At this point of time I unclear as to whether I have to find a way to make this work or find a way to get the editconfig.json calls work with overlay of html without matching type.
Can any one shed any ideas on this?
Also personally i think overlaying shouldn't change location of actual component while retrieving the editconfig and feel its a bug?
Thanks for your inputs in advance !
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Looks like I have to overlay all child nodes also for the component along with component properties also for the overall functionality to work as expected. But just in case if you see a better way to handle this, feel free to advise. Thanks
Looks like I have to overlay all child nodes also for the component along with component properties also for the overall functionality to work as expected. But just in case if you see a better way to handle this, feel free to advise. Thanks
Views
Likes
Replies
Views
Likes
Replies