Firstly, thanks for an absolutely amazing module! Layout Paragraphs is genuinely revolutionising how we create and edit our Paragraph pages so BIG thanks.

We're now starting to use the Paragraph Library module alongside Layout Paragraphs. I can see lots of work done already to improve Layout Paragraphs' integration with Paragraph Library (https://www.drupal.org/project/layout_paragraphs/issues/3211196) but there's no mention of the following feature as far as I can see.

When using Paragraphs (Stable) as the form widget instead of Layout Paragraphs, any paragraphs you add to a page from the Library have an "Unlink from library" option on them. This enables you to add an existing paragraph from the Library but then unlink it so you can make changes to that specific copy of the paragraph without overwriting the original version in the Library.

Would it be possible to have this option also available when using the Layout Paragraphs UI please?

In Layout Paragraphs when you add a regular paragraph to a page and then edit that paragraph, we already see the "Promote to library" button in the edit modal so it would probably make most sense for the "Unlink from library" button to go in the same place when editing "From library" paragraphs.

Hope this is possible? Thanks again!

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SteveAllen74 created an issue. See original summary.

John Pitcairn’s picture

Ah. I was just wondering where the unlink button was. +1.

We have a lot of style options available on most paragraph types, and those get saved into the library along with the paragraph. Editors are often going to want to override those style options, and will need to unlink the paragraph to do so.

John Pitcairn’s picture

Version: 2.0.1 » 2.0.x-dev

Ruslan Piskarov made their first commit to this issue’s fork.

Ruslan Piskarov’s picture

Status: Active » Needs review
Anybody’s picture

Status: Needs review » Needs work

Nice feature! :)

Perhaps a #description makes sense that explain in detail, what happens to the paragraph being unlinked? e.g. "The paragraph will be removed from the library and only exist within this entity."

What happens if the paragraph is already used somewhere else? Does it break there?

John Pitcairn’s picture

IMO any other library-linked paragraph should remain so, including any other copies of the paragraph in the same parent entity. Only this single local paragraph should be unlinked.

Anything else would be a UX WTF, and hard to explain.

John Pitcairn’s picture

If there is help text, it should not say "removed".

Anybody’s picture

@John Pitcairn sorry if my comment was a bit confusing. My suggestion should not be taken by word, I just wanted to give some orientation and explain why it would make sense to add a description so that a user is aware of the results this action has!

I don't know the feature enough to tell what it does exactly, just thought about what it could mean.
(Outside view)