Problem/Motivation

With #2843917: Implement Library entity type. We add the possibility to re use paragraphs. For better testing purposes, we should provide some demo content that shows the functionality of the library.

Proposed resolution

Add demo content.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

yongt9412 created an issue. See original summary.

miro_dietiker’s picture

Project: Paragraphs » Paragraphs Collection

Paragraphs Collection it is!

thenchev’s picture

Assigned: Unassigned » thenchev
thenchev’s picture

So for the demo content are we adding a new module paragraphs_library_demo or extending paragraphs_collection_demo?

primsi’s picture

I would say that we do it in paragraphs collection demo.

thenchev’s picture

Status: Active » Needs review
StatusFileSize
new2.91 KB

Not sure how best to show the library content. Here is some initial patch.

primsi’s picture

Status: Needs review » Needs work

Good start. Not sure how to make it a bit more clear what we're doing here. Perhaps the idea described in the second item below...?

  1. +++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.install
    @@ -191,6 +192,33 @@ function paragraphs_collection_demo_install() {
    +  $library_text_paragraph = Paragraph::create([
    

    We started adding comments like
    // PARAGRAPH DEMO ITEM: library items.
    to the install file to have a bit more readable code.

  2. +++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.install
    @@ -191,6 +192,33 @@ function paragraphs_collection_demo_install() {
    +      'value' => 'This is content from the library.',
    

    Hm, I was thinking that if we want to really demonstrate this a bit better, we could add this library item two times and expand the text saying that this is in fact the same content that has been reused.

miro_dietiker’s picture

I think the demo will / should host multiple nodes. So following the real use cases, we should reuse the library item simply on two nodes.

The library item should contain regular paragraphs. I would just add the statement as last paragraph in the item that it is from the library.

thenchev’s picture

Status: Needs work » Needs review
StatusFileSize
new1.62 KB
new3.06 KB

Added comment and improved library item text.

miro_dietiker’s picture

Component: Code » Library

  • Primsi committed f0fe9c6 on 8.x-1.x authored by Denchev
    Issue #2847054 by Denchev, miro_dietiker, Primsi: Create demo content...
primsi’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.