websight-io / starter

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

Placeholder for single component does not allow adding components under that component. #139

Closed wildone closed 12 months ago

wildone commented 1 year ago

Description Placeholder for single component does not allow adding components under that component.

Steps to reproduce Example adding a new container to Parent with one child:

1container

Example adding a new container to parent with 2 children child:

2containers

Would be great to avoid copying components.

The container has the template for ${!resource.hasChildren}

Even if you output this all the time its not printing the placeholder under the component for placing components. Would be great to allow placeholder for above and under components.

paweljozwicki commented 1 year ago

Hi, our placeholder is visible only in empty containers, and usually, we add some additional styles with extra padding for containers in edit mode. E.g. in Howlite, it should be possible to add the next component in the same container by moving out of the existing one: Untitled

There is also an "Add" toolbar action in our plans, so authors could choose a container and add a new component from the toolbar action instead of using drag-and-drop.

wildone commented 1 year ago

Is it possible to make place holder appear all the time?

Ok ive added padding to container, but now you need to be very precise to move the cursor into right place outside of the place holder.

subtle-padding

Would it be more intuitive to have the drop target to stick inside the placeholder? Similar to how "middle" drop target appears.

Adding padding/margins is a bit of a hit and miss.

If placeholder has 3 drop targets:

  1. Top place above me
  2. Middle make my child
  3. Bottom place under me
paweljozwicki commented 1 year ago

We will ask our UX designer to look at such a solution. It seems like something that could help with the authoring experience, but we must analyze all the pros and cons.

paweljozwicki commented 12 months ago

It's resolved in WebSight CMS 1.22.0 From now on, dropping a component into the outer 25% of an empty container area leads to placement in its parent: 15330dd2-5cba-44f9-b133-63c2bc3352a1