Skip to content
Snippets Groups Projects

Issue #3109289: MediaEmbed conflates default view mode with user-selected view mode

Open Issue #3109289: MediaEmbed conflates default view mode with user-selected view mode
4 unresolved threads
4 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
124 124 sequence:
125 125 type: string
126 126 label: 'View mode'
127 default_view_mode_9301:
  • Wondering if we should keep this name, or make it something like fallback_view_mode, and describe it as "The view mode to use if there is no data-view-mode attribute". If we expect to eventually discard this setting (i.e., when media_update_9301() is removed), then maybe default_view_mode_9301 makes more sense. Thoughts?

  • Please register or sign in to reply
  • 295 284 return NULL;
    296 285 }
    297 286
    298 $filter_default_view_mode = $media_embed_filter->settings['default_view_mode'];
    287 $filter_default_view_mode = $media_embed_filter->settings['default_view_mode_9301'];
  • 180 181 '#element_validate' => [[static::class, 'validateOptions']],
    181 182 ];
    182 183
    184 $form['default_view_mode_9301'] = [
  • 287 293 foreach ($xpath->query('//drupal-media[@data-entity-type="media" and normalize-space(@data-entity-uuid)!=""]') as $node) {
    288 294 /** @var \DOMElement $node */
    289 295 $uuid = $node->getAttribute('data-entity-uuid');
    290 $view_mode_id = $node->getAttribute('data-view-mode') ?: $this->settings['default_view_mode'];
    296 $view_mode_id = $node->getAttribute('data-view-mode') ?: $this->settings['default_view_mode_9301'];
    • This, also, could use a comment to explain that data-view-mode is a required attribute, but if for some reason we don't have it, we want to use the fallback.

    • Please register or sign in to reply
  • Adam Bramley added 2 commits

    added 2 commits

    • 838590da - Enable filter module.
    • 936115e3 - Add comments to make it clear what the new setting does in every place it is used.

    Compare with previous version

  • Dave Long added 1 commit

    added 1 commit

    • f80a3826 - Reorder config to satisify DemoUmamiProfileTest.

    Compare with previous version

  • Please register or sign in to reply
    Loading