]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19465 Hiding spinner when loading is not true
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>
Fri, 18 Aug 2023 11:23:09 +0000 (13:23 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 22 Aug 2023 20:03:04 +0000 (20:03 +0000)
server/sonar-web/design-system/src/components/Spinner.tsx
server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap

index aa5db5e1415d0b3258d490984452ca9737837f4c..563075836270d0babf3cf455c27f440484847f36 100644 (file)
@@ -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>
index 13e1e90ab13a9b437ada216473f111752da4896d..6e5b303b58c012b008c15c5bdc6a42208177bffd 100644 (file)
@@ -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>