Model core's Umami install profile as recipes

Created on 6 June 2023, over 1 year ago
Updated 21 May 2024, 7 months ago


Problem/Motivation

Recipes are conceived as composable, with any given recipe often requiring a chain of other recipes. But there's little practical sense as yet of just how this would work, or of what recommended patterns might be.

Proposed resolution

Currently core's Umami install profile provides both required (config/install) and optional (config/optional) configuration. It also does something that could potentially be modelled as a config action - sets the site email address as a recipient of the feedback contact form. To get a sense of how recipes might work, a useful exercise would be to look at different models of how the Umami install profile might be divided up into recipes.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

11.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @thejimbirch
  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts
  • Status changed to Postponed 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    I'd like to postpone this on #3417835: Convert the Standard install profile into a set of recipes β†’ . If we can convert Standard to recipes, then we can attack Umami, which is a far more complicated install profile that even touches on the need for default content. :)

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Not only that, it's possible that a recipized(?) version of Umami could reuse some of the recipes that make up Standard.

    Shouldn't we take this into account while converting Standard to a Recipe? πŸ€” For example for the article and page node types, as well as the various media types?

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Shouldn't we take this into account while converting Standard to a Recipe?

    Well...sure, but in an indirect way. IMHO, converting Standard to recipes is a big enough undertaking even without having to think about Umami.

    Let's get Standard converted, and committed, first. Then see what we can reuse from it without any modifications. (I'm guessing most of its tangible content and media types will fall into that category.)

  • πŸ‡¬πŸ‡§United Kingdom Eli-T Manchester

    Just fixing what looks like copy-paste hangovers in the summary - Standard ➑️ Umami in text and standard ➑️ demo_umami in config links.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #5 πŸ‘

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    The Umami profile substantially extends the editorial workflow compared to what's in Standard, so I think we'll probably want to have some config actions available to manipulate Content Moderation workflows before we do this. The only one currently open is #3422821: Add a config action to add entity types and bundles to a Content Moderation workflow β†’ , and we'll need that one, so blocking this on that.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Umami also ships content, of course...but #3292287: Extend recipe runner to create content provided in the recipe's /content folder β†’ is in a reviewable state, now. So blocking on that one too.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    I was thinking about this a bit and it occurs to me that converting Umami to a set of recipes is a much different circumstance, and therefore has different goals, then converting Standard.

    The recipes that make up Standard are meant to be generic, reusable parts -- the kind of things you'd likely need on any site. Umami is a lot more specialized. Do we really expect, for example, that most (or even many) sites will want to have a "recipe" content type, set up specifically the way they are set up in Umami?

    To me, this means we should take a different approach in reconstructing Umami as a recipe. Namely - I think the Umami recipe can be less composable, because it's intended more to be a self-contained demo than a set of reusable parts. We should carefully consider which parts of Umami can be extracted into smaller, useful recipes that could be cherry-picked into other sites...but I suspect the main Umami recipe can and will be very large and complicated. That's okay, though, since that is in line with Umami's purpose.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Some thoughts on how to split up Umami:

    • The block types (banner, basic, disclaimer, and footer promo) should be reused from Standard (basic_block_type), and should all be individual recipes.
    • The Page content type, and all media types, can probably be reused from Standard (or lightly modified, if needed, by the main Umami recipe).
    • The "card" view mode for nodes should be its own recipe. I can imagine that being very useful.
    • The recipe content type should be its own, well, recipe. Although we might want to call it umami_recipe_content_type, to make it very clear that this content type was specifically designed for Umami.
    • All of Umami's image styles and associated media view modes should be part of a single recipe called umami_image_styles (or similar). It should include the responsive image styles.
    • The "author" and "editor" roles can be part of the main Umami recipe.
    • Umami's Article and Page content types use Layout Builder. This, to me, is a great chance to have a layout_builder_content recipe, which applies LB to all content types! (We could use the new "add field to all bundles" config action for this.)

    More ideas may be forthcoming, but this is just an initial brainstorm.

  • Merge request !95Draft: Resolve #3365143 "Umami" β†’ (Open) created by phenaproxima
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #12 sounds like a nice proposal to me! 😊

  • Pipeline finished with Success
    9 months ago
    Total: 533s
    #134833
  • Status changed to Active 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    The final blocker -- the ability to import default content -- is in!

    Let us continue here. :)

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    We should set a precedent here for having default content in its own recipe. Of course, it can be applied as part of umami/recipe.yml, but it should also be able to be applied independently.

    Why? I can apply a recipe on my local machine, export the config, unpack and remove a recipe (if contrib), and then push all my changes to a development, staging, or live environment. In that workflow, the content would not get pushed with it.

    If we define the idea of a recipe that is content only, that could get pushed up as part of the code base and applied on subsequent environments.

    I see many benefits from this, from prepopulating demos, to configuring baseline functionality, and content for quality assurance.

  • Status changed to Postponed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    @catch wants πŸ“Œ Umami views should use responsive grid Active merged into Umami before the recipe can be completed.

    Other work can be done to this issue, just not that view.

  • πŸ‡¬πŸ‡§United Kingdom catch

    The recipes that make up Standard are meant to be generic, reusable parts -- the kind of things you'd likely need on any site. Umami is a lot more specialized. Do we really expect, for example, that most (or even many) sites will want to have a "recipe" content type, set up in the specific way Umami does it?

    I'm in two minds about this - I agree that there are very few bits of Umami that would be re-usable.

    However, Umami is also supposed to be a showcase of what can be done with Drupal core and a bit of theming, so if we include recipes in 'what can be done with Drupal core', it might make sense to have the recipes more composable so that it's easier to see how it was put together? I don't know if we'll show installed recipes in a UI somewhere, but if we do, then having Umami made up of smaller recipes would appear in that UI for example, or just if people are looking through the code base to see how it was done.

    fwiw I don't think πŸ“Œ Umami views should use responsive grid Active needs to be a hard blocker here, we could do it after a recipe conversion too, but also it's nearly ready and just needs review. Didn't realise there was already progress on this issue.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts
  • Status changed to Active 7 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch
Production build 0.71.5 2024