backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Show unpublished Paragraphs items on front end for administrators? #102

Open laryn opened 2 years ago

laryn commented 2 years ago

At Backdrop LIVE, @klonos suggested showing unpublished paragraphs items on the front end for administrators (with some kind of visual distinction to show that they are unpublished). This would allow republishing from the front end.

The downside is that it muddies up the view on the front end, making it harder for an administrator to see what the page actually looks like without logging out or opening a separate tab.

olafgrabienski commented 2 years ago

Good question! I guess the answer depends on the reason to work with unpublished paragraphs. If I just want to fix a typo later the same day, unpublishing and republishing both on the front end is nice.

Personally, I'd be fine with logging out to see how a page looks for visitors. However, if there were many unpublished paragraphs in a node for a longer period, they'd still occupy a lot of space, which can be annoying.

Another consideration: If unpublished paragraphs stay not visible on the front end, they might get forgotton. To mitigate this risk, there could be a message on the page which mentions the existence of unpublished paragraphs.

olafgrabienski commented 1 year ago

One question: is there currently another way to unpublish Paragraphs items, i.e. remove but not delete?

laryn commented 1 year ago

@olafgrabienski If you enable it on the Paragraph type, you can unpublish/publish Paragraphs items from the back end (e.g. node edit page). When unpublished they are not visible on the front end. The suggestion on this issue is to still display them on the front end as well for those with permission (perhaps with some kind of visual indicator to show they are unpublished).

laryn commented 1 year ago

I suppose one possibility is to show them on the front end only if the user has permission AND front end editing has been enabled for that Paragraphs field.

olafgrabienski commented 1 year ago

If you enable it on the Paragraph type, you can unpublish/publish Paragraphs items from the back end (e.g. node edit page).

Thank for the hint! (I'm not that familiar with the Paragraphs interface so far, and struggle often with the question if a setting is at the field or at the Paragraphs type.)

(...) show them on the front end only if the user has permission AND front end editing has been enabled for that Paragraphs field.

I'm a bit skeptical if the advantages outweigh the downsides, but as there is already the option to "Allow unpublishing from the admin interface" (at the Paragraphs type), we could make the front end unpublishing optional as well, even if the above mentioned conditions are met, and add a setting for the front end. Something like:

Allow unpublishing from the modal dialog

Caveat: The setting should probably be near the "Enable modal administration" option, but that is a field setting (i.e. not at the Paragraphs type).