aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/design-system
diff options
context:
space:
mode:
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>2023-08-18 13:23:09 +0200
committersonartech <sonartech@sonarsource.com>2023-08-22 20:03:04 +0000
commit67a3d42f2042c9dd14079611de083ca2b1aa4549 (patch)
tree1f35aff07fa173c62192991c5dfa72f66dd3185b /server/sonar-web/design-system
parent265b33682fc23b83ab8bb693f78c98478660f5be (diff)
downloadsonarqube-67a3d42f2042c9dd14079611de083ca2b1aa4549.tar.gz
sonarqube-67a3d42f2042c9dd14079611de083ca2b1aa4549.zip
SONAR-19465 Hiding spinner when loading is not true
Diffstat (limited to 'server/sonar-web/design-system')
-rw-r--r--server/sonar-web/design-system/src/components/Spinner.tsx8
-rw-r--r--server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap8
2 files changed, 6 insertions, 10 deletions
diff --git a/server/sonar-web/design-system/src/components/Spinner.tsx b/server/sonar-web/design-system/src/components/Spinner.tsx
index aa5db5e1415..56307583627 100644
--- a/server/sonar-web/design-system/src/components/Spinner.tsx
+++ b/server/sonar-web/design-system/src/components/Spinner.tsx
@@ -50,12 +50,8 @@ export function Spinner(props: React.PropsWithChildren<Props>) {
return (
<>
- <div className="sw-overflow-hidden">
- <StyledSpinner
- aria-live="polite"
- className={classNames(className, { 'a11y-hidden': !loading })}
- role="status"
- >
+ <div className={classNames('sw-overflow-hidden', { 'a11y-hidden': !loading })}>
+ <StyledSpinner aria-live="polite" className={className} role="status">
{loading && <span className="a11y-hidden">{ariaLabel}</span>}
</StyledSpinner>
</div>
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 13e1e90ab13..6e5b303b58c 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,11 +55,11 @@ exports[`should render with primary and secondary buttons 1`] = `
class="emotion-0 emotion-1"
>
<div
- class="sw-overflow-hidden"
+ class="sw-overflow-hidden a11y-hidden"
>
<div
aria-live="polite"
- class="a11y-hidden emotion-2 emotion-3"
+ class="emotion-2 emotion-3"
role="status"
/>
</div>
@@ -132,11 +132,11 @@ exports[`should render with secondary button 1`] = `
class="emotion-0 emotion-1"
>
<div
- class="sw-overflow-hidden"
+ class="sw-overflow-hidden a11y-hidden"
>
<div
aria-live="polite"
- class="a11y-hidden emotion-2 emotion-3"
+ class="emotion-2 emotion-3"
role="status"
/>
</div>