Skip to content

Commit 18c9dfd

Browse files
authored
Merge branch 'develop' into piyush/fix-auto-refresh-hover-effect
2 parents 476ba96 + a1a5efd commit 18c9dfd

Some content is hidden

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

59 files changed

+326
-68
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';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import About from './About';
2+
3+
export default {
4+
title: 'IDE/About',
5+
component: About
6+
};
7+
8+
export const Default = {};

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
)}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import AssetPreview from './AssetPreview';
2+
3+
export default {
4+
title: 'IDE/AssetPreview',
5+
component: AssetPreview
6+
};
7+
8+
export const Default = {
9+
args: {
10+
url: 'https://p5js.org/assets/img/p5js.svg',
11+
name: 'P5 Logo'
12+
}
13+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import AssetSize from './AssetSize';
2+
3+
export default {
4+
title: 'IDE/AssetSize',
5+
component: AssetSize
6+
};
7+
8+
export const Default = {
9+
args: {
10+
totalSize: 123
11+
}
12+
};

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';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Console from './Console';
2+
3+
export default {
4+
title: 'IDE/Console',
5+
component: Console
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import ConsoleInput from './ConsoleInput';
2+
3+
export default {
4+
title: 'IDE/ConsoleInput',
5+
component: ConsoleInput
6+
};
7+
8+
export const Default = {};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import CopyableInput from './CopyableInput';
2+
3+
export default {
4+
title: 'IDE/CopyableInput',
5+
component: CopyableInput
6+
};
7+
8+
export const Default = {
9+
args: {
10+
value: 'Lorem Ipsum'
11+
}
12+
};

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);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import EditableInput from './EditableInput';
2+
3+
export default {
4+
title: 'IDE/EditableInput',
5+
component: EditableInput
6+
};
7+
8+
export const Default = {
9+
args: {
10+
value: 'an@email.com',
11+
label: 'Example'
12+
}
13+
};

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+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Feedback from './Feedback';
2+
3+
export default {
4+
title: 'IDE/Feedback',
5+
component: Feedback
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import FileUploader from './FileUploader';
2+
3+
export default {
4+
title: 'IDE/FileUploader',
5+
component: FileUploader
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import FloatingActionButton from './FloatingActionButton';
2+
3+
export default {
4+
title: 'IDE/FloatingActionButton',
5+
component: FloatingActionButton
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import KeyboardShortcutModal from './KeyboardShortcutModal';
2+
3+
export default {
4+
title: 'IDE/KeyboardShortcutModal',
5+
component: KeyboardShortcutModal
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import NewFileForm from './NewFileForm';
2+
3+
export default {
4+
title: 'IDE/NewFileForm',
5+
component: NewFileForm
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import NewFileModal from './NewFileModal';
2+
3+
export default {
4+
title: 'IDE/NewFileModal',
5+
component: NewFileModal
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import NewFolderForm from './NewFolderForm';
2+
3+
export default {
4+
title: 'IDE/NewFolderForm',
5+
component: NewFolderForm
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import NewFolderModal from './NewFolderModal';
2+
3+
export default {
4+
title: 'IDE/NewFolderModal',
5+
component: NewFolderModal
6+
};
7+
8+
export const Default = {};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import ShareModal from './ShareModal';
2+
3+
export default {
4+
title: 'IDE/ShareModal',
5+
component: ShareModal
6+
};
7+
8+
export const Default = {};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import SketchList from './SketchList';
2+
3+
export default {
4+
title: 'IDE/SketchList',
5+
component: SketchList
6+
};
7+
8+
export const Default = {
9+
args: {
10+
user: {
11+
username: 'Joe Blogs',
12+
authenticated: true
13+
},
14+
username: 'Joe Blogs',
15+
loading: false,
16+
sketches: [
17+
{
18+
id: '1',
19+
name: 'Play Sketch',
20+
createdAt: Date.now().toString(),
21+
updatedAt: Date.now().toString()
22+
}
23+
]
24+
}
25+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import UploadFileModal from './UploadFileModal';
2+
3+
export default {
4+
title: 'IDE/UploadFileModal',
5+
component: UploadFileModal
6+
};
7+
8+
export const Default = {};

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';

0 commit comments

Comments
 (0)