Problem/Motivation

If I enable the field but do not configure any visibility conditions for a field, is it possible to not export all the empty configuration:

third_party_settings:
  field_visibility_conditions:
    config_pages_values_access:
      id: config_pages_values_access
    request_path:
      id: request_path
      negate: false
      pages: ''
    current_theme:
      id: current_theme
      negate: false
      theme: claro
    response_status:
      id: response_status
      negate: false
      status_codes: {  }
    user_role:
      id: user_role
      negate: false
      context_mapping:
        user: '@user.current_user_context:current_user'
      roles: {  }
    'entity_bundle:config_pages':
      id: 'entity_bundle:config_pages'
      negate: false
      context_mapping: {  }
      bundles: {  }
    'entity_bundle:crop':
      id: 'entity_bundle:crop'
      negate: false
      context_mapping: {  }
      bundles: {  }
    'entity_bundle:media':
      id: 'entity_bundle:media'
      negate: false
      context_mapping: {  }
      bundles: {  }
    'entity_bundle:menu_link_content':
      id: 'entity_bundle:menu_link_content'
      negate: false
      context_mapping: {  }
      bundles: {  }
    'entity_bundle:node':
      id: 'entity_bundle:node'
      negate: false
      context_mapping:
        node: '@node.node_route_context:node'
      bundles: {  }
    'entity_bundle:redirect':
      id: 'entity_bundle:redirect'
      negate: false
      context_mapping: {  }
      bundles: {  }
    'entity_bundle:taxonomy_term':
      id: 'entity_bundle:taxonomy_term'
      negate: false
      context_mapping:
        taxonomy_term: '@taxonomy_term.taxonomy_term_route_context:taxonomy_term'
      bundles: {  }

All this means "no conditions". Would it be better to have like a checkbox for "Enable field visibility conditions" that then if enabled (and exported as a boolean) would then show all the options in the form as well but hides them if the checkbox is unchecked?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dave reid created an issue.