- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
This blocks #3418706: [PP-1] Populate the default shortcut set โ , which is technically necessary for finishing the Recipe-ification of the Standard install profile in [#3417835.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Is there really nothing we can do here until โจ Support default content entities Active lands? ๐ค
Also, this is at least if not ?
- ๐บ๐ธUnited States phenaproxima Massachusetts
I gave the default_content module a cursory look today and I'm wondering...what if we just, like, added the important parts of it to the recipe system directly?
There are a number of things we don't strictly need from default_content, in order to make recipes import content. For example, the Drush commands are not necessary; neither is the ability to export content. The module also supplies an event-based API, which we could ditch for now. We could also rip out some deprecated material (like support for HAL+JSON-encoded content).
Beyond that, it's really not that complicated of a module.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I think it is an acceptable stepping stone - I think a default content solution belongs in core. That can export and do the other things the module does. But I agree that this feels like a way we can go forward for now.
- Status changed to Active
8 months ago 9:56pm 18 March 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
So I think that means โฆ this? ๐
- ๐บ๐ธUnited States phenaproxima Massachusetts
Strategically speaking, I might add that getting this done will supercharge #3365143: [PP-1] Model core's Umami install profile as recipes โ . Umami has shipped content from day one, and being able to bundle all that as a nice recipe (or set of recipes), instead of having to awkwardly install demo content via an otherwise superfluous module, is going to make recipes an even more attractive solution to automating site building tasks and creating great starting points.
So...full steam ahead!
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
"supercharge" โ I like the sound of that! Full steam ahead indeed! ๐
- ๐ฎ๐ณIndia omkar.podey
omkar.podey โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia omkar.podey
Even if we strip off all the normalise stuff we still need the denormalise for yaml content files right ?, this means a new class for denormalise as it's a lot of code .
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Can we make this MR against 11.x recipes - it'll need to land their first.
- ๐บ๐ธUnited States phenaproxima Massachusetts
#14: IMHO we do not need the denormalization as a separate class. I know it's a lot of code, but in the interest of compactness and keeping API surface minimal, I think it's okay for the ContentImporter to be a single class that handles the denormalization as well.
That said, if you really feel it would benefit from being more than one class, I don't feel super strongly.
- ๐ฎ๐ณIndia omkar.podey
Right now in the 11.x branch following the
default_content
module's convention which is to place the.yml
file in theentity_type
folder under the recipes folder works. You can try that by runningphp core/scripts/drupal recipe core/tests/fixtures/recipes/only_content
.- Needs cleaning next as multiple classes are added which could be combined.
- Needs implementation for handling media files.
- Status changed to Needs review
8 months ago 5:06pm 22 March 2024 - ๐บ๐ธUnited States phenaproxima Massachusetts
Managed to get this sorted out (no pun intended - had to work with the Graph component to make it work), and the test coverage proves that multiple entities of different types are imported in dependency order when applying a recipe that ships content.
I think this is ready for an initial review.
- ๐บ๐ธUnited States phenaproxima Massachusetts
- ๐ฎ๐ณIndia narendraR Jaipur, India
A follow-up documentation issue might be required to help understand how content can be created/imported using recipe system.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Filed #3436263: Document how to ship content with your recipes โ to document this.
- ๐ฎ๐ณIndia narendraR Jaipur, India
Thanks for the follow-up. One test scenario which is missing here is "Imported node with owned by user that does not exist".
Rest LGTM. - ๐บ๐ธUnited States phenaproxima Massachusetts
Good call on that test coverage; it found a bug!
I think everything is fixed now.
- Status changed to RTBC
8 months ago 3:35pm 28 March 2024 - Status changed to Needs work
8 months ago 10:57am 29 March 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Posted some comments on the MR. This is looking really nice. Just need to sort out the namespace. I suggest Drupal/Core/DefaultContent
When you move it don't forget to update .recipes.gitlab-ci.yml with the new test and code locations.
- Status changed to Needs review
8 months ago 5:38pm 29 March 2024 - ๐บ๐ธUnited States phenaproxima Massachusetts
I think I've addressed all feedback here, except for creating the follow-up.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Added a follow-up and linked it in the code.
- Status changed to Needs work
8 months ago 1:17pm 30 March 2024 - ๐บ๐ธUnited States phenaproxima Massachusetts
I just realized there's a huge blind spot in this MR: we're not testing importing translations!
Definitely need to test that.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Okay, we're now testing translations. That said, there's still a bug here that I need to fix, then split off into its own blocking issue.
- Status changed to Needs review
8 months ago 4:54pm 1 April 2024 - Status changed to Needs work
8 months ago 10:13am 2 April 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
First round of review, but this is looking quite good already! ๐
Some requests for test coverage (on top of the ones that @alexpott also asked for and are not yet added), some things that aren't clear, a bunch of nits.
Looking forward to this one landing โฆ but simultaneously somewhat worried that we're importing the same flaws/limitation as the Default Content module has. I have no real-world experience with it though, so I wholly defer to @alexpott making that judgment call. Because unless I'm mistaken, Alex does have quite a lot of experience with it?
- Status changed to Needs review
8 months ago 1:41pm 2 April 2024 - Status changed to RTBC
8 months ago 11:06am 9 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I think this change is a great step into moving default content into core and providing recipes with the required functionality.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Committed and pushed b2dbc8f9a44 to 11.x and 838e7391d84 to 10.3.x. Thanks!
-
alexpott โ
committed 838e7391 on 10.3.x
Issue #3292287 by phenaproxima, omkar.podey, alexpott, Wim Leers,...
-
alexpott โ
committed 838e7391 on 10.3.x
- Status changed to Fixed
8 months ago 11:09am 9 April 2024 -
alexpott โ
committed b2dbc8f9 on 11.x
Issue #3292287 by phenaproxima, omkar.podey, alexpott, Wim Leers,...
-
alexpott โ
committed b2dbc8f9 on 11.x
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I think we should open a follow-up to add documentation. Especially around the expected flow of using the default_content module to create the content.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Automatically closed - issue fixed for 2 weeks with no activity.