Problem/Motivation

In #3615152: Restore real main page content in the Page Layout preview, without reinstating draft injection on public routes we changed context on sources because currently:

we are only able to pick them thanks to the UI Patterns specific context_requirements attribute. We will deprecate context_requirements soon to promote "normal" Drupal contexts instead: #3608162: Tidy source contexts

Need to do the same with views sources.

Proposed resolution

As per Page sources: add a named context definition to each source, provide the matching context from ViewDisplay::getRuntimeContexts(), keep context_requirements until upstream drops it.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Component: Code » display_builder_views
pdureau’s picture

it is already in progress in #3542796: Preview of view sources:

  context_definitions: [
    'ui_patterns_views:view_entity' => new EntityContextDefinition('entity:view'),
    'display' => new ContextDefinition('string'),
  ],
)]
mogtofu33’s picture

Status: Active » Closed (duplicate)
Related issues: +#3542796: Preview of view sources

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.