From b5d4601e01e3109763c8f8c05fe8ce78045c589e Mon Sep 17 00:00:00 2001 From: Ryan Keairns Date: Tue, 29 Oct 2024 19:13:41 -0700 Subject: [PATCH] Change spaces button loading design (#197922) Closes #197916 ## Summary One less loading spinner. Instead, uses a skeleton loader for a load-in-place effect that is visually less busy and jumpy. *Before* *After* https://github.com/user-attachments/assets/33cc2d39-2895-4c53-8903-9c3b18d586f9 --- .../src/ui/loading_indicator.scss | 5 +++++ .../nav_control_popover.test.tsx.snap | 16 +++++++++++----- .../spaces/public/nav_control/nav_control.tsx | 16 ++++++++++++++-- .../public/nav_control/nav_control_popover.tsx | 11 +++++++++-- x-pack/plugins/spaces/tsconfig.json | 3 ++- 5 files changed, 41 insertions(+), 10 deletions(-) diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss index ccf1ecc873fc5..d12331d9c042d 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss @@ -2,3 +2,8 @@ visibility: hidden; animation-play-state: paused; } + +.euiHeaderSectionItem .euiButtonEmpty__text { + // stop global header buttons from jumping during loading state + display: flex; +} \ No newline at end of file diff --git a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap index af2221e460a32..854beab6dfc93 100644 --- a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap +++ b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap @@ -27,11 +27,17 @@ exports[`NavControlPopover renders without crashing 1`] = ` - +
+
+