Problem:
My includes line is very long, as I have many nested relationships. I do not have a good overview of the includes.
Suggestion:
Would me more conviniend to have a textarea with multiple lines instead of small textbox.
Possible regression:
We should create an update script to migrate old configuration from comma-separation to the multilined separation.
My includes example:
uid,
field_channel,
field_copyright,
field_source,
field_image,
field_image.field_copyright,
field_image.field_image,
field_paragraphs,
field_paragraphs.field_image,
field_paragraphs.field_image.field_image,
field_paragraphs.field_image.field_copyright,
field_paragraphs.field_video,
field_paragraphs.field_video.field_copyright,
field_paragraphs.field_social_embed,
field_paragraphs.field_slides,
field_paragraphs.field_slides.field_image,
field_paragraphs.field_slides.field_image.field_image,
field_paragraphs.field_slides.field_image.field_copyright,
field_paragraphs.field_slides.field_video,
field_paragraphs.field_slides.field_video.field_copyright,
field_paragraphs.field_slides.field_social_embed,
field_channel.parent
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | jsonapi_default-2921800-18.patch | 4.94 KB | mkolar |
| #11 | Unbenannt2.PNG | 11.77 KB | a.milkovsky |
| #10 | After patch.png | 78.15 KB | krina.addweb |
| #10 | Before Patch.png | 29.15 KB | krina.addweb |
Comments
Comment #2
a.milkovskyA quick prototype how it can look like. I have changed textfield to textarea and allowed to have new lines in the textarea.
Comment #3
a.milkovskyNow the form looks like this:

Comment #4
mkolar commented@a.milkovsky Since there are newlines what about throwing out those commas?
Comment #5
a.milkovskyNew patch with exploding based on newlines.
I do not provide update path since the module does not have any release so far.
Comment #6
a.milkovskyI have changed default_includes to be a sequence.
Comment #7
a.milkovskyFixed usage of implode.
Comment #8
a.milkovskySorry for spaming here :) Another improvement: remove empty values.
Comment #9
krina.addweb commented@a.milkovsky, Like a good change, as far as I reviewed & Checked it, Thanks for providing the solution & changes.
The only query I've is, do we have a need to validate user when they add comma separator? Because I think it should remove the comma separator & move includes in the new line, When I add it. What say?
PFA screenshots.
Comment #10
krina.addweb commentedComment #11
a.milkovsky@krina.addweb, you do not need commas anymore. This is how the form should look like:

Comment #12
krina.addweb commented@a.milkovsky, Thanks for the quick response to clarify my query, I moved it to RTBC as it works well for me.
Comment #13
krina.addweb commentedComment #14
mkolar commentedThanks. This needs update hook to change active configuration in order to commit this into module. Feel free to do it or I'll do it later.. some info is here how to do it https://www.drupal.org/docs/8/api/update-api/updating-configuration-in-d...
Comment #15
siva01 commentedHere is database update patch based on jsonapi_defaults-2921800-8.patch
Comment #16
a.milkovskyneeds review
Comment #17
siva01 commentedTypo fix
Comment #18
mkolar commentedSome adjustments...
Comment #20
mkolar commented