Indiciate when layout-builder handles rendering

Created on 10 March 2024, 10 months ago
Updated 24 May 2024, 7 months ago

(being lazy and just copying comment #6, for now)

Indeed we need to

indicate that in the UI as well IF settings are not taking effect since layout builder is taking over

but per https://git.drupalcode.org/project/custom_elements/-/merge_requests/40#n... that can be done also by hiding the CE display altogether.

This is true...
(I first thought "but some code could still be using it". Well that's technically true, but who would configure a CE display with the same view mode name as one that is taken over by Layout builder? That's just dumb.)
...but likely not hide the default, if the default is taken over by Layout Builder?

For the rest:

  • I think we probably need to give some message if the default view mode is disabled.
  • The checkboxes for enabling/disabling view modes need to work the same as with 'normal' display modes. When I tested, they were not working.
  • And unlike 'normal' displays, there needs to also be a checkbox to disable the default! This is an alpha-blocker.
  • The 'formatter' column needs to be removed. (Per 📌 Add support for field formatters Active we'll see them in the 'Custom Element Formatter' column.)
📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇭🇺Hungary junkuncz Budapest

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

Merge Requests

Comments & Activities

  • Issue created by @junkuncz
  • 🇭🇺Hungary junkuncz Budapest
  • 🇭🇺Hungary junkuncz Budapest
  • 🇭🇺Hungary junkuncz Budapest
  • 🇦🇹Austria fago Vienna

    So when a view-mode is layout-builder enabled, it should be rendered via this code, not via the new configuration. I think the rendering path is easy / given to solve, but what we probably want to indicate that in the UI as well IF settings are not taking effect since layout builder is taking over.

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    I'm emptying out this issue's description, and just going from the last comment.

    Indeed we need to

    indicate that in the UI as well IF settings are not taking effect since layout builder is taking over

    but per https://git.drupalcode.org/project/custom_elements/-/merge_requests/40#n... that can be done also by hiding the CE display altogether.

    This is true...
    (I first thought "but some code could still be using it". Well that's technically true, but who would configure a CE display with the same view mode name as one that is taken over by Layout builder? That's just dumb.)
    ...but likely not hide the default, if the default is taken over by Layout Builder?

    For the rest:

    • I think we probably need to give some message if the default view mode is disabled.
    • The checkboxes for enabling/disabling view modes need to work the same as with 'normal' display modes. When I tested, they were not working.
    • And unlike 'normal' displays, there needs to also be a checkbox to disable the default! This is an alpha-blocker.
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Merge request !44Resolve #3426888 "Fix editing ui" → (Merged) created by junkuncz
  • Pipeline finished with Success
    8 months ago
    Total: 302s
    #159717
  • Status changed to Needs work 8 months ago
  • 🇦🇹Austria fago Vienna

    hmm. what is the use-case of disabling the default disable? I think we should simply disallow it.

    thus changing issue title back. I think we should do the following here:

    * Clarify how disable entity displays works and should work. Afaik there is no UI/feature to disable them in core? or is it the toggle of enabling/hiding the display tab of a view-mode config that enables/disables it? I think we should simply follow core here and to the same.

    * Default display. Let's follow core and NOT allow disabling a default default display.

    *
    > indicate that in the UI as well IF settings are not taking effect since layout builder is taking over

    Again, let's follow core. When the layout-builder is enabled for the view-mode, we should hide the regular form view mode and point the layout-builder settings, like core does.

  • Pipeline finished with Success
    8 months ago
    Total: 174s
    #164199
  • Pipeline finished with Success
    8 months ago
    Total: 175s
    #164210
  • Pipeline finished with Canceled
    8 months ago
    #164244
  • Pipeline finished with Success
    8 months ago
    Total: 166s
    #164245
  • Pipeline finished with Canceled
    8 months ago
    Total: 83s
    #164263
  • Pipeline finished with Success
    8 months ago
    Total: 287s
    #164267
  • Pipeline finished with Success
    8 months ago
    Total: 300s
    #164272
  • Pipeline finished with Success
    8 months ago
    Total: 227s
    #167123
  • Pipeline finished with Success
    8 months ago
    Total: 253s
    #167200
  • Pipeline finished with Success
    8 months ago
    #167397
  • Pipeline finished with Success
    8 months ago
    Total: 271s
    #167411
  • Pipeline finished with Success
    8 months ago
    Total: 202s
    #167447
  • Pipeline finished with Success
    8 months ago
    Total: 174s
    #167465
  • Pipeline finished with Canceled
    8 months ago
    Total: 163s
    #167474
  • Pipeline finished with Success
    8 months ago
    #167475
  • Pipeline finished with Success
    8 months ago
    Total: 177s
    #168599
  • Pipeline finished with Success
    8 months ago
    Total: 178s
    #168673
  • Pipeline finished with Canceled
    8 months ago
    Total: 71s
    #168790
  • Pipeline finished with Success
    8 months ago
    #168791
  • Pipeline finished with Success
    8 months ago
    Total: 203s
    #168799
  • 🇭🇺Hungary junkuncz Budapest

    Changes:

    - CE display is prepared for the case when layout_builder module is enabled (hidden form + "Manage Layout" button)
    - Views modes are following core approach so "default" one cannot be deleted
    - Broken access handler for CE display is fixed

  • Pipeline finished with Success
    8 months ago
    Total: 171s
    #168826
  • Pipeline finished with Success
    8 months ago
    Total: 173s
    #168841
  • 🇦🇹Austria fago Vienna

    thx, changes work well, so merged.

    But I think the sole button is not good UX. We need to explain the user why the button is there. Something like

    "Layout builder is enabled for this view mode. Thus, the configured layout is rendered is getting rendered in a custom element. Configure the layout to customize how the element should be built."

    Then show the button?

  • Merge request !53Add help text → (Merged) created by junkuncz
  • Pipeline finished with Success
    8 months ago
    Total: 169s
    #169372
  • 🇭🇺Hungary junkuncz Budapest

    Yes, added it.

    See: MR 53.

  • Status changed to Needs review 8 months ago
  • 🇭🇺Hungary junkuncz Budapest
  • Status changed to Fixed 8 months ago
  • 🇦🇹Austria fago Vienna

    thx, slightly improved the text and merged it!

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

Production build 0.71.5 2024