Skip to content

Commit 543feeb

Browse files
authored
Merge branch 'develop' into chore/legacy-mobile
2 parents a0547ad + 7907672 commit 543feeb

Some content is hidden

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

42 files changed

+162
-84
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/images/p5js-logo-small.svg

Lines changed: 2 additions & 17 deletions
Loading

client/modules/IDE/actions/project.js

Lines changed: 2 additions & 4 deletions
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';
@@ -270,9 +270,7 @@ export function resetProject() {
270270
}
271271

272272
export function newProject() {
273-
setTimeout(() => {
274-
browserHistory.push('/');
275-
}, 0);
273+
browserHistory.push('/', { confirmed: true });
276274
return resetProject();
277275
}
278276

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/pages/IDEView.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ function WarnIfUnsavedChanges() {
5656
isAuth(nextLocation.pathname) ||
5757
isAuth(currentLocation.pathname) ||
5858
isOverlay(nextLocation.pathname) ||
59-
isOverlay(currentLocation.pathname)
59+
isOverlay(currentLocation.pathname) ||
60+
nextLocation.state?.confirmed
6061
) {
6162
return true; // allow navigation
6263
}

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/_editor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pre.CodeMirror-line {
9898
margin-left: 0;
9999
}
100100

101-
// z-index: 20;
101+
z-index: 1;
102102

103103
width: 580px;
104104
font-family: Montserrat, sans-serif;

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/_nav.scss

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,26 @@
162162
position: absolute;
163163
}
164164
}
165-
.svg__logo g > path {
165+
166+
.svg__logo {
167+
166168
@include themify() {
167-
fill: getThemifyVariable('logo-color');
169+
// Set background color of the logo
170+
background-color: getThemifyVariable('logo-color');
168171
}
169-
}
170-
.svg__logo g g:first-of-type path {
171-
fill: none;
172+
172173
}
173174

174-
.svg__logo g g:first-of-type use {
175+
.svg__logo g path{
176+
175177
@include themify() {
178+
// Set internal color of the logo;
176179
fill: getThemifyVariable('logo-background-color');
177180
}
181+
178182
}
179183

184+
180185
.nav__keyboard-shortcut {
181186
font-size: #{12 / $base-font-size}rem;
182187
font-family: Inconsololata, monospace;

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,

client/styles/components/_toolbar.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@
125125
}
126126

127127
.toolbar__autorefresh-label {
128+
cursor: pointer;
128129
@include themify() {
129130
color: getThemifyVariable('secondary-text-color');
131+
&:hover {
132+
color: getThemifyVariable('logo-color');
133+
}
130134
}
131135
margin-left: #{5 / $base-font-size}rem;
132136
font-size: #{12 / $base-font-size}rem;

0 commit comments

Comments
 (0)