Skip to content

Commit dadade9

Browse files
authored
Merge branch 'develop' into replace
2 parents 6533239 + 177a198 commit dadade9

36 files changed

+129
-52
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If you have found a bug in the p5.js Web Editor, you can file it under the ["iss
2929

3030
### How Do I Know My Issue or Pull Request is Getting Reviewed?
3131

32-
To see which pull requests and issues are currently being reviewed, check the [PR Review Board](https://github.com/processing/p5.js-web-editor/projects/9) or the following Milestones: [PATCH Release](https://github.com/processing/p5.js-web-editor/milestone/9), [MINOR Release](https://github.com/processing/p5.js-web-editor/milestone/8).
32+
To see which pull requests and issues are currently being reviewed, check the [PR Review Board](https://github.com/processing/p5.js-web-editor/projects/9) or the following Milestones: [PATCH Release](https://github.com/processing/p5.js-web-editor/milestone/10), [MINOR Release](https://github.com/processing/p5.js-web-editor/milestone/8).
3333

3434
Issues and Pull Requests categorized under the PATCH or MINOR Release Milestones will be prioritized since they are planned to be merged for the next release to Production. Please feel free to [comment on this pinned issue](https://github.com/processing/p5.js-web-editor/issues/2534) if you would like your issue to be considered for the next release!
3535

@@ -38,11 +38,9 @@ Issues and Pull Requests categorized under the PATCH or MINOR Release Milestones
3838

3939
We will aim to deploy on a 1-2 month basis. Here are some dates we’re working towards:
4040

41-
MINOR Release for [p5.js version 1.8.0](https://github.com/processing/p5.js/releases/tag/v1.8.0): By October 27, 2023
41+
2.9.3 PATCH Release: By November 17, 2023
4242

43-
PATCH Release: By November 2, 2023
44-
45-
MINOR Release: By November 30, 2023
43+
2.10.0 MINOR Release: By December 15, 2023
4644

4745
[You can read more about Semantic Versioning and the differences between a MINOR and PATCH release](https://semver.org/).
4846

client/modules/IDE/actions/project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import objectID from 'bson-objectid';
22
import each from 'async/each';
3-
import isEqual from 'lodash/isEqual';
3+
import { isEqual } from 'lodash';
44
import browserHistory from '../../../browserHistory';
55
import apiClient from '../../../utils/apiClient';
66
import getConfig from '../../../utils/getConfig';

client/modules/IDE/components/AddToCollectionSketchList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Helmet } from 'react-helmet';
44
import { connect } from 'react-redux';
55
import { bindActionCreators } from 'redux';
66
import { withTranslation } from 'react-i18next';
7-
// import find from 'lodash/find';
7+
// import { find } from 'lodash';
88
import * as ProjectsActions from '../actions/projects';
99
import * as CollectionsActions from '../actions/collections';
1010
import * as ToastActions from '../actions/toast';

client/modules/IDE/components/AssetList.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,16 @@ class AssetListRowBase extends React.Component {
107107
</button>
108108
</li>
109109
<li>
110-
<Link
111-
to={asset.url}
110+
<a
111+
href={asset.url}
112112
target="_blank"
113+
rel="noreferrer"
113114
onBlur={this.onBlurComponent}
114115
onFocus={this.onFocusComponent}
115116
className="asset-table__action-option"
116117
>
117118
{t('AssetList.OpenNewTab')}
118-
</Link>
119+
</a>
119120
</li>
120121
</ul>
121122
)}

client/modules/IDE/components/CollectionList/CollectionList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { withTranslation } from 'react-i18next';
55
import { connect } from 'react-redux';
66
import { bindActionCreators } from 'redux';
77
import classNames from 'classnames';
8-
import find from 'lodash/find';
8+
import { find } from 'lodash';
99
import * as ProjectActions from '../../actions/project';
1010
import * as ProjectsActions from '../../actions/projects';
1111
import * as CollectionsActions from '../../actions/collections';

client/modules/IDE/components/EditableInput.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ function EditableInput({
3131
inputRef.current?.focus();
3232
}
3333
}, [isEditing]);
34+
React.useEffect(() => {
35+
setCurrentValue(value);
36+
}, [value]);
3437

3538
function beginEditing() {
3639
setIsEditing(true);

client/modules/IDE/components/Editor/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,8 @@ Editor.propTypes = {
594594
linewrap: PropTypes.bool.isRequired,
595595
lintMessages: PropTypes.arrayOf(
596596
PropTypes.shape({
597-
severity: PropTypes.string.isRequired,
597+
severity: PropTypes.oneOf(['error', 'hint', 'info', 'warning'])
598+
.isRequired,
598599
line: PropTypes.number.isRequired,
599600
message: PropTypes.string.isRequired,
600601
id: PropTypes.number.isRequired

client/modules/IDE/components/EditorAccessibility.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const EditorAccessibility = ({ lintMessages = [] }) => {
3737
EditorAccessibility.propTypes = {
3838
lintMessages: PropTypes.arrayOf(
3939
PropTypes.shape({
40-
severity: PropTypes.string.isRequired,
40+
severity: PropTypes.oneOf(['error', 'hint', 'info', 'warning'])
41+
.isRequired,
4142
line: PropTypes.number.isRequired,
4243
message: PropTypes.string.isRequired,
4344
id: PropTypes.number.isRequired
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
3+
import { render, screen } from '../../../test-utils';
4+
5+
import EditorAccessibility from './EditorAccessibility';
6+
7+
describe('<EditorAccessibility />', () => {
8+
it('renders empty message with no lines', () => {
9+
render(<EditorAccessibility lintMessages={[]} />);
10+
11+
expect(
12+
screen.getByRole('listitem', {
13+
description: 'There are no lint messages'
14+
})
15+
).toBeInTheDocument();
16+
});
17+
18+
it('renders lint message', () => {
19+
render(
20+
<EditorAccessibility
21+
lintMessages={[
22+
{
23+
severity: 'info',
24+
line: '1',
25+
message: 'foo',
26+
id: '1a2b3c'
27+
}
28+
]}
29+
/>
30+
);
31+
32+
expect(
33+
screen.queryByText('There are no lint messages')
34+
).not.toBeInTheDocument();
35+
36+
const listItem = screen.getByRole('listitem');
37+
expect(listItem).toBeInTheDocument();
38+
expect(listItem.textContent).toEqual('info in line1 :foo');
39+
});
40+
});

client/modules/IDE/hooks/useKeyDownHandlers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mapKeys from 'lodash/mapKeys';
1+
import { mapKeys } from 'lodash';
22
import PropTypes from 'prop-types';
33
import { useCallback, useEffect, useRef } from 'react';
44

client/modules/IDE/selectors/collections.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { createSelector } from 'reselect';
22
import differenceInMilliseconds from 'date-fns/differenceInMilliseconds';
3-
import find from 'lodash/find';
4-
import orderBy from 'lodash/orderBy';
3+
import { find, orderBy } from 'lodash';
54
import { DIRECTION } from '../actions/sorting';
65

76
const getCollections = (state) => state.collections;

client/modules/IDE/selectors/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createSelector } from 'reselect';
22
import differenceInMilliseconds from 'date-fns/differenceInMilliseconds';
3-
import orderBy from 'lodash/orderBy';
3+
import { orderBy } from 'lodash';
44
import { DIRECTION } from '../actions/sorting';
55

66
const getSketches = (state) => state.sketches;

client/modules/Legal/components/PolicyContainer.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { remSize, prop } from '../../../theme';
77

88
const PolicyContainerMain = styled.main`
99
max-width: ${remSize(700)};
10+
min-height: 100vh;
1011
margin: 0 auto;
1112
padding: ${remSize(10)};
1213
line-height: 1.5em;

client/modules/User/components/APIKeyList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
3-
import orderBy from 'lodash/orderBy';
3+
import { orderBy } from 'lodash';
44
import { useTranslation } from 'react-i18next';
55

66
import { APIKeyPropType } from './APIKeyForm';

client/styles/components/_account.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
background-color: getThemifyVariable('background-color');
55
}
66
min-height: 100%;
7+
8+
@media (max-width: 770px) {
9+
.account-settings__header {
10+
display: none;
11+
}
12+
}
713
}
814

915
.account-settings {
@@ -24,6 +30,16 @@
2430

2531
.account__social-stack {
2632
display: flex;
33+
@media (max-width: 770px) {
34+
flex-direction: column;
35+
align-items: center;
36+
gap: #{15 / $base-font-size}rem;
37+
38+
button, a {
39+
width: 100% !important;
40+
margin-right: 0;
41+
}
42+
}
2743
}
2844

2945
.account__social-stack > * {

client/styles/components/_form-container.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
.form-container__content {
3131
height: 100%;
32+
max-width: 90vw;
3233
display: flex;
3334
flex-direction: column;
3435
justify-content: center;
@@ -59,6 +60,10 @@
5960

6061
.form-container__divider {
6162
padding: #{20 / $base-font-size}rem 0;
63+
64+
@media (max-width: 770px) {
65+
text-align: center;
66+
}
6267
}
6368

6469
.form-container__logo-button {

client/styles/components/_forms.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,19 @@
5656
}
5757

5858
.form__input {
59-
max-width: 90vw;
60-
width: #{360 / $base-font-size}rem;
59+
min-width: #{355 / $base-font-size}rem;
60+
width: 100%;
6161
height: #{40 / $base-font-size}rem;
6262
font-size: #{16 / $base-font-size}rem;
6363
@include themify() {
6464
color: getThemifyVariable("form-input-text-color");
6565
background-color: getThemifyVariable("input-background-color");
6666
}
67+
68+
@media (max-width: 770px) {
69+
max-width: 100%;
70+
width:100%;
71+
}
6772
}
6873

6974
.form__input-flexible-height {

client/styles/components/_modal.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
1010
.modal-content {
1111
@extend %modal;
1212
min-height: #{150 / $base-font-size}rem;
13-
width: #{500 / $base-font-size}rem;
1413
padding: #{20 / $base-font-size}rem;
14+
15+
@media (min-width: 770px) {
16+
width: #{500 / $base-font-size}rem;
17+
18+
}
19+
1520
.modal--reduced & {
1621
//min-height: #{150 / $base-font-size}rem;
1722
}

client/styles/components/_preferences.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
flex-direction: column;
1111
outline: none;
1212
height: calc(80vh - #{65 / $base-font-size}rem);
13-
max-height: #{460 / $base-font-size}rem;
1413
& .react-tabs {
1514
max-height: 100%;
1615
display: flex;
@@ -19,6 +18,11 @@
1918
& .react-tabs__tab-panel {
2019
overflow-y: auto;
2120
}
21+
22+
@media (min-width: 770px) {
23+
max-height: #{460 / $base-font-size}rem;
24+
25+
}
2226
}
2327

2428
.preference__minus-button,

server/controllers/collection.controller/updateCollection.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import omitBy from 'lodash/omitBy';
2-
import isUndefined from 'lodash/isUndefined';
1+
import { omitBy, isUndefined } from 'lodash';
32
import Collection from '../../models/collection';
43

54
function removeUndefined(obj) {

server/controllers/user.controller/__tests__/apiKey.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @jest-environment node */
22

3-
import last from 'lodash/last';
3+
import { last } from 'lodash';
44
import { Request, Response } from 'jest-express';
55

66
import User, { createMock, createInstanceMock } from '../../../models/user';

server/domain-objects/Project.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import isPlainObject from 'lodash/isPlainObject';
2-
import pick from 'lodash/pick';
1+
import { isPlainObject, pick } from 'lodash';
32
import Project from '../models/project';
43
import createId from '../utils/createId';
54
import createApplicationErrorClass from '../utils/createApplicationErrorClass';

server/domain-objects/__test__/Project.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import find from 'lodash/find';
1+
import { find } from 'lodash';
22

33
import {
44
containsRootHtmlFile,

translations/locales/de/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@
530530
"KeyUpLineNumber": "Zeile {{lineNumber}}"
531531
},
532532
"EditorAccessibility": {
533-
"NoLintMessages": "Keine Lint-Warnungen vorhanden ",
534-
"CurrentLine": " Aktuelle Zeile"
533+
"NoLintMessages": "Keine Lint-Warnungen vorhanden",
534+
"CurrentLine": "Aktuelle Zeile"
535535
},
536536
"Timer": {
537537
"SavedAgo": "Gesichert: {{timeAgo}}"

translations/locales/en-US/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@
538538
"KeyUpLineNumber": "line {{lineNumber}}"
539539
},
540540
"EditorAccessibility": {
541-
"NoLintMessages": "There are no lint messages ",
542-
"CurrentLine": " Current line"
541+
"NoLintMessages": "There are no lint messages",
542+
"CurrentLine": "Current line"
543543
},
544544
"Timer": {
545545
"SavedAgo": "Saved: {{timeAgo}}"

translations/locales/es-419/translations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
},
531531
"EditorAccessibility": {
532532
"NoLintMessages": "No hay mensajes de Lint",
533-
"CurrentLine": " Línea actual"
533+
"CurrentLine": "Línea actual"
534534
},
535535
"Timer": {
536536
"SavedAgo": "Guardado: {{timeAgo}}"

translations/locales/fr-CA/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@
532532
"KeyUpLineNumber": "ligne {{lineNumber}}"
533533
},
534534
"EditorAccessibility": {
535-
"NoLintMessages": "Il n'y a pas de messages lint ",
536-
"CurrentLine": " Ligne actuelle"
535+
"NoLintMessages": "Il n'y a pas de messages lint",
536+
"CurrentLine": "Ligne actuelle"
537537
},
538538
"Timer": {
539539
"SavedAgo": "Sauvegardé: {{timeAgo}}"

translations/locales/hi/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@
529529
"KeyUpLineNumber": "लाइन {{lineNumber}}"
530530
},
531531
"EditorAccessibility": {
532-
"NoLintMessages": "कोई लिंट मैसेज नहीं ",
533-
"CurrentLine": " वर्तमान लाइन"
532+
"NoLintMessages": "कोई लिंट मैसेज नहीं",
533+
"CurrentLine": "वर्तमान लाइन"
534534
},
535535
"Timer": {
536536
"SavedAgo": "सेव किया: {{timeAgo}}"

translations/locales/it/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@
535535
"KeyUpLineNumber": "linea {{lineNumber}}"
536536
},
537537
"EditorAccessibility": {
538-
"NoLintMessages": "Non ci sono messaggi ",
539-
"CurrentLine": " Linea attuale"
538+
"NoLintMessages": "Non ci sono messaggi",
539+
"CurrentLine": "Linea attuale"
540540
},
541541
"Timer": {
542542
"SavedAgo": "Salvato: {{timeAgo}}"

translations/locales/ja/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@
529529
"KeyUpLineNumber": "{{lineNumber}} 行"
530530
},
531531
"EditorAccessibility": {
532-
"NoLintMessages": "リントメッセージはありません ",
533-
"CurrentLine": " 現在の行"
532+
"NoLintMessages": "リントメッセージはありません",
533+
"CurrentLine": "現在の行"
534534
},
535535
"Timer": {
536536
"SavedAgo": "保存されました: {{timeAgo}}"

translations/locales/ko/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@
517517
"KeyUpLineNumber": "line {{lineNumber}}"
518518
},
519519
"EditorAccessibility": {
520-
"NoLintMessages": "There are no lint messages ",
521-
"CurrentLine": " Current line"
520+
"NoLintMessages": "There are no lint messages",
521+
"CurrentLine": "Current line"
522522
},
523523
"Timer": {
524524
"SavedAgo": "Saved: {{timeAgo}}"

0 commit comments

Comments
 (0)