Skip to content

Commit 6e2afdb

Browse files
authored
Merge branch 'develop' into develop
2 parents 5748e5a + 0497096 commit 6e2afdb

File tree

13 files changed

+140
-138
lines changed

13 files changed

+140
-138
lines changed

README.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@ The p5.js Editor is a collaborative project created by many individuals, mostly
1212

1313
Learn more about [our community](https://p5js.org/community/) and read our community statement and [code of conduct](./.github/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by [donating to the Processing Foundation](https://processingfoundation.org/support).
1414

15-
## Get Started
15+
## Getting Started
1616

1717
Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn more about sketching with p5.js on the [Get Started](https://p5js.org/get-started/) and find everything you can do in the [Reference](https://p5js.org/reference/). You can also look at [examples](https://editor.p5js.org/p5/sketches) and remix them in the p5.js Editor.
1818

19-
## Setting Up the Development Environment
20-
21-
- Refer to [this documentation for setting up your environment](https://github.com/processing/p5.js-web-editor/blob/develop/contributor_docs/installation.md)
22-
23-
2419

2520
## Issues
2621

@@ -31,10 +26,47 @@ If you have found a bug in the p5.js Web Editor, you can file it under the ["iss
3126
* p5.sound: [https://github.com/processing/p5.js-sound/issues](https://github.com/processing/p5.js-sound/issues)
3227
* p5.js website: [https://github.com/processing/p5.js-website/issues](https://github.com/processing/p5.js-website/issues)
3328

29+
30+
### How Do I Know My Issue or Pull Request is Getting Reviewed?
31+
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).
33+
34+
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!
35+
36+
37+
### When Will the Next Production Release Be?
38+
39+
We will aim to deploy on a 1-2 month basis. Here are some dates we’re working towards:
40+
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
42+
43+
PATCH Release: By November 2, 2023
44+
45+
MINOR Release: By November 30, 2023
46+
47+
[You can read more about Semantic Versioning and the differences between a MINOR and PATCH release](https://semver.org/).
48+
49+
50+
## References for Contributing to the p5.js Web Editor
51+
52+
[Code of Conduct](https://editor.p5js.org/code-of-conduct)
53+
54+
[Contribution Guidelines for p5.js](https://p5js.org/contributor-docs/#/)
55+
56+
[Contribution Guidelines for the p5.js Web Editor](https://github.com/processing/p5.js-web-editor/tree/develop/contributor_docs)
57+
58+
[p5.js Community Statement](https://p5js.org/community/)
59+
60+
3461
## Acknowledgements
3562

3663
Support for this project has come from [Processing Foundation](https://processingfoundation.org/), [NYU ITP](https://tisch.nyu.edu/itp), [CS4All, NYC DOE](http://cs4all.nyc/), [COSA at DU](https://liberalarts.du.edu/emergent-digital-practices/open-source-arts), [STUDIO for Creative Inquiry](https://studioforcreativeinquiry.org/), [Grant for the Web](https://www.grantfortheweb.org/), [New Media Rights](https://www.newmediarights.org/), and many others.
3764

38-
Hosting and technical support has come from: <br />
39-
<a href="https://releasehub.com/" target="_blank"><img width="100" src="https://assets.website-files.com/603dd147c5b0a480611bd348/603dd147c5b0a469bc1bd451_logo--dark.svg" /></a>
65+
Hosting and technical support has come from:
66+
<br />
67+
<br />
68+
<a href="https://releasehub.com/" target="_blank"><img width="100" src="https://assets.website-files.com/603dd147c5b0a480611bd348/603dd147c5b0a469bc1bd451_logo--dark.svg" /></a>
69+
<br />
4070
<a href="https://www.browserstack.com/" target="_blank"><img width="100" src="https://user-images.githubusercontent.com/6063380/46976166-ab280a80-d096-11e8-983b-18dd38c8cc9b.png" /></a>
71+
<br />
72+
<a href="https://www.fastly.com/" target="_blank"><img width="100" src="https://cdn-assets-us.frontify.com/s3/frontify-enterprise-files-us/eyJwYXRoIjoiZmFzdGx5XC9hY2NvdW50c1wvYzJcLzQwMDEwMjNcL3Byb2plY3RzXC8xMVwvYXNzZXRzXC80ZVwvNzc0XC9lZTZmYzlkOWYzNWE1NjBkNjUzNjFkNGI0NGQ2MTNmZi0xNjIxNTIyODg4LnBuZyJ9:fastly:nVuY3PxyFqQMI6elJsMzxAGLH3IFlmiuMdacHAGRMkE?width=2400" /></a>

client/components/Nav/NavBar.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ function NavBar({ children, className }) {
7171
onFocus: clearHideTimeout
7272
}),
7373
createMenuItemHandlers: (dropdown) => ({
74-
onMouseUp: () => {
74+
onMouseUp: (e) => {
75+
if (e.button === 2) {
76+
return;
77+
}
7578
setDropdownOpen('none');
7679
},
7780
onBlur: handleBlur,

client/modules/IDE/actions/assets.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ function setAssets(assets, totalSize) {
1111
}
1212

1313
export function getAssets() {
14-
return (dispatch) => {
14+
return async (dispatch) => {
1515
dispatch(startLoader());
16-
apiClient
17-
.get('/S3/objects')
18-
.then((response) => {
19-
dispatch(setAssets(response.data.assets, response.data.totalSize));
20-
dispatch(stopLoader());
21-
})
22-
.catch(() => {
23-
dispatch({
24-
type: ActionTypes.ERROR
25-
});
26-
dispatch(stopLoader());
16+
try {
17+
const response = await apiClient.get('/S3/objects');
18+
dispatch(setAssets(response.data.assets, response.data.totalSize));
19+
dispatch(stopLoader());
20+
} catch (error) {
21+
dispatch({
22+
type: ActionTypes.ERROR
2723
});
24+
dispatch(stopLoader());
25+
}
2826
};
2927
}
3028

@@ -36,16 +34,14 @@ export function deleteAsset(assetKey) {
3634
}
3735

3836
export function deleteAssetRequest(assetKey) {
39-
return (dispatch) => {
40-
apiClient
41-
.delete(`/S3/${assetKey}`)
42-
.then((response) => {
43-
dispatch(deleteAsset(assetKey));
44-
})
45-
.catch(() => {
46-
dispatch({
47-
type: ActionTypes.ERROR
48-
});
37+
return async (dispatch) => {
38+
try {
39+
await apiClient.delete(`/S3/${assetKey}`);
40+
dispatch(deleteAsset(assetKey));
41+
} catch (error) {
42+
dispatch({
43+
type: ActionTypes.ERROR
4944
});
45+
}
5046
};
5147
}

client/modules/IDE/pages/IDEView.jsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import PreviewFrame from '../components/PreviewFrame';
1111
import Console from '../components/Console';
1212
import Toast from '../components/Toast';
1313
import { updateFileContent } from '../actions/files';
14-
import { stopSketch } from '../actions/ide';
14+
1515
import {
1616
autosaveProject,
1717
clearPersistedState,
@@ -80,7 +80,7 @@ const IDEView = () => {
8080

8181
const [consoleSize, setConsoleSize] = useState(150);
8282
const [sidebarSize, setSidebarSize] = useState(160);
83-
const [isOverlayVisible, setIsOverlayVisible] = useState(true);
83+
const [isOverlayVisible, setIsOverlayVisible] = useState(false);
8484

8585
const cmRef = useRef({});
8686

@@ -93,8 +93,6 @@ const IDEView = () => {
9393

9494
useEffect(() => {
9595
dispatch(clearPersistedState());
96-
97-
dispatch(stopSketch());
9896
}, [dispatch]);
9997

10098
useEffect(() => {
@@ -160,7 +158,6 @@ const IDEView = () => {
160158
setIsOverlayVisible(true);
161159
}}
162160
onDragFinished={() => {
163-
// overlayRef.current.style.display = 'none';
164161
setIsOverlayVisible(false);
165162
}}
166163
resizerStyle={{

client/modules/Preview/EmbedFrame.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function injectLocalFiles(files, htmlFile, options) {
252252
'PREVIEW_SCRIPTS_URL'
253253
)}`;
254254
previewScripts.setAttribute('crossorigin', '');
255-
sketchDoc.head.appendChild(previewScripts);
255+
sketchDoc.body.appendChild(previewScripts);
256256

257257
const sketchDocString = `<!DOCTYPE HTML>\n${sketchDoc.documentElement.outerHTML}`;
258258
scriptOffs = getAllScriptOffsets(sketchDocString);

client/modules/User/components/LoginForm.jsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ function LoginForm() {
2020
validate={validateLogin}
2121
onSubmit={onSubmit}
2222
>
23-
{({
24-
handleSubmit,
25-
submitError,
26-
pristine,
27-
submitting,
28-
modifiedSinceLastSubmit
29-
}) => (
23+
{({ handleSubmit, submitError, submitting, modifiedSinceLastSubmit }) => (
3024
<form className="form" onSubmit={handleSubmit}>
3125
<Field name="email">
3226
{(field) => (
@@ -71,7 +65,7 @@ function LoginForm() {
7165
{submitError && !modifiedSinceLastSubmit && (
7266
<span className="form-error">{submitError}</span>
7367
)}
74-
<Button type="submit" disabled={submitting || pristine}>
68+
<Button type="submit" disabled={submitting}>
7569
{t('LoginForm.Submit')}
7670
</Button>
7771
</form>

client/modules/User/pages/EmailVerificationView.jsx

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import PropTypes from 'prop-types';
2-
import React from 'react';
2+
import React, { useEffect } from 'react';
33
import { connect } from 'react-redux';
44
import { bindActionCreators } from 'redux';
55
import { withTranslation } from 'react-i18next';
@@ -9,57 +9,51 @@ import { verifyEmailConfirmation } from '../actions';
99
import RootPage from '../../../components/RootPage';
1010
import Nav from '../../IDE/components/Header/Nav';
1111

12-
class EmailVerificationView extends React.Component {
13-
static defaultProps = {
14-
emailVerificationTokenState: null
15-
};
16-
17-
componentWillMount() {
18-
const verificationToken = this.verificationToken();
19-
if (verificationToken != null) {
20-
this.props.verifyEmailConfirmation(verificationToken);
21-
}
22-
}
12+
const EmailVerificationView = (props) => {
13+
const { emailVerificationTokenState, location, t } = props;
2314

24-
verificationToken = () => {
25-
const { location } = this.props;
15+
const verificationTokenFromLocation = () => {
2616
const searchParams = new URLSearchParams(location.search);
2717
return searchParams.get('t');
2818
};
2919

30-
render() {
31-
let status = null;
32-
const { emailVerificationTokenState } = this.props;
33-
34-
if (this.verificationToken() == null) {
35-
status = <p>{this.props.t('EmailVerificationView.InvalidTokenNull')}</p>;
36-
} else if (emailVerificationTokenState === 'checking') {
37-
status = <p>{this.props.t('EmailVerificationView.Checking')}</p>;
38-
} else if (emailVerificationTokenState === 'verified') {
39-
status = <p>{this.props.t('EmailVerificationView.Verified')}</p>;
40-
setTimeout(() => browserHistory.push('/'), 1000);
41-
} else if (emailVerificationTokenState === 'invalid') {
42-
status = <p>{this.props.t('EmailVerificationView.InvalidState')}</p>;
20+
useEffect(() => {
21+
const verificationToken = verificationTokenFromLocation();
22+
if (verificationToken != null) {
23+
props.verifyEmailConfirmation(verificationToken);
4324
}
25+
}, [location, props]);
4426

45-
return (
46-
<RootPage>
47-
<Nav layout="dashboard" />
48-
<div className="form-container">
49-
<Helmet>
50-
<title>{this.props.t('EmailVerificationView.Title')}</title>
51-
</Helmet>
52-
<div className="form-container__content">
53-
<h2 className="form-container__title">
54-
{this.props.t('EmailVerificationView.Verify')}
55-
</h2>
56-
{status}
57-
</div>
58-
</div>
59-
</RootPage>
60-
);
27+
let status = null;
28+
29+
if (verificationTokenFromLocation() == null) {
30+
status = <p>{t('EmailVerificationView.InvalidTokenNull')}</p>;
31+
} else if (emailVerificationTokenState === 'checking') {
32+
status = <p>{t('EmailVerificationView.Checking')}</p>;
33+
} else if (emailVerificationTokenState === 'verified') {
34+
status = <p>{t('EmailVerificationView.Verified')}</p>;
35+
setTimeout(() => browserHistory.push('/'), 1000);
36+
} else if (emailVerificationTokenState === 'invalid') {
37+
status = <p>{t('EmailVerificationView.InvalidState')}</p>;
6138
}
62-
}
39+
40+
return (
41+
<RootPage>
42+
<Nav layout="dashboard" />
43+
<div className="form-container">
44+
<Helmet>
45+
<title>{t('EmailVerificationView.Title')}</title>
46+
</Helmet>
47+
<div className="form-container__content">
48+
<h2 className="form-container__title">
49+
{t('EmailVerificationView.Verify')}
50+
</h2>
51+
{status}
52+
</div>
53+
</div>
54+
</RootPage>
55+
);
56+
};
6357

6458
function mapStateToProps(state) {
6559
return {
@@ -76,6 +70,10 @@ function mapDispatchToProps(dispatch) {
7670
);
7771
}
7872

73+
EmailVerificationView.defaultProps = {
74+
emailVerificationTokenState: null
75+
};
76+
7977
EmailVerificationView.propTypes = {
8078
emailVerificationTokenState: PropTypes.oneOf([
8179
'checking',

client/routes.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ const withParams = (Component) => (props) => (
4848
const Route = ({ component, ...props }) => (
4949
<RouterRoute component={withParams(component)} {...props} />
5050
);
51-
Route.propTypes = { ...RouterRoute.propTypes };
52-
Route.propTypes.component = PropTypes.elementType.isRequired;
51+
Route.propTypes = {
52+
...RouterRoute.propTypes,
53+
component: PropTypes.elementType.isRequired
54+
};
5355

5456
const routes = (
5557
<Switch>

client/styles/components/_form-container.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
flex-direction: column;
3535
justify-content: center;
3636
align-items: center;
37+
margin-bottom: 20px;
3738
}
3839

3940
.form-container--align-left .form-container__content {
@@ -76,3 +77,6 @@
7677
.form-container__stack > * + * {
7778
margin-top: #{10 / $base-font-size}rem;
7879
}
80+
.form__navigation-options a {
81+
font-weight: bold;
82+
}

0 commit comments

Comments
 (0)