Improve checkboxes visibility in UI

Created on 18 September 2024, 2 months ago

Problem/Motivation

Invisibility of things, which is fixed by below

Proposed resolution

On non-default CE displays, do not hide the Layout Builder checkbox if the 'specific' core display doesn't exist AND 'default' core display has LB enabled.

On 'default' CE displays,

  • Do not make "auto processing" invisible if "Use Layout Builder" is enabled. Add wording about how "auto processing" might still be used by non-default view modes. (So: it should be editable.)
  • Do not make "Use Layout Builder" setting invisible if 'default' core display doesn't have LB enabled. but any of the non-default view modes has a core display with LB enabled, and has no own CE display. (So: LB setting from default will be used, and should be editable.)

*
*

🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

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

Merge Requests

Comments & Activities

  • Issue created by @roderik
  • Status changed to Needs work 2 months ago
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    Pushed fix for "On non-default CE displays" fixed, but it will conflict with Configurable tag name for elements built using layouts Needs review once that's merged. The rest still needs doing.

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

    I've force-pushed over the first commit, which was incomplete and needed a broader solution.

    This code is convoluted, arguably ugly and hard to maintain. It took me ages to structure and comment the logic in a somewhat-understandable/maintainable way and manually test/tweak the result. I still think it was necessary to spend time on it, because

    • Having "Use layout builder" visible when no view mode uses it, is confusing.
    • Having options invisible when in fact they do make a difference (for at least some of the view modes that use this CE display while building), is unacceptable.

    I blame the convoluted-ness on the structure of configuration. (Having two separate 'layers' of displays each with their "Use Layout Builder" settings to check, combined with default/fallback displays that are used by several view modes, leads to a lot of different things to check / make clear to the user.) I see no way to make that easier and still be able to edit things when we need to.

    So, it is what it is.

    I'm setting this to "needs review" for a while as a sign that the MR is ready, but I'm not going to have anyone review this. It's 'only' form code, and the actual behavior is better than before.

    I had counted on reusing EntityCeDisplay::getConfigDependencyEntityViewDisplays() for some of the logic I needed. But the logic turned out to not be the same, and actually this just had me doubting whether its logic is sound in the first place. So

    • I added more comments to EntityCeDisplay::getConfigDependencyEntityViewDisplays() without changing the logic
    • I made the method protected and removed it from the interface. This should not have any effect on classes that (theoretically) extend the interface / EntityCeDisplay. I'll publish a Change Record just for completeness. I'll comment in 🐛 Config dependencies are not properly calculated Needs work too, that my attempt at being 'smart' has failed.

    This added code has no automated tests and no plans for them, "because only UI anyway". Existing tests were extended in this MR, only because I started to doubt how things worked, while coding... and the tests act as a specification of existing behavior.

    I plan to merge this when I have used this myself more, in upgrading an internal project from CE 3.0.0-beta1 to this new code.

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Pipeline finished with Skipped
    30 days ago
    #317944
    • roderik committed ae99a04f on 3.x
      Issue #3475342 by roderik: Improve CE UI form options visibility and...
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
    • roderik committed 99c27dc5 on 3.x
      Issue #3475342 by roderik: disable useLayoutBuilder in copied CE...
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024