- Issue created by @penyaskito
- 🇮🇳India Sahana _N
Hi @penyaskito,
Can you please provide more details in the issue summary?Thanks !!
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Config action documentation:
https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/do... - 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
I've been thinking a bit about this one and probably layout builder itself would need to support this (and we would build on top of it if even anything is needed).
Might be postponed on that, I still need to investigate if that's something that has been considered (great having @thejimbirch around!) - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
My understanding is that there hasn’t been any layout builder config actions work. We may need to create an issue for layout builder that this issue will be postponed on.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
I created an issue in the layout builder issue queue that you can postpone upon.
- Merge request !25Issue #3449266: Provide a config action for adding a block to a dashboard. → (Open) created by penyaskito
- Status changed to Needs review
5 months ago 4:30am 18 September 2024 - 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
As we might need something for 10.3.x, and don't think that would be backported, I've crafted something that eventually could be moved to layout builder.
I'm not even sure if layout builder can provide this OOTB to every entity using it. Might be able to make it easier, but not 100% sure it can provide the action itself.
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
@thejimbirch With this I can create a recipe like:
name: Dashboard Test Recipe type: Examples description: 'Adds a block to a recipe.' install: - dashboard config: actions: dashboard.dashboard.test: addBlock: section: 0 position: 1 value: uuid: ab6caaa0-9c46-4a30-aa34-18d5eab917c3 id: dashboard_text_block label: 'Dashboard Block via Config Action' label_display: 'visible' provider: 'dashboard' region: layout_twocol_section: 'second' default_region: content context_mapping: { } text: value: '<p>This block was added via a config action</p>' format: 'basic_html'
And after running
ddev . php core/scripts/drupal recipe recipes/dashboard_test_recipe
I get - 🇪🇸Spain plopesc Valladolid
Took a look and code looks great!
Neat and simpler than I expected.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Very cool!
This may come with your @TODO for weights as I suspect you used this as inspiration, but in the placeBlock... block action, they allow you to use
first
andlast
. It would be great if you could do that for bothsection
andposition
.https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/block...
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
This should be fixed once ✨ Provide a Config Action to add/edit a component in a layout Active lands. Postponing this on that, but probably this will be just closed.
- Status changed to Postponed
2 months ago 6:34am 26 November 2024 - 🇦🇺Australia pameeela
This isn't a blocker because we don't have any examples of recipes that are ready to do this, but it will be nice to have.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Since the SEO dashboard was removed, the idea is to use this. But since it is not possible yet, no work has been done for it yet.
- 🇦🇺Australia pameeela
@thejimbirch I see, sorry I really did not have that on my radar. We also have a rough idea to add blocks for content publishing, but haven't really defined it.
Do you want to make an issue for the SEO blocks to be added so that we can begin to discuss it? The planning/design step is quite important so we can look at that now to be ready when this is unblocked.
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
For the record:
Nothing _should_ need to happen here if ✨ Provide a Config Action to add/edit a component in a layout Active lands in core.
If we need to do this here as a workaround before a new Drupal core release, we still would need
SectionListTrait::setSection()
to be public for it.