Skip to content

Commit a6c1217

Browse files
committed
Merge branch 'develop' into task/last-logged-in
2 parents 297e0c5 + 3dea10e commit a6c1217

File tree

68 files changed

+18037
-23146
lines changed

Some content is hidden

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

68 files changed

+18037
-23146
lines changed

.babelrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@
6262
}
6363
]
6464
]
65+
},
66+
"test": {
67+
"presets": [
68+
"@babel/preset-env",
69+
[
70+
"@babel/preset-react",
71+
{
72+
"runtime": "automatic"
73+
}
74+
]
75+
],
76+
"plugins": [
77+
"babel-plugin-styled-components"
78+
]
6579
}
6680
},
6781
"plugins": [

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For first-time contributors or those who want to start with a small task, [check
4646
If you're looking for a bigger project to take on, look through the issues tagged [good medium issue](https://github.com/processing/p5.js-web-editor/labels/good%20medium%20issue). These issues are self-contained projects that may take longer to work on, but are great if you're looking to get more deeply involved in contributing!
4747

4848
### Project Board
49-
Many issues are related to each other and fall under bigger projects. To get a bigger picture, look at the [All Projects](https://github.com/processing/p5.js-web-editor/projects/4) board.
49+
Many issues are related to each other and fall under bigger projects. To get a bigger picture, look at the [All Projects](https://github.com/processing/p5.js-web-editor/projects/) board.
5050

5151
### Project Ideas
5252
If you're looking for inspiration for Google Summer of Code or a bigger project, there's a [project list](https://github.com/processing/processing/wiki/Project-List#p5js-web-editor) maintained on the Processing wiki.

README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ Learn more about [our community](https://p5js.org/community/) and read our commu
1414

1515
## Getting Started
1616

17-
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.
17+
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/tutorials/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.
18+
19+
## Contributing
20+
21+
[Contributing to the p5.js Web Editor](https://github.com/processing/p5.js-web-editor/blob/develop/contributor_docs/README.md)
22+
23+
[p5.js Community Statement](https://editor.p5js.org/code-of-conduct)
1824

1925

2026
## Issues
@@ -24,18 +30,6 @@ If you have found a bug in the p5.js Web Editor, you can file it under the ["iss
2430
* p5.js library: [https://github.com/processing/p5.js/issues](https://github.com/processing/p5.js/issues)
2531
* p5.js website: [https://github.com/processing/p5.js-website/issues](https://github.com/processing/p5.js-website/issues)
2632

27-
28-
## References for Contributing to the p5.js Web Editor
29-
30-
[Code of Conduct](https://editor.p5js.org/code-of-conduct)
31-
32-
[Contribution Guidelines for p5.js](https://p5js.org/contributor-docs/#/)
33-
34-
[Contribution Guidelines for the p5.js Web Editor](https://github.com/processing/p5.js-web-editor/tree/develop/contributor_docs)
35-
36-
[p5.js Community Statement](https://p5js.org/community/)
37-
38-
3933
## Acknowledgements
4034

4135
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.

client/common/icons.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import CircleInfo from '../images/circle-info.svg';
2525
import Add from '../images/add.svg';
2626
import Filter from '../images/filter.svg';
2727
import Cross from '../images/cross.svg';
28+
import Copy from '../images/copy.svg';
2829

2930
// HOC that adds the right web accessibility props
3031
// https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html
@@ -102,3 +103,4 @@ export const CircleFolderIcon = withLabel(CircleFolder);
102103
export const CircleInfoIcon = withLabel(CircleInfo);
103104
export const AddIcon = withLabel(Add);
104105
export const FilterIcon = withLabel(Filter);
106+
export const CopyIcon = withLabel(Copy);

client/components/Dropdown/DropdownMenu.jsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ import { DropdownWrapper } from '../Dropdown';
88

99
const DropdownMenu = forwardRef(
1010
(
11-
{ children, anchor, 'aria-label': ariaLabel, align, className, classes },
11+
{
12+
children,
13+
anchor,
14+
'aria-label': ariaLabel,
15+
align,
16+
className,
17+
classes,
18+
maxHeight
19+
},
1220
ref
1321
) => {
1422
// Note: need to use a ref instead of a state to avoid stale closures.
@@ -32,7 +40,7 @@ const DropdownMenu = forwardRef(
3240
focusedRef.current = false;
3341
setTimeout(() => {
3442
if (!focusedRef.current) {
35-
close();
43+
// close();
3644
}
3745
}, 200);
3846
};
@@ -59,6 +67,7 @@ const DropdownMenu = forwardRef(
5967
}}
6068
onBlur={handleBlur}
6169
onFocus={handleFocus}
70+
style={maxHeight && { maxHeight, overflowY: 'auto' }}
6271
>
6372
{children}
6473
</DropdownWrapper>
@@ -84,14 +93,16 @@ DropdownMenu.propTypes = {
8493
classes: PropTypes.shape({
8594
button: PropTypes.string,
8695
list: PropTypes.string
87-
})
96+
}),
97+
maxHeight: PropTypes.string
8898
};
8999

90100
DropdownMenu.defaultProps = {
91101
anchor: null,
92102
align: 'right',
93103
className: '',
94-
classes: {}
104+
classes: {},
105+
maxHeight: undefined
95106
};
96107

97108
export default DropdownMenu;

client/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const STOP_ACCESSIBLE_OUTPUT = 'STOP_ACCESSIBLE_OUTPUT';
1010

1111
export const OPEN_PREFERENCES = 'OPEN_PREFERENCES';
1212
export const CLOSE_PREFERENCES = 'CLOSE_PREFERENCES';
13+
export const SET_PREFERENCES_TAB = 'SET_PREFERENCES_TAB';
1314
export const SET_FONT_SIZE = 'SET_FONT_SIZE';
1415
export const SET_LINE_NUMBERS = 'SET_LINE_NUMBERS';
1516

client/images/copy.svg

Lines changed: 6 additions & 0 deletions
Loading

client/images/pencil.svg

Lines changed: 1 addition & 1 deletion
Loading

client/modules/IDE/actions/preferences.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ function updatePreferences(formParams, dispatch) {
1414
});
1515
}
1616

17+
export function setPreferencesTab(value) {
18+
return {
19+
type: ActionTypes.SET_PREFERENCES_TAB,
20+
value
21+
};
22+
}
23+
1724
export function setFontSize(value) {
1825
return (dispatch, getState) => {
1926
// eslint-disable-line
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
3+
4+
export default function Admonition({ children, title }) {
5+
return (
6+
<div className="admonition">
7+
<p className="admonition__title">
8+
<strong>{title}</strong>
9+
</p>
10+
{children}
11+
</div>
12+
);
13+
}
14+
15+
Admonition.propTypes = {
16+
title: PropTypes.string.isRequired,
17+
children: PropTypes.node
18+
};
19+
20+
Admonition.defaultProps = {
21+
children: undefined
22+
};

0 commit comments

Comments
 (0)