From 6e895b3ff3b59eb582e5408bcc765bd505f7dd2e Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Thu, 5 Oct 2023 11:58:17 +0200 Subject: [PATCH] SONAR-20177 fix spinner sr-only state overflowing container --- .../design-system/src/components/Spinner.tsx | 12 ++++---- .../__snapshots__/ModalFooter-test.tsx.snap | 28 ++++++++++++------- .../js/apps/users/__tests__/UsersApp-it.tsx | 6 ++-- .../__snapshots__/Checkbox-test.tsx.snap | 6 ++-- .../src/main/js/components/ui/Spinner.tsx | 4 +-- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/server/sonar-web/design-system/src/components/Spinner.tsx b/server/sonar-web/design-system/src/components/Spinner.tsx index efe6c2ed378..4e0b4305c6e 100644 --- a/server/sonar-web/design-system/src/components/Spinner.tsx +++ b/server/sonar-web/design-system/src/components/Spinner.tsx @@ -50,12 +50,12 @@ export function Spinner(props: React.PropsWithChildren) { return ( <> -
- - {loading && {ariaLabel}} - +
+
+ + {loading && {ariaLabel}} + +
{!loading && (children ?? (placeholder && ) ?? null)} diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap b/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap index b383c11c39b..f12e392fd28 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap +++ b/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap @@ -55,13 +55,17 @@ exports[`should render with primary and secondary buttons 1`] = ` class="emotion-0 emotion-1" >
+ class="sw-overflow-hidden sw-sr-only" + > +
+