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.

Issue fork radix-3053579

Command icon 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

jwilson3 created an issue. See original summary.

shadcn’s picture

Assigned: Unassigned » shadcn

Yes. 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.

kevinfunk’s picture

StatusFileSize
new3.98 KB

Here 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.

naveenvalecha’s picture

@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

shadcn’s picture

@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?

naveenvalecha’s picture

Thanks for the quick reply and the efforts you're putting in maintaining the project.

Have you tested @kevinfunk's patch? How far does it take us? Anything still broken?

This worked like a charm for me.
//Naveen

shadcn’s picture

Oh it did? RTBC?

naveenvalecha’s picture

Status: Active » Needs work

As 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.

naveenvalecha’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new590 bytes
new4.04 KB

This patch addresses #3 too. This is a nitpick change so marking it directly as RTBC.
Regards,
Naveen

kevinfunk’s picture

The block filter is broken with the patch from #9.

kevinfunk’s picture

Status: Reviewed & tested by the community » Needs work
kevinfunk’s picture

Status: Needs work » Needs review
StatusFileSize
new4.23 KB

The 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.

bramdriesen’s picture

Status: Needs review » Needs work

Don'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)

kevinfunk’s picture

Hi @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.

damienmckenna’s picture

The layout selector and section settings are also hard to use..

This is a simple default 2 column layout:
Simple section configure form

On a more complicated Bootstrap Layout it becomes even more complicated:
Complex section configure form

kevinfunk’s picture

@DamienMcKenna what module is providing the Bootstrap layout configuration from your images.

damienmckenna’s picture

Bootstrap Layouts.

marcoka’s picture

Applied #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

arx-e’s picture

I 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.

bramdriesen’s picture

Setting 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.

bramdriesen’s picture

Status: Needs work » Needs review
StatusFileSize
new4.4 KB
new1.21 KB

Patch attached.

bramdriesen’s picture

StatusFileSize
new1.21 KB
new3.2 KB

Patched it wrong :) this should be the OK version now.

npoku’s picture

#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?

marcoka’s picture

My 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"

pcambra’s picture

StatusFileSize
new4.4 KB

I think #22 doesn't include one change from #21, which should fix opening the create/edit forms with ajax on Layout Builder

averill’s picture

I 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.

nimoatwoodway’s picture

Tried 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.

pcambra’s picture

Status: Needs review » Reviewed & tested by the community

Setting to RTBC as per the two previous comments :)

dwkitchen made their first commit to this issue’s fork.

bramdriesen’s picture

Status: Reviewed & tested by the community » Needs work

Patch #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.

aleevas’s picture

Status: Needs work » Needs review
StatusFileSize
new4.68 KB
new5.08 KB

Here is my try to update this patch.
I hope now it will be more fit

doxigo made their first commit to this issue’s fork.

  • doxigo committed 591b4218 on 8.x-4.x authored by pcambra
    Issue #3053579 by kevinfunk, jwilson3: Integrate with OffCanvas (Layout...
doxigo’s picture

Status: Needs review » Fixed

No longer supported/outdated, merged the MR, thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.