Skip to content

Commit 93b5cb0

Browse files
committed
Merge branch 'release-2.20.3' into release
2 parents bc3ecc6 + 0261ad7 commit 93b5cb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1063
-517
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
### Context or Issue Number:
2-
<!-- Please add the issue this relates to if one is available. Otherwise please describe the current state of the codebase and what this PR attempts to fix. -->
1+
### Issue:
2+
Fixes #
3+
<!-- Please add the issue this relates to, and a provide a brief description of the current state of the codebase and what this PR attempts to fix. -->
34

45
### Demo:
56
<!-- Please add a screenshot for UI related changes -->

client/modules/IDE/actions/project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,12 +420,12 @@ export function changeVisibility(projectId, projectName, visibility, t) {
420420
.patch('/project/visibility', { projectId, visibility })
421421
.then((response) => {
422422
if (response.status === 200) {
423-
const { visibility: newVisibility, updatedAt } = response.data;
423+
const { visibility: newVisibility, updatedAt, id } = response.data;
424424

425425
dispatch({
426426
type: ActionTypes.CHANGE_VISIBILITY,
427427
payload: {
428-
id: response.data.id,
428+
id,
429429
visibility: newVisibility
430430
}
431431
});

client/modules/IDE/components/AddToCollectionSketchList.unit.test.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ describe('<AddToCollectionSketchList />', () => {
119119

120120
const before = requestCount;
121121

122-
fireEvent.click(screen.getByRole('button', { name: 'Next Page' }));
122+
fireEvent.click(
123+
screen.getByRole('button', { name: 'Pagination.NextPageARIA' })
124+
);
123125

124126
await waitFor(() => {
125127
expect(requestCount).toBeGreaterThan(before);
@@ -134,7 +136,7 @@ describe('<AddToCollectionSketchList />', () => {
134136
await screen.findByText('page1-sketch-1');
135137

136138
expect(
137-
screen.getByRole('button', { name: 'Previous Page' })
139+
screen.getByRole('button', { name: 'Pagination.PreviousPageARIA' })
138140
).toBeDisabled();
139141
});
140142

@@ -165,7 +167,7 @@ describe('<AddToCollectionSketchList />', () => {
165167
await screen.findByText('AddToCollectionSketchList.NoCollections');
166168

167169
expect(
168-
screen.queryByRole('button', { name: 'Next Page' })
170+
screen.queryByRole('button', { name: 'Pagination.NextPageARIA' })
169171
).not.toBeInTheDocument();
170172
});
171173

@@ -253,13 +255,17 @@ describe('<AddToCollectionSketchList />', () => {
253255
let info = document.querySelector('.pagination-info');
254256
expect(info.textContent.replace(/\s+/g, ' ').trim()).toContain('1 - 10');
255257

256-
fireEvent.click(screen.getByRole('button', { name: 'Next Page' }));
258+
fireEvent.click(
259+
screen.getByRole('button', { name: 'Pagination.NextPageARIA' })
260+
);
257261
await screen.findByText('page2-sketch-1');
258262

259263
info = document.querySelector('.pagination-info');
260264
expect(info.textContent.replace(/\s+/g, ' ').trim()).toContain('11 - 20');
261265

262-
fireEvent.click(screen.getByRole('button', { name: 'Next Page' }));
266+
fireEvent.click(
267+
screen.getByRole('button', { name: 'Pagination.NextPageARIA' })
268+
);
263269
await screen.findByText('page3-sketch-1');
264270

265271
info = document.querySelector('.pagination-info');

client/modules/IDE/components/NewFileForm.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ function NewFileForm() {
6464
</Field>
6565
</div>
6666
{touched.submitButton && errors.name && (
67-
<span className="form-error">{errors.name}</span>
67+
<span className="form-error" aria-live="polite">
68+
{errors.name}
69+
</span>
6870
)}
6971
</form>
7072
)}

client/modules/IDE/components/NewFolderForm.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ function NewFolderForm() {
6161
</Field>
6262
</div>
6363
{touched.submitButton && errors.name && (
64-
<span className="form-error">{errors.name}</span>
64+
<span className="form-error" aria-live="polite">
65+
{errors.name}
66+
</span>
6567
)}
6668
</form>
6769
)}

client/modules/IDE/components/Pagination.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Pagination = ({
2626
className="page-link"
2727
onClick={() => onPageChange(page - 1)}
2828
disabled={page === 1}
29-
aria-label="Previous Page"
29+
aria-label={t('Pagination.PreviousPageARIA')}
3030
>
3131
{t('Pagination.Previous')}
3232
</button>
@@ -51,7 +51,7 @@ const Pagination = ({
5151
onPageChange(page + 1);
5252
}}
5353
disabled={page === totalPages}
54-
aria-label="Next Page"
54+
aria-label={t('Pagination.NextPageARIA')}
5555
>
5656
{t('Pagination.Next')}
5757
</button>

client/modules/IDE/components/QuickAddList/Icons.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3+
import { useTranslation } from 'react-i18next';
34
import CloseIcon from '../../../../images/close.svg';
45
import CheckIcon from '../../../../images/check_encircled.svg';
56

67
const Icons = ({ isAdded }) => {
8+
const { t } = useTranslation();
79
const classes = [
810
'quick-add__icon',
911
isAdded
@@ -16,13 +18,13 @@ const Icons = ({ isAdded }) => {
1618
<CloseIcon
1719
className="quick-add__remove-icon"
1820
role="img"
19-
aria-label="Descending"
21+
aria-label={t('QuickAddList.ButtonRemoveARIA')}
2022
focusable="false"
2123
/>
2224
<CheckIcon
2325
className="quick-add__add-icon"
2426
role="img"
25-
aria-label="Descending"
27+
aria-label={t('QuickAddList.ButtonAddToCollectionARIA')}
2628
focusable="false"
2729
/>
2830
</div>

client/modules/IDE/components/SketchList.unit.test.jsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ describe('<SketchList />', () => {
134134

135135
expect(screen.queryByRole('table')).not.toBeInTheDocument();
136136
expect(
137-
screen.queryByRole('button', { name: 'Next Page' })
137+
screen.queryByRole('button', { name: 'Pagination.NextPageARIA' })
138138
).not.toBeInTheDocument();
139139
});
140140

@@ -195,7 +195,9 @@ describe('<SketchList />', () => {
195195

196196
const before = requestCount;
197197

198-
fireEvent.click(screen.getByRole('button', { name: 'Next Page' }));
198+
fireEvent.click(
199+
screen.getByRole('button', { name: 'Pagination.NextPageARIA' })
200+
);
199201

200202
await waitFor(() => {
201203
expect(requestCount).toBeGreaterThan(before);
@@ -209,7 +211,9 @@ describe('<SketchList />', () => {
209211
subject();
210212
await screen.findByText('page1-sketch-1');
211213

212-
const prev = screen.getByRole('button', { name: 'Previous Page' });
214+
const prev = screen.getByRole('button', {
215+
name: 'Pagination.PreviousPageARIA'
216+
});
213217
expect(prev).toBeDisabled();
214218
});
215219

@@ -245,10 +249,10 @@ describe('<SketchList />', () => {
245249
await screen.findByText('singlePage-sketch-1');
246250

247251
expect(
248-
screen.queryByRole('button', { name: 'Previous Page' })
252+
screen.queryByRole('button', { name: 'Pagination.PreviousPageARIA' })
249253
).not.toBeInTheDocument();
250254
expect(
251-
screen.queryByRole('button', { name: 'Next Page' })
255+
screen.queryByRole('button', { name: 'Pagination.NextPageARIA' })
252256
).not.toBeInTheDocument();
253257
});
254258
});

client/modules/IDE/components/TextArea.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function TextArea({ src, className }) {
3232
<TextAreaWrapper>
3333
<textarea className={className}>{src}</textarea>
3434
<CornerButton onClick={copyTextToClipboard}>
35-
<CopyIcon aria-label="Copy" />
35+
<CopyIcon aria-label={t('TextArea.CopyARIA')} />
3636
</CornerButton>
3737
</TextAreaWrapper>
3838
);

client/modules/IDE/components/Toast.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Toast() {
1818
<button
1919
className="toast__close"
2020
onClick={() => dispatch(hideToast())}
21-
aria-label="Close Alert"
21+
aria-label={t('Toast.CloseAlertARIA')}
2222
>
2323
<ExitIcon focusable="false" aria-hidden="true" />
2424
</button>

0 commit comments

Comments
 (0)