From e9be88828ff5031004bba0ff0d46baf20dc781f9 Mon Sep 17 00:00:00 2001 From: Revanshu Paliwal Date: Tue, 13 Jun 2023 13:31:24 +0200 Subject: [PATCH] SONAR-19174 Updating UI for load more button inside measure page --- .../IssueSourceViewerHeader.tsx | 2 +- .../SourceViewer/SourceViewerCode.tsx | 37 ++++++++----------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx index 736dfd99379..6b98928229a 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx @@ -126,7 +126,7 @@ function IssueSourceViewerHeader(props: Props & ThemeProp) { Icon={CopyIcon} aria-label={translate('source_viewer.click_to_copy_filepath')} data-clipboard-text={path} - className="sw-h-6 sw-mr-2" + className="sw-h-6 sw-mx-2" innerRef={setCopyButton} /> diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx index fc1dc04f3c1..9f53f638091 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SonarCodeColorizer } from 'design-system'; +import { ButtonSecondary, DeferredSpinner, LightLabel, SonarCodeColorizer } from 'design-system'; import * as React from 'react'; -import { Button } from '../../components/controls/buttons'; import { decorateWithUnderlineFlags } from '../../helpers/code-viewer'; import { translate } from '../../helpers/l10n'; import { BranchLike } from '../../types/branch-like'; @@ -285,21 +284,18 @@ export default class SourceViewerCode extends React.PureComponent
{hasSourcesBefore && ( -
+
{loadingSourcesBefore ? ( -
- - +
+ + {translate('source_viewer.loading_more_code')} - +
) : ( - + )}
)} @@ -327,21 +323,18 @@ export default class SourceViewerCode extends React.PureComponent {hasSourcesAfter && ( -
+
{loadingSourcesAfter ? ( -
- - +
+ + {translate('source_viewer.loading_more_code')} - +
) : ( - + )}
)} -- 2.39.5