Skip to content

bad-expand

A Saved View’s expand or collapse id is not a node of the View once collapsed to its level, or has no children.

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:19:16 error bad-expand Can't expand "shop:web": it has no children

expand and collapse open or close single Elements once the View is collapsed to its level. An id that isn’t a node of the View, or has no children, can’t be opened or closed, so the View doesn’t show what its author meant.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
cart:
name: Cart
components:
cart-api:
name: Cart API
search:
name: Search
views:
structural:
front:
title: Front
level: c2
include: [web]
expand: [web]

Remove the id, include the Element in the View, or name an Element that has children.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
cart:
name: Cart
components:
cart-api:
name: Cart API
search:
name: Search
views:
structural:
front:
title: Front
level: c2
include: [web, cart]
expand: [cart]
  • unknown-element: A reference names no Element: in to, via, in, a Deployment’s service, or a Saved View’s selectors, expand, collapse or Lens.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.