Skip to content

Commit b4b2a3e

Browse files
authored
[APP-2179] add image to infotip, text changes (#425)
1 parent f0dce27 commit b4b2a3e

File tree

7 files changed

+28
-20
lines changed

7 files changed

+28
-20
lines changed

modules/scanner/assets/js/components/alt-text-form/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ export const AltTextForm = ({ item, current, setCurrent, setIsEdit }) => {
229229
}
230230
sx={{ mt: isManage ? 0 : 1.5 }}
231231
>
232-
{isGlobal
233-
? __('Apply everywhere', 'pojo-accessibility')
234-
: applyBtnText}
232+
{isGlobal ? __('Apply to all', 'pojo-accessibility') : applyBtnText}
235233
</Button>
236234
</Box>
237235
</Box>

modules/scanner/assets/js/components/color-contrast-form/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ export const ColorContrastForm = ({ item, current, setCurrent, setIsEdit }) => {
173173
sx={{ mt: isManage ? 0 : 1.5 }}
174174
fullWidth={!isManage}
175175
>
176-
{isGlobal
177-
? __('Apply everywhere', 'pojo-accessibility')
178-
: applyBtnText}
176+
{isGlobal ? __('Apply to all', 'pojo-accessibility') : applyBtnText}
179177
</Button>
180178
</Box>
181179
</Box>

modules/scanner/assets/js/components/manage-footer-actions/page/set-global-remediation-modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const SetGlobalRemediationModal = ({
1515
onCancel={hideConfirmation}
1616
logo={false}
1717
title={__('Apply fix across scans?', 'pojo-accessibility')}
18-
approveText={__('Apply everywhere', 'pojo-accessibility')}
18+
approveText={__('Apply to all', 'pojo-accessibility')}
1919
cancelText={__('Cancel', 'pojo-accessibility')}
2020
approveButtonColor="info"
2121
onApprove={onApprove}

modules/scanner/assets/js/components/manage-footer-actions/page/set-global.js

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ import { SetGlobalRemediationModal } from '@ea11y-apps/scanner/components/manage
1313
import { IS_PRO_PLAN, UPGRADE_URL } from '@ea11y-apps/scanner/constants';
1414
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
1515
import { useGlobalManageActions } from '@ea11y-apps/scanner/hooks/use-global-manage-actions';
16+
import infotipImageSrc from '@ea11y-apps/scanner/static/global-infotip-image.png';
1617
import { StyledProChip } from '@ea11y-apps/scanner/styles/app.styles';
17-
import { InfotipBox } from '@ea11y-apps/scanner/styles/manual-fixes.styles';
18+
import {
19+
InfotipBox,
20+
InfotipImage,
21+
} from '@ea11y-apps/scanner/styles/manual-fixes.styles';
1822
import { remediationItem } from '@ea11y-apps/scanner/types/remediation-item';
1923
import { useState } from '@wordpress/element';
2024
import { __ } from '@wordpress/i18n';
@@ -91,17 +95,20 @@ export const SetGlobal = ({
9195
disablePortal: true,
9296
}}
9397
content={
94-
<InfotipBox sx={{ maxWidth: '260px' }}>
95-
<Typography variant="subtitle2" sx={{ mb: 1 }}>
96-
{__('Remember this fix across scans', 'pojo-accessibility')}
97-
</Typography>
98-
<Typography variant="body2" color="text.secondary">
99-
{__(
100-
'Apply this fix automatically to pages already scanned and to future scans.',
101-
'pojo-accessibility',
102-
)}
103-
</Typography>
104-
</InfotipBox>
98+
<>
99+
<InfotipImage src={infotipImageSrc} role="presentation" />
100+
<InfotipBox sx={{ maxWidth: '260px' }}>
101+
<Typography variant="subtitle2" sx={{ mb: 1 }}>
102+
{__('Fix once, apply everywhere', 'pojo-accessibility')}
103+
</Typography>
104+
<Typography variant="body2" color="text.secondary">
105+
{__(
106+
'Apply this fix automatically to pages already scanned and to future scans.',
107+
'pojo-accessibility',
108+
)}
109+
</Typography>
110+
</InfotipBox>
111+
</>
105112
}
106113
>
107114
<InfoCircleIcon color="action" fontSize="tiny" />

modules/scanner/assets/js/components/manual-fix-form/resolve-with-ai.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export const ResolveWithAi = ({ item, current }) => {
263263
onClick={onResolve}
264264
>
265265
{isGlobal
266-
? __('Apply everywhere', 'pojo-accessibility')
266+
? __('Apply to all', 'pojo-accessibility')
267267
: __('Apply fix', 'pojo-accessibility')}
268268
</Button>
269269
)}
92.2 KB
Loading

modules/scanner/assets/js/styles/manual-fixes.styles.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ export const InfotipBox = styled(Box)`
4646
white-space: normal;
4747
`;
4848

49+
export const InfotipImage = styled('img')`
50+
max-width: 304px;
51+
height: auto;
52+
`;
53+
4954
export const InfotipFooter = styled(Box)`
5055
display: flex;
5156
justify-content: flex-end;

0 commit comments

Comments
 (0)