Skip to content

Commit

Permalink
Protect: Fix manual scans section link button loading state (#38897)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta authored Aug 18, 2024
1 parent 93c4a46 commit 3224c19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Improves the manual scan link button loading state
19 changes: 8 additions & 11 deletions projects/plugins/protect/src/js/components/threats-list/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Text,
} from '@automattic/jetpack-components';
import { useDispatch } from '@wordpress/data';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import React, { useCallback, useState } from 'react';
import useProtectData from '../../hooks/use-protect-data';
Expand Down Expand Up @@ -145,17 +144,15 @@ const ThreatsList = () => {
<>
<div ref={ setUnderstandSeverityPopoverAnchor }>
<PaidList list={ list } />
<Text className={ styles[ 'manual-scan' ] } variant="body-small">
{ createInterpolateElement(
__(
'If you have manually fixed any of the threats listed above, <manualScanLink>you can run a manual scan now</manualScanLink> or wait for Jetpack to scan your site later today.',
<div className={ styles[ 'manual-scan' ] }>
<Text variant="body-small" mb={ 4 }>
{ __(
'If you have manually fixed any of the threats listed above, you can run a manual scan now or wait for Jetpack to scan your site later today.',
'jetpack-protect'
),
{
manualScanLink: <ScanButton variant="link" />,
}
) }
</Text>
) }
</Text>
<ScanButton />
</div>
</div>
<OnboardingPopover
id="paid-understand-severity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,6 @@
.manual-scan {
margin: calc( var( --spacing-base ) * 4 ) calc( var( --spacing-base ) * 8 ); // 32px | 64px
text-align: center;

> button span {
font-size: var( --font-body-small );
font-weight: normal;
color: var( --jp-gray-70 );
}

button:hover:not(:disabled) {
text-decoration-line: none;
}

button:focus:not(:disabled) {
box-shadow: none;
}
}

@media ( max-width: 599px ) {
Expand Down

0 comments on commit 3224c19

Please sign in to comment.