Skip to content

Image: Shorthand syntax should enable functionality and UI for the lightbox #54635

@artemiomorales

Description

@artemiomorales

The following shorthand syntaxes are currently filtered out when specified in theme.json, so we are unable to use them for configuring the lightbox:

"settings": {
    "lightbox": true
}
"settings": {
    "blocks": {
        "core/image": {
            "lightbox": true
         }
    }
}

Presumably, these would be shorthand for the following:

"settings": {
    "lightbox": {
        "enabled": false,
        "allowEditing": true
    }
}
"settings": {
    "blocks": {
        "core/image": {
            "lightbox": {
                "enabled": false,
                "allowEditing": true
            }
         }
    }
}

The following values are likewise filtered out:

"settings": {
    "lightbox": false
}
"settings": {
    "blocks": {
        "core/image": {
            "lightbox": false
         }
    }
}

These could be shorthand for the following:

"settings": {
    "lightbox": {
        "enabled": false,
        "allowEditing": false
    }
}
"settings": {
    "blocks": {
        "core/image": {
            "lightbox": {
                "enabled": false,
                "allowEditing": false
            }
         }
    }
}

We should determine what needs to change in the codebase to allow for this shorthand syntax, determine what the behavior should be, decide whether we should indeed support the shorthand syntax or not and, if so, implement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions