- Issue created by @plopesc
- Merge request !9724Issue #3478224: Provide Config Action to add new blocks to navigation from recipes β (Closed) created by plopesc
- πͺπΈSpain plopesc Valladolid
First shot for this one.
It allows to provide a recipe like this:
name: Navigation Block Test Recipe type: Examples description: 'Adds a block to Navigation.' install: - dashboard config: actions: navigation.block_layout: addNavigationBlock: position: 1 configuration: id: 'navigation_menu:content' label: Content From Recipe label_display: 1 provider: navigation level: 1 depth: 2
After applying the recipe, a new block with the settings described above is added to the Navigation.
This one needs tests and some extra work, but let's open the discussion about it.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
I hoped we could do this generically or at least provide a trait in layout builder so we don't repeat ourselves. See β¨ Provide a Config Action to add/edit a component in a layout Active . I have some WIP for that one that I will upload before next week.
- πͺπΈSpain plopesc Valladolid
Thank you for bringing up that issue, I was unaware of it. Definitely avoid reinventing the wheel should be a priority.
Navigation use case might differ a bit, given that sections and regions are more limited than in other scenarios. I'm pretty sure we could take advantage of that trait, though.
This initial approach is a proof of concept to validate the approach. More than happy to readjust it to be based on the code in the mentioned issue once it is ready.
Thanks!
- πͺπΈSpain plopesc Valladolid
This will be probably necessary for Starshot.
- πͺπΈSpain plopesc Valladolid
Initial approach including base test coverage.
- π΅π±Poland dmitry.korhov Poland, Warsaw
smustgrave β credited dmitry.korhov β .
- πΊπΈUnited States smustgrave
Appears to have some open threads
Also tagging for a change record.
- π¨π¦Canada m4olivei Grimsby, ON
MR looks pretty good. The other core issue, β¨ Provide a Config Action to add/edit a component in a layout Active is moving along since last mentioned here. When I looked over it, it seems like it would cover our use case. It's also been marked as a Starshot blocker, so the timeline should fit our needs here.
@plopsec, what do you think? If it covers everything we need, this issue would no longer be relevant correct?
- πͺπΈSpain plopesc Valladolid
@m4olivei The way LB is implemented in Navigation, nested in a different config entity makes impossible to use the trait approach described in β¨ Provide a Config Action to add/edit a component in a layout Active .
We discovered it when I tried to apply it to this one. See comments #6 & #7 in β¨ Provide a Config Action to add/edit a component in a layout Active .
If we want to provide config actions for Navigation, with the tools we have today, it should be based on a custom plugin.
- π¨π¦Canada m4olivei Grimsby, ON
@m4olivei The way LB is implemented in Navigation, nested in a different config entity makes impossible to use the trait approach described in #3475115: Provide a Config Action to add a component in a layout.
Ahh, now I understand. Thanks for explaining that. Our LB configuration is in simple config, whereas the config action in β¨ Provide a Config Action to add/edit a component in a layout Active needs to work on config entities.
I'll work on the remaining feedback here.
- π¨π¦Canada m4olivei Grimsby, ON
All threads are addressed. Looking good to me. Setting to Needs review.
- πΊπΈUnited States phenaproxima Massachusetts
This seems straightforward enough to me. I have a few minor points but otherwise I'd say RTBC.
- πͺπΈSpain plopesc Valladolid
Thank you for your review. Feedback addressed.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
I've reviewed the code, checked all the feedback and verified it was resolved.
This unblocks some usecases for the dashboard contrib module too.
So RTBC. - Status changed to RTBC
20 days ago 12:36pm 2 December 2024 - First commit to issue fork.
- π¬π§United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 11.1.x, thanks!
- πͺπΈSpain plopesc Valladolid
plopesc β changed the visibility of the branch 3478224-proof-of-concept to hidden.
Automatically closed - issue fixed for 2 weeks with no activity.