Change record status: 
Project: 
Introduced in branch: 
3.x
Introduced in version: 
3.0.0-alpha2
Description: 

The WebformElementMarkupBase interface previously carried two unrelated fields: markup (the rendered HTML an element outputs) and displayOn (where the element is shown). Display-only elements such as messages, labels, "more" disclosures and embedded views implemented this interface only for displayOn, so they exposed a markup field that was always null.

These two concerns are now split. displayOn lives on a new WebformElementDisplayOnBase interface, implemented by every element that carries a display setting: messages, labels, "more" disclosures, embedded views, horizontal rules, variants and computed elements. WebformElementMarkupBase keeps only markup and is implemented just by the elements that render authored HTML (WebformElementWebformMarkup and WebformElementProcessedText). As a result, WebformElementWebformMessage, WebformElementLabel, WebformElementWebformMore and WebformElementView no longer expose markup. displayOn is also no longer declared on WebformElementComputedBase; computed elements reach it through WebformElementDisplayOnBase.

This affects you if your queries select displayOn through the WebformElementMarkupBase or WebformElementComputedBase interfaces, or select markup on any of the four display-only element types. Move displayOn selections to WebformElementDisplayOnBase and drop markup from the display-only types; for messages, read the body from messageBody instead. If you generate types from the schema, regenerate them.

Introduced in #3601415: Expose displayOn on a dedicated WebformElementDisplayOnBase.

Query before

query {
  webformById(id: "my_form") {
    form {
      elements {
        ... on WebformElementMarkupBase {
          markup
          displayOn
        }
        ... on WebformElementWebformMessage {
          markup
          messageBody
        }
      }
    }
  }
}

Query after

query {
  webformById(id: "my_form") {
    form {
      elements {
        ... on WebformElementMarkupBase {
          markup
        }
        ... on WebformElementDisplayOnBase {
          displayOn
        }
        ... on WebformElementWebformMessage {
          messageBody
        }
      }
    }
  }
}
Impacts: 
Themers