Commit 312cdad5 authored by narendraR's avatar narendraR Committed by Ben Mullins
Browse files

Issue #3284341 by narendraR: BrowserController render array should return a spinner

parent 572b5579
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -19,3 +19,14 @@ function project_browser_help($route_name, RouteMatchInterface $route_match) {
      return $output;
  }
}

/**
 * Implements hook_theme().
 */
function project_browser_theme() {
  return [
    'project_browser_main_app' => [
      'variables' => [],
    ],
  ];
}
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ class BrowserController extends ControllerBase {
    }

    return [
      '#markup' => '<div id="project-browser"></div>',
      '#theme' => 'project_browser_main_app',
      '#attached' => [
        'library' => [
          'project_browser/svelte',
+67 −0
Original line number Diff line number Diff line
@@ -19,3 +19,70 @@
#block-seven-content .button--primary {
    height: 2.5em;
}

/**
 *  CSS for initial loader.
 *  Copied from themes/claro/css/components/ajax-progress.module.css
 *  @see https://git.drupalcode.org/project/project_browser/-/merge_requests/155#note_99327
 */
.ajax-progress {
  display: inline-block;
}

.ajax-progress__throbber {
  box-sizing: border-box;
  width: 1.125rem;
  height: 1.125rem;
  animation: claro-throbber 0.75s linear infinite;
  border: 2px solid #003cc5;
  border-right: 2px dotted transparent;
  border-radius: 50%;
}

.ajax-progress--fullscreen {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: 3.5rem; /* 56px */
  height: 3.5rem;
  margin: -1.75rem;
  border: 1px solid rgba(216, 217, 224, 0.8);
  border-radius: 3.5rem;
  background: #fff;
  box-shadow: 0 0.25rem 0.625rem rgba(34, 35, 48, 0.1);
}

.ajax-progress__throbber--fullscreen {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.75rem; /* 28px */
  height: 1.75rem; /* 28px */
  margin: -0.875rem;
  content: '';
  border: 3px solid #003cc5;
  border-right: 3px dotted transparent;
}

@media screen and (-ms-high-contrast: active) {
  /**
   * Throbber animation is shaky on Edge RTL on high contrast for border width
   * less than 4px.
   */
  @supports (-ms-ime-align: auto) {
    [dir='rtl'] .ajax-progress__throbber {
      border-width: 4px;
    }
  }
}

@keyframes claro-throbber {
  0% {
    transform: rotateZ(0);
  }
  100% {
    transform: rotateZ(360deg);
  }
}
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

Loading