Verified Commit bc08b608 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3493410 by plopesc, catch, smustgrave: Consider a more substantial shortcuts placeholder

parent 74321e2f
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -80,14 +80,6 @@ public function theme($existing, $type, $theme, $path) : array {
    $items['top_bar'] = ['render element' => 'element'];
    $items['top_bar_local_tasks'] = ['variables' => ['local_tasks' => []]];
    $items['top_bar_local_task'] = ['variables' => ['link' => []]];
    $items['big_pipe_interface_preview__navigation_shortcut_lazy_builder_lazyLinks__Shortcuts'] = [
      'variables' => [
        'callback' => NULL,
        'arguments' => NULL,
        'preview' => NULL,
      ],
      'base hook' => 'big_pipe_interface_preview',
    ];
    $items['block__navigation'] = ['render element' => 'elements', 'base hook' => 'block'];
    $items['navigation_menu'] = [
      'base hook' => 'menu',
+11 −1
Original line number Diff line number Diff line
@@ -81,7 +81,17 @@ public function build(): array {
          'contexts' => ['user'],
        ],
        '#lazy_builder_preview' => [
          '#markup' => '<a href="#" class="toolbar-tray-lazy-placeholder-link">&nbsp;</a>',
          [
            '#theme' => 'navigation_menu',
            '#menu_name' => 'shortcuts',
            '#title' => $this->configuration['label'],
            '#items' => [
              [
                'title' => $this->configuration['label'],
                'class' => 'shortcuts',
              ],
            ],
          ],
        ],
      ],
    ];
+0 −21
Original line number Diff line number Diff line
{#
/**
 * @file
 * Placeholder content for the shortcuts menu. This is used to eliminate layout
 * shifts as BigPipe injects data.
 */
#}

{% include 'navigation:toolbar-button' with {
  attributes: create_attribute(),
  modifiers: [
    'expand--side',
    'collapsible',
  ],
  extra_classes: [
    'invisible',
    'toolbar-popover__control',
  ],
  icon: 'shortcuts',
  text: 'Shortcuts'|t,
} only %}
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public function testLogin(): void {
    $recorded_queries = $performance_data->getQueries();
    $this->assertSame($expected_queries, $recorded_queries);
    $this->assertSame(4, $performance_data->getQueryCount());
    $this->assertSame(60, $performance_data->getCacheGetCount());
    $this->assertSame(61, $performance_data->getCacheGetCount());
    $this->assertSame(2, $performance_data->getCacheSetCount());
    $this->assertSame(0, $performance_data->getCacheDeleteCount());
    $this->assertSame(2, $performance_data->getCacheTagChecksumCount());