Roadmap for this module?

Created on 25 April 2023, over 1 year ago
Updated 30 April 2024, 7 months ago

Thanks, Kevin, for this approach to block visibility in Layout Builder.

As per your comment on this core patch for similar functionality, wondering about the roadmap for this module.

https://www.drupal.org/project/drupal/issues/2916876#comment-15021380 ✨ Add visibility control conditions to blocks within Layout Builder Needs work

  1. Do you suggest the use of Context module to be a better approach than the core patch for block visibility in Layout Builder?
  2. Do you expect this module to get security coverage, or will you leave development in the open like Feeds module?

Thanks again for your work on this!

🌱 Plan
Status

Postponed: needs info

Version

1.0

Component

Miscellaneous

Created by

πŸ‡¨πŸ‡¦Canada darkodev

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

Comments & Activities

  • Issue created by @darkodev
  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    A Context is nothing more than a collection of conditions. it can be executed and applied to more than just blocks. They are also reusable. For example, imagine having to set 5 conditions on 10 blocks across a few nodes. This would take longer and be error prone if you don't get all the settings correct. With a Context, you just select it.

    I recently started using Layout Builder for the first time and wanted to get a feature from Acquia Site Studio. They allow applying Contexts to containers, components and elements. Containers are analogous to Layouts, components are analogous to block components. There is no 'elements' equivalent in Layout Builder.

    Here is an edit tray on a container in Site Studio for example:

    Layout Builder Context provides the same effect.

    The one thing I would like to do is get the ability to add multiple Contexts to a layout or block, then it would meet parity IMO.

  • πŸ‡¨πŸ‡¦Canada darkodev

    Thanks for the great comments, Kevin!

    One of the features that we're looking for in the other thread is to allow visibility based on a field's value, for example (we have been doing this in Panels visibility rules in D7 rather than Context).
    Unfortunately, it doesn't work in Layout Builder modal because of an AJAX callback route issue.
    https://www.drupal.org/project/drupal/issues/2916876#comment-14286454 ✨ Add visibility control conditions to blocks within Layout Builder Needs work
    https://www.drupal.org/project/entity_field_condition/issues/3248365 ✨ Core Layout Builder Compatibility - AJAX Error Active

    I suppose this could be tackled in a Context with the help of your module.

    Time to dive back into Context module after many years away ...

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    Yes, that is because the form structure for block visibility and context is different.

    My general advice was to try and avoid using AJAX in those forms at all. I posted a workaround here:

    https://www.drupal.org/project/entity_field_condition/issues/3278442#com... πŸ› fields of bundle are not loaded when using Context UI Needs review

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    These two additions were put in quickly today:

    After this point it is likely just code cleanup and testing.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    I think it seems close at this point, but there are two issues I think need to be resolved:

    The second one seems like Layout Builder behavior I am not quite familiar with.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    Just tagged a beta release with decent test coverage.

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    What other features could there be? Interested in ideas. My use case is more or less met. Although I am interested to see how it works in real Layout Builder driven projects.

  • πŸ‡ΊπŸ‡ΈUnited States crutch

    This is great. We are launching a 9.5.9 site tonight with layout builder, first time. Will need to try this module out next week. Yes #4 is what we need.

    The issue we have right now, panels vs layout builder, is that when a view block is displayed on a page and there is no result, but there's actually a result in the view is some way, there is no way to hide the block with views or layout builder.

    With Panels we could use visibility conditions to hide the block based on the value of a field of a node. But panels had a single item or entity where the condition could be set on the node variant. Layout builder could have a single item or entity where conditions could be set. When using "Allow each content item to have its layout customized." then it seems it wouldn't make sense for conditions to be used.

  • πŸ‡ΊπŸ‡ΈUnited States amanire

    This is a great little module. An important UI feature that I would like is a way to filter the list of contexts. Some of the contexts are created for other purposes and are irrelevant and inappropriate to use within layout builder. I'd like to minimize any confusion for our content admins. Layout builder is confusing enough as it is! It could be an option on a per context basis but I like the idea of associating it with one or more context groups.

Production build 0.71.5 2024