Skip to content

Commit 3232034

Browse files
authored
Merge branch 'develop' into centralising-breakpoints
2 parents f78ca67 + 680bffb commit 3232034

32 files changed

+4496
-836
lines changed

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ If you have found a bug in the p5.js Web Editor, you can file it under the ["iss
3131

3232
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: [MINOR Release](https://github.com/processing/p5.js-web-editor/milestone/8).
3333

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-
2.12.0 MINOR Release: By February 27, 2024
42-
43-
[You can read more about Semantic Versioning and the differences between a MINOR and PATCH release](https://semver.org/).
44-
4534

4635
## References for Contributing to the p5.js Web Editor
4736

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { connect } from 'react-redux';
3+
import { useSelector } from 'react-redux';
44
import { ThemeProvider } from 'styled-components';
5+
import theme from '../../../theme';
56

6-
import theme, { Theme } from '../../../theme';
7-
8-
const Provider = ({ children, currentTheme }) => (
9-
<ThemeProvider theme={{ ...theme[currentTheme] }}>{children}</ThemeProvider>
10-
);
7+
const Provider = ({ children }) => {
8+
const currentTheme = useSelector((state) => state.preferences.theme);
9+
return (
10+
<ThemeProvider theme={{ ...theme[currentTheme] }}>{children}</ThemeProvider>
11+
);
12+
};
1113

1214
Provider.propTypes = {
13-
children: PropTypes.node.isRequired,
14-
currentTheme: PropTypes.oneOf(Object.keys(Theme)).isRequired
15+
children: PropTypes.node.isRequired
1516
};
1617

17-
function mapStateToProps(state) {
18-
return {
19-
currentTheme: state.preferences.theme
20-
};
21-
}
22-
23-
export default connect(mapStateToProps)(Provider);
18+
export default Provider;

client/modules/IDE/components/About.jsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,20 @@ function About(props) {
162162
{t('About.Discord')}
163163
</a>
164164
</p>
165+
<p className="about__content-column-list">
166+
<a
167+
href="https://p5js.org/download/support.html"
168+
target="_blank"
169+
rel="noopener noreferrer"
170+
>
171+
<AsteriskIcon
172+
className="about__content-column-asterisk"
173+
aria-hidden="true"
174+
focusable="false"
175+
/>
176+
Donate
177+
</a>
178+
</p>
165179
<p className="about__content-column-list">
166180
<Link to="/privacy-policy">
167181
<AsteriskIcon

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class Editor extends React.Component {
338338
mode = 'application/json';
339339
} else if (fileName.match(/.+\.(frag|glsl)$/i)) {
340340
mode = 'x-shader/x-fragment';
341-
} else if (fileName.match(/.+\.(vert|stl)$/i)) {
341+
} else if (fileName.match(/.+\.(vert|stl|mtl)$/i)) {
342342
mode = 'x-shader/x-vertex';
343343
} else {
344344
mode = 'text/plain';

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { act, fireEvent, reduxRender, screen } from '../../../../test-utils';
3+
import { initialState } from '../../reducers/preferences';
34
import Preferences from './index';
45
import * as PreferencesActions from '../../actions/preferences';
56

@@ -15,7 +16,10 @@ describe('<Preferences />', () => {
1516
const subject = (initialPreferences = {}) =>
1617
reduxRender(<Preferences />, {
1718
initialState: {
18-
preferences: initialPreferences
19+
preferences: {
20+
...initialState,
21+
...initialPreferences
22+
}
1923
}
2024
});
2125

client/modules/IDE/reducers/preferences.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as ActionTypes from '../../../constants';
22

3-
const initialState = {
3+
export const initialState = {
44
fontSize: 18,
55
autosave: true,
66
linewrap: true,

client/modules/Legal/components/PolicyContainer.jsx

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

88
const PolicyContainerMain = styled.main`
99
max-width: ${remSize(700)};
10-
min-height: 100vh;
1110
margin: 0 auto;
1211
padding: ${remSize(10)};
1312
line-height: 1.5em;
13+
overflow: auto;
1414
& p {
1515
margin-bottom: ${remSize(10)};
1616
}

client/testData/testReduxStore.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { initialState as initialFilesState } from '../modules/IDE/reducers/files';
2+
import { initialState as initialPrefState } from '../modules/IDE/reducers/preferences';
23

34
const mockProjects = [
45
{
@@ -46,20 +47,7 @@ const initialTestState = {
4647
parentId: undefined
4748
},
4849
files: initialFilesState(),
49-
preferences: {
50-
fontSize: 18,
51-
autosave: true,
52-
linewrap: true,
53-
lineNumbers: true,
54-
lintWarning: false,
55-
textOutput: false,
56-
gridOutput: false,
57-
theme: 'light',
58-
autorefresh: false,
59-
language: 'en-US',
60-
autocloseBracketsQuotes: true,
61-
autocompleteHinter: false
62-
},
50+
preferences: initialPrefState,
6351
user: {
6452
6553
username: 'happydog',

0 commit comments

Comments
 (0)