Style ajax throbber with Rivet Loading Indicator

Created on 17 November 2023, 12 months ago

Problem/Motivation

The default Drupal form input autocomplete throbber GIF is low quality and should be replaced with the Rivet Loading Indicator.

Proposed resolution

The Rivet loading indicator is specified using modern techniques (animated CSS):

<div class="rvt-loader rvt-loader--xs" aria-label="Content loading"></div>

However, there is no way to position such an external DOM element as part of an <input> field. Therefore, we must recreate the loader as a GIF of 40px by 40px with a 5px wide thickness on the spinner, rotating at 0.8 seconds, using the Rivet color #006298 (rvt-color-blue / $color-blue-500) design token, and then size it to 20px by 20px for retina screens using background-size.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jwilson3
  • 🇪🇨Ecuador jwilson3

    I recreated the asset here: https://loading.io/asset/703007

    Inactive:

    Active:

    • jwilson3 committed 7d13bf48 on 1.0.x
      Issue #3402302 by jwilson3: Style input autocomplete throbber with Rivet...
  • 🇪🇨Ecuador jwilson3

    Here is an animated SVG version sized to 88px by 88px:

    <svg xmlns="http://www.w3.org/2000/svg" style="shape-rendering: auto; animation-play-state: running; animation-delay: 0s;" width="88" height="88" viewBox="0 0 100 100"><circle cx="50" cy="50" fill="none" stroke="#006298" stroke-width="11" r="44" stroke-dasharray="210 70" style="animation-play-state: running; animation-delay: 0s;"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="0.8s" values="0 50 50;360 50 50" keyTimes="0;1" style="animation-play-state: running; animation-delay: 0s;"></animateTransform></circle></svg>
    

    And a version ready for CSS:

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='shape-rendering: auto; animation-play-state: running; animation-delay: 0s;' width='88' height='88' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' fill='none' stroke='%23006298' stroke-width='11' r='44' stroke-dasharray='210 70' style='animation-play-state: running; animation-delay: 0s;'%3E%3CanimateTransform attributeName='transform' type='rotate' repeatCount='indefinite' dur='0.8s' values='0 50 50;360 50 50' keyTimes='0;1' style='animation-play-state: running; animation-delay: 0s;'%3E%3C/animateTransform%3E%3C/circle%3E%3C/svg%3E");
    
    • jwilson3 committed 5794574e on 1.0.x
      Issue #3402302 by jwilson3: Style input autocomplete throbber with SVG...
    • jwilson3 committed 7aebe7dc on 1.0.x
      Issue #3402302 by jwilson3: Style ajax throbber with Rivet Loading...
  • Status changed to Fixed 12 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024