websight-io / starter

Sample project built on top of the Websight CMS
https://www.websight.io
Apache License 2.0
57 stars 7 forks source link

Allow dropping components to the nested container component. #88

Open Rahul139-stack opened 1 year ago

Rahul139-stack commented 1 year ago

Is your feature request related to a problem? Please describe. We have accordion and accordion item component that are both containers. We are able to drop accordion item into accordion. And we would like to drop the other component to accordion item container.

Describe the solution you'd like. We would like to see drop target for accordion and accordion item at the same time.

paweljozwicki commented 1 year ago

Hi, I want to confirm if I understand the issue. We support showing a drop target for empty containers, so you are able to show a drop target for:

But if I understand correctly: you want to show something like that:

Screenshot 2022-12-14 at 11 44 45

Am I right?

Rahul139-stack commented 1 year ago

Hi @paweljozwicki ,Thanks for helping us. But we not able to drag any components to the parent accordion(Prime vue accordion) directly. When we edit the parent accordion, then able to drag those component easily. 1.Not able to drop here. MicrosoftTeams-image (7) 2.Able to drag the component here after edit submit. MicrosoftTeams-image (5)

paweljozwicki commented 1 year ago

Thanks, now I see the problem. It's because Page Editor relies on HTML comments, but Vue removes them inside the rendered component. According to documentation this should help. After the edition, the DOM is changed and it doesn't display well, but comments required by Page Editor are available. It's why Drag & Drop is available.