Skip to content

Commit c026a36

Browse files
authored
Merge branch 'develop' into dev1
2 parents 98a136c + b27492a commit c026a36

File tree

81 files changed

+5650
-1364
lines changed

Some content is hidden

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

81 files changed

+5650
-1364
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ FROM base as development
1010
ENV NODE_ENV development
1111
COPY package.json package-lock.json ./
1212
RUN npm install
13-
RUN npm rebuild node-sass
1413
COPY .babelrc index.js nodemon.json ./
1514
COPY ./webpack ./webpack
1615
COPY client ./client
@@ -27,6 +26,5 @@ FROM base as production
2726
ENV NODE_ENV=production
2827
COPY package.json package-lock.json index.js ./
2928
RUN npm install --production
30-
RUN npm rebuild node-sass
3129
COPY --from=build $APP_HOME/dist ./dist
3230
CMD ["npm", "run", "start:prod"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ 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-
2.11.0 MINOR Release: By January 16, 2023
41+
2.12.0 MINOR Release: By February 27, 2024
4242

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

client/constants.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ export const SET_SORT_PARAMS = 'SET_SORT_PARAMS';
137137
export const SET_SEARCH_TERM = 'SET_SEARCH_TERM';
138138
export const CLOSE_SKETCHLIST_MODAL = 'CLOSE_SKETCHLIST_MODAL';
139139

140-
export const START_LOADING = 'START_LOADING';
141-
export const STOP_LOADING = 'STOP_LOADING';
142-
143140
export const START_SAVING_PROJECT = 'START_SAVING_PROJECT';
144141
export const END_SAVING_PROJECT = 'END_SAVING_PROJECT';
145142

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/actions/assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import apiClient from '../../../utils/apiClient';
22
import * as ActionTypes from '../../../constants';
3-
import { startLoader, stopLoader } from './loader';
3+
import { startLoader, stopLoader } from '../reducers/loading';
44
import { assetsActions } from '../reducers/assets';
55

66
const { setAssets, deleteAsset } = assetsActions;

client/modules/IDE/actions/collections.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import browserHistory from '../../../browserHistory';
22
import apiClient from '../../../utils/apiClient';
33
import * as ActionTypes from '../../../constants';
4-
import { startLoader, stopLoader } from './loader';
4+
import { startLoader, stopLoader } from '../reducers/loading';
55
import { setToastText, showToast } from './toast';
66

77
const TOAST_DISPLAY_TIME_MS = 1500;
@@ -80,7 +80,7 @@ export function addToCollection(collectionId, projectId) {
8080

8181
const collectionName = response.data.name;
8282

83-
dispatch(setToastText(`Added to "${collectionName}`));
83+
dispatch(setToastText(`Added to "${collectionName}"`));
8484
dispatch(showToast(TOAST_DISPLAY_TIME_MS));
8585

8686
return response.data;
@@ -110,7 +110,7 @@ export function removeFromCollection(collectionId, projectId) {
110110

111111
const collectionName = response.data.name;
112112

113-
dispatch(setToastText(`Removed from "${collectionName}`));
113+
dispatch(setToastText(`Removed from "${collectionName}"`));
114114
dispatch(showToast(TOAST_DISPLAY_TIME_MS));
115115

116116
return response.data;

client/modules/IDE/actions/loader.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

client/modules/IDE/actions/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import apiClient from '../../../utils/apiClient';
22
import * as ActionTypes from '../../../constants';
3-
import { startLoader, stopLoader } from './loader';
3+
import { startLoader, stopLoader } from '../reducers/loading';
44

55
// eslint-disable-next-line
66
export function getProjects(username) {

client/modules/IDE/actions/projects.unit.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { rest } from 'msw';
55

66
import * as ProjectActions from './projects';
77
import * as ActionTypes from '../../../constants';
8+
import { startLoader, stopLoader } from '../reducers/loading';
89
import {
910
initialTestState,
1011
mockProjects
@@ -33,9 +34,9 @@ describe('projects action creator tests', () => {
3334
store = mockStore(initialTestState);
3435

3536
const expectedActions = [
36-
{ type: ActionTypes.START_LOADING },
37+
{ type: startLoader.type },
3738
{ type: ActionTypes.SET_PROJECTS, projects: mockProjects },
38-
{ type: ActionTypes.STOP_LOADING }
39+
{ type: stopLoader.type }
3940
];
4041

4142
return store

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/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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import * as ActionTypes from '../../../constants';
1+
import { createSlice } from '@reduxjs/toolkit';
22

3-
const loading = (state = false, action) => {
4-
switch (action.type) {
5-
case ActionTypes.START_LOADING:
6-
return true;
7-
case ActionTypes.STOP_LOADING:
8-
return false;
9-
default:
10-
return state;
3+
const loadingSlice = createSlice({
4+
name: 'loading',
5+
initialState: false,
6+
reducers: {
7+
startLoader: () => true,
8+
stopLoader: () => false
119
}
12-
};
10+
});
1311

14-
export default loading;
12+
export const { startLoader, stopLoader } = loadingSlice.actions;
13+
export default loadingSlice.reducer;

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/styles/abstracts/_placeholders.scss

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
@use "sass:math";
2+
13
%toolbar-button {
24
@include themify() {
35
display: inline-block;
4-
height: #{44 / $base-font-size}rem;
5-
width: #{44 / $base-font-size}rem;
6+
height: #{math.div(44, $base-font-size)}rem;
7+
width: #{math.div(44, $base-font-size)}rem;
68
text-align: center;
79
border-radius: 100%;
810
cursor: pointer;
@@ -81,7 +83,7 @@
8183
cursor: pointer;
8284
border: 2px solid getThemifyVariable('button-border-color');
8385
border-radius: 2px;
84-
padding: #{10 / $base-font-size}rem #{30 / $base-font-size}rem;
86+
padding: #{math.div(10, $base-font-size)}rem #{math.div(30, $base-font-size)}rem;
8587
& g, & path {
8688
fill: getThemifyVariable('button-color');
8789
opacity: 1;
@@ -111,8 +113,8 @@
111113
color: getThemifyVariable('primary-text-color');
112114
background-color: getThemifyVariable('preferences-button-background-color');
113115
padding: 0;
114-
margin-bottom: #{28 / $base-font-size}rem;
115-
line-height: #{50 / $base-font-size}rem;
116+
margin-bottom: #{math.div(28, $base-font-size)}rem;
117+
line-height: #{math.div(50, $base-font-size)}rem;
116118
& g, & path {
117119
fill: getThemifyVariable('modal-button-color');
118120
}
@@ -138,12 +140,12 @@
138140
color: getThemifyVariable('heavy-text-color');
139141
}
140142
}
141-
font-size: #{12 / $base-font-size}rem;
143+
font-size: #{math.div(12, $base-font-size)}rem;
142144
cursor: pointer;
143145
text-align: left;
144146
padding: 0;
145-
margin-bottom: #{5 / $base-font-size}rem;
146-
padding-right: #{5 / $base-font-size}rem;
147+
margin-bottom: #{math.div(5, $base-font-size)}rem;
148+
padding-right: #{math.div(5, $base-font-size)}rem;
147149
border: 0;
148150
list-style-type: none;
149151
}
@@ -194,19 +196,19 @@
194196
color: getThemifyVariable('primary-text-color');
195197
}
196198
text-align: left;
197-
width: #{180 / $base-font-size}rem;
199+
width: #{math.div(180, $base-font-size)}rem;
198200
display: flex;
199201
position: absolute;
200202
flex-direction: column;
201203
top: 95%;
202204
height: auto;
203205
z-index: 9999;
204-
border-radius: #{6 / $base-font-size}rem;
206+
border-radius: #{math.div(6, $base-font-size)}rem;
205207
& li:first-child {
206-
border-radius: #{5 / $base-font-size}rem #{5 / $base-font-size}rem 0 0;
208+
border-radius: #{math.div(5, $base-font-size)}rem #{math.div(5, $base-font-size)}rem 0 0;
207209
}
208210
& li:last-child {
209-
border-radius: 0 0 #{5 / $base-font-size}rem #{5 / $base-font-size}rem;
211+
border-radius: 0 0 #{math.div(5, $base-font-size)}rem #{math.div(5, $base-font-size)}rem;
210212
}
211213
& li {
212214
& button,
@@ -216,9 +218,9 @@
216218
}
217219
width: 100%;
218220
text-align: left;
219-
padding: #{8 / $base-font-size}rem #{16 / $base-font-size}rem;
221+
padding: #{math.div(8, $base-font-size)}rem #{math.div(16, $base-font-size)}rem;
220222
}
221-
height: #{35 / $base-font-size}rem;
223+
height: #{math.div(35, $base-font-size)}rem;
222224
cursor: pointer;
223225
display: flex;
224226
align-items: center;

client/styles/base/_base.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "sass:math";
2+
13
* {
24
box-sizing: border-box;
35
}
@@ -65,10 +67,10 @@ button {
6567

6668
input,
6769
textarea {
68-
padding: #{5 / $base-font-size}rem;
70+
padding: #{math.div(5, $base-font-size)}rem;
6971
border: 1px solid;
7072
border-radius: 2px;
71-
padding: #{10 / $base-font-size}rem;
73+
padding: #{math.div(10, $base-font-size)}rem;
7274
@include themify() {
7375
color: getThemifyVariable("input-text-color");
7476
background-color: getThemifyVariable("input-background-color");
@@ -105,23 +107,23 @@ button {
105107
}
106108

107109
h1 {
108-
font-size: #{21 / $base-font-size}em;
110+
font-size: #{math.div(21, $base-font-size)}em;
109111
}
110112

111113
h2 {
112-
font-size: #{21 / $base-font-size}em;
114+
font-size: #{math.div(21, $base-font-size)}em;
113115
}
114116

115117
h3 {
116118
font-weight: normal;
117-
font-size: #{16 / $base-font-size}rem;
119+
font-size: #{math.div(16, $base-font-size)}rem;
118120
}
119121
h4 {
120122
font-weight: normal;
121123
}
122124
h6 {
123125
font-weight: normal;
124-
font-size: #{12 / $base-font-size}rem;
126+
font-size: #{math.div(12, $base-font-size)}rem;
125127
}
126128
thead {
127129
text-align: left;

0 commit comments

Comments
 (0)