Closed (fixed)
Project:
Paragraphs Collection
Version:
8.x-1.x-dev
Component:
Library
Priority:
Major
Category:
Feature request
Assigned:
Reporter:
Created:
28 Feb 2017 at 11:06 UTC
Updated:
17 Feb 2018 at 09:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
primsi commentedContinuing discussion from parent issue.
I had another idea for the approach: would make sense to have a separate widget for the library item reference field (on this from library paragraph type)? This widget would then have the actual reference (maybe hidden field) and a required title field. When saving, we would update the library item title. Not sure about having another widget though in light of future plans for the experimental paragraphs widget.
Comment #3
miro_dietikerI don't know what is the right approach to the solution yet, but you are right:
- What we need is a little bit like IEF on the entity reference.
- It's also not only about the title. The can have other metadata fields and putting things into the library should allow to classify it.
- The problem is that this action affects a different non-composite entity. The most simple way would be to leave the editing context (new tab OR lightbox). Opening tabs is obsolete and leaving the context will drop current changes.
One idea is to establish a completely different pattern to entity management:
- Save the current editing context somehow (from temp store, forward revision via workspace, ...)
- Switch to the regular library management entity (create, update) form with some context
- Redirect back to the original host editing on save
The key question here is:
- When should the collection save?
- If the collection item is saved while editing the original host, how do we return into the editing context?
We don't want to reinvent IEF nor Workspace here. I think this is a very challenging architectural question that need to be carefully defined first.
Comment #4
primsi commentedComment #5
primsi commentedSry, cross post.
Comment #6
primsi commentedComment #7
miro_dietikerWe just improved the default label, see linked issue.
One thing i thought was if we should indicate generated converted Library items somehow.
Currently you could identify them due to their paragraph type label prefix (in case your manually edited labels have a different pattern:
Alternatively we could assign a simple tag.. But the library has no tag field by default.
Mind that the prepending of the label is redundant. There's a column and an exposed filter for the Paragraph type at admin/content/paragraphs
So maybe instead we should just prepend "Converted: "?
Comment #8
miro_dietikerWe will redefine this issue to a better integration with Entity Browser that allows easier editing of the label.
While avoiding a hard dependency, we still will ship optional configuration and the view to browse the library.
Comment #9
johnchqueWorking on this. :)
Comment #10
johnchqueAdding entity browser and view, updated widget if the entity browser module is enabled.
Comment #11
johnchqueComment #12
johnchqueAdding some tests.
Comment #13
johnchqueAdding test dependency. :)
Comment #14
johnchqueThere is some problem when saving the node that I don't the cause, somehow I cannot save the node after adding an element from library.
Comment #16
berdirTest dependencies are now done as require-dev in the composer.json, then you don't need to wait for a commit on that. And we definitely need a test then for library with entity browser.
Comment #17
johnchqueAdding to composer file. :)
Comment #19
johnchqueRemoving ctools as is not needed. :)
Comment #21
johnchqueAdding ctools to library. :)
Comment #23
johnchqueJust checked that we should include this branch of ctools. :)
Comment #25
berdirmake sure that you include a filter for default language for both the library and the referenced paragraph. Test by adding a translation to a library item and making sure that it only shows up once in the view.
Also, set the render language to interface language, so if translated, it is displayed in the currently active language.
Comment #26
johnchqueThanks to the help of @Berdir I could implement working tests. This should work. :)
Comment #28
berdirthere's no such thing, content_translation is in core
Comment #29
johnchqueOops sorry. :)
Comment #31
johnchqueRemoving debug leftover. :)
Comment #33
berdirWas only able to reproduce that problem on one system. You still had the press button inside the iframe, and then it depending on speed/timing what happened.
Removing that caused other timing issues because the ajax stuff doesn't detect ajax inside the iframe.
Comment #35
berdirCommitted.