The offCanvas sidebar from Layout Builder depends on the front-end theme of the site, and because Radix overrides many templates, various elements are broken.
* The block filter is broken.
* Various styles look poor.
* Block names are displayed inline instead of stacked.

| Comment | File | Size | Author |
|---|---|---|---|
| #32 | interdiff_25-32.txt | 5.08 KB | aleevas |
| #32 | 3053579-32.patch | 4.68 KB | aleevas |
| #25 | 3053579-25.patch | 4.4 KB | pcambra |
Issue fork radix-3053579
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
shadcn commentedYes. We need to work on this now. We were waiting for Layout Builder to be out of experimental modules to start working on this.
There's ongoing work right now to get Radix and Radix Layouts to work with Layout Builder. This will be done as part of this.
Comment #3
kevinfunkHere is my first take at fixing the broken block filter and the inline titles.
I was able to get the block filter to work by using
{{ item.link }}instead of<a href="{{ item.link['#url'] }}" class="nav-link">{{ item.link['#title'] }}</a>in links.html.twig. This is not ideal since we are missing the the class nav-link but I haven't found a good solution for adding the class and keeping layout builder's classes, data-dialog-type and data-dialog-renderer.Comment #4
naveenvalecha@arshadcn
We're planning to use the radix in one of the projects. However, we don't find the Layout builder working with the radix. Any plan to get its integration in?
Regards,
Naveen
Comment #5
shadcn commented@naveenvalecha Sure. I have not looked into Layout Builder for a while but I can take a look at it this week and fix the bugs.
Have you tested @kevinfunk's patch? How far does it take us? Anything still broken?
Comment #6
naveenvalechaThanks for the quick reply and the efforts you're putting in maintaining the project.
This worked like a charm for me.
//Naveen
Comment #7
shadcn commentedOh it did? RTBC?
Comment #8
naveenvalechaAs per #3, This resolves the layout builder issue. However, we lost the nav-link class from the link. We need to find a better way to fix it.
Comment #9
naveenvalechaThis patch addresses #3 too. This is a nitpick change so marking it directly as RTBC.
Regards,
Naveen
Comment #10
kevinfunkThe block filter is broken with the patch from #9.
Comment #11
kevinfunkComment #12
kevinfunkThe patch has been updated to use the new offcanvas component that was added in 4.7 instead of creating off_canvas and implements template_preprocess_links to add the nav-links class.
Comment #13
bramdriesenDon't copy paste the fixes added in #3060563: Links templating doesn't respect the locale language Instead refer to them as a pre-requisite for your patch. This will create merge conflicts if the other issue is committed & closed before this one (or vice versa)
Comment #14
kevinfunkHi @BramDriesen, sorry I didn't see you fix before working on this issue. As stated in the other issue, that would have saved me some time :). Let's work together and get both issues fixed.
Comment #15
damienmckennaThe layout selector and section settings are also hard to use..
This is a simple default 2 column layout:

On a more complicated Bootstrap Layout it becomes even more complicated:

Comment #16
kevinfunk@DamienMcKenna what module is providing the Bootstrap layout configuration from your images.
Comment #17
damienmckennaBootstrap Layouts.
Comment #18
marcoka commentedApplied #12, works here so far, also fixes this problem[#3134720]
- Search works again
- Block config is loaded in the sidebar(how it should) NOT on a new page in the admin theme
Comment #19
arx-e commentedI applied the patch in #12 in order to fix the problem described in #3060563 since as I understand this one fixes other issues as well. It works fine for me.
Comment #20
bramdriesenSetting the parent issue. This patch still needs to be reworked since the other patch (which is copy pasted in this patch) is RTBC and will probably be committed soon. Meaning the patch of #12 will no longer apply.
Comment #21
bramdriesenPatch attached.
Comment #22
bramdriesenPatched it wrong :) this should be the OK version now.
Comment #23
npoku commented#22 seems to work. Thank you.
Also, it may just be me, but I now seem to be having issues with modals, especially when using ckeditor. The non-radix admin theme seem to render modal content fine (when there was a new page load), but now that radix is handling the theming because of the off-canvas and modal UI, the styles seem to break. Anyone else having this issue?
Comment #24
marcoka commentedMy mistake again, i updated someting in drupal.
Of course downgrade is not possible because dependency war.FML.This still breaks the layout-builder sidebar making the theme basically unusable with layout builder.
I applied 3053579-22 but that sadly doesnt fix it with 4.10 here. Anyone else tried it on 4.10?
Downgrading btw. is like this "composer require drupal/components:1.0 drupal/radix:4.8"
Comment #25
pcambraI think #22 doesn't include one change from #21, which should fix opening the create/edit forms with ajax on Layout Builder
Comment #26
averill commentedI can confirm #25 enables Layout Builder to function correctly via Ajax. As Layout builder is becoming more mainstream, it would be useful to get this in a release ASAP.
Comment #27
nimoatwoodwayTried to fix the open/close OffCanvas problem for two days... finally came around to this issue and applied patch from #25 and bang, now everything works as expected! Many thanks! U made my day!
Drupal 9.1.4 Installation with default language DE and those modules installed:
* drupal/bootstrap_layout_builder
* drupal/layout_builder_at
drupal/layout_builder_modal does now work too with this patch applied.
Comment #28
pcambraSetting to RTBC as per the two previous comments :)
Comment #31
bramdriesenPatch #25 won't apply anymore since #3060563: Links templating doesn't respect the locale language got merged (just like I said a few times, that's exactly the reason why you don't mix patches into one).
Also the merge request of #30 doesn't look to be as complete as the latest patch.
Comment #32
aleevasHere is my try to update this patch.
I hope now it will be more fit
Comment #35
doxigo commentedNo longer supported/outdated, merged the MR, thanks