Skip to content

Commit 2be0dc6

Browse files
committed
Merge branch 'master' into add-installation-ko-translation
2 parents 4844199 + 8114a88 commit 2be0dc6

File tree

24 files changed

+1474
-526
lines changed

24 files changed

+1474
-526
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Don't know where to begin? Here are some suggestions to get started:
3333
- Front end: React/Redux, CSS/Sass, CodeMirror
3434
- Back end: Node, Express, MongoDB, Jest, AWS
3535
- DevOps: Travis CI, Jest, Docker, Kubernetes, AWS
36+
- Documentation
37+
- Translations: Application and documentation
3638
* Use the [p5.js Web Editor](https://editor.p5js.org)! Find a bug? Think of something you think would add to the project? Open an issue.
3739
* Expand an existing issue. Sometimes issues are missing steps to reproduce, or need suggestions for potential solutions. Sometimes they need another voice saying, "this is really important!"
3840
* Try getting the project running locally on your computer by following the [installation steps](./../developer_docs/installation.md).

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# [p5.js Web Editor](https://editor.p5js.org)
22

3+
4+
Documentation is also available in the following languages:
5+
6+
[한국어](https://github.com/processing/p5.js-web-editor/blob/master/translations/ko)
7+
8+
## Welcome! 👋👋🏿👋🏽👋🏻👋🏾👋🏼
9+
310
The p5.js Web Editor is a platform for creative coding, with a focus on making coding accessible for as many people as possible, including artists, designers, educators, beginners, and anyone who wants to learn. Simply by opening the website you can get started writing p5.js sketches without downloading or configuring anything. The editor is designed with simplicity in mind by limiting features and frills. We strive to listen to the community to drive the editor’s development, and to be intentional with every change. The editor is free and open-source.
411

512
We also strive to give the community as much ownership and control as possible. You can download your sketches so that you can edit them locally or host them elsewhere. You can also host your own version of the editor, giving you control over its data.

client/components/Nav.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class Nav extends React.PureComponent {
227227

228228
renderDashboardMenu(navDropdownState) {
229229
return (
230-
<ul className="nav__items-left" title="project-menu">
230+
<ul className="nav__items-left">
231231
<li className="nav__item-logo">
232232
<InlineSVG src={logoUrl} alt="p5.js logo" className="svg__logo" />
233233
</li>
@@ -245,7 +245,7 @@ class Nav extends React.PureComponent {
245245

246246
renderProjectMenu(navDropdownState) {
247247
return (
248-
<ul className="nav__items-left" title="project-menu">
248+
<ul className="nav__items-left">
249249
<li className="nav__item-logo">
250250
<InlineSVG src={logoUrl} alt="p5.js logo" className="svg__logo" />
251251
</li>

client/components/NavBasic.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class NavBasic extends React.PureComponent {
1313
render() {
1414
return (
1515
<nav className="nav" title="main-navigation" ref={(node) => { this.node = node; }}>
16-
<ul className="nav__items-left" title="project-menu">
16+
<ul className="nav__items-left">
1717
<li className="nav__item-logo">
1818
<InlineSVG src={logoUrl} alt="p5.js logo" className="svg__logo" />
1919
</li>

client/components/__test__/__snapshots__/Nav.test.jsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ exports[`Nav renders correctly 1`] = `
77
>
88
<ul
99
className="nav__items-left"
10-
title="project-menu"
1110
>
1211
<li
1312
className="nav__item-logo"

client/modules/IDE/actions/collections.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from 'axios';
2+
import { browserHistory } from 'react-router';
23
import * as ActionTypes from '../../../constants';
34
import { startLoader, stopLoader } from './loader';
45
import { setToastText, showToast } from './toast';
@@ -47,20 +48,22 @@ export function createCollection(collection) {
4748
});
4849
dispatch(stopLoader());
4950

50-
const collectionName = response.data.name;
51-
dispatch(setToastText(`Created "${collectionName}"`));
51+
const newCollection = response.data;
52+
dispatch(setToastText(`Created "${newCollection.name}"`));
5253
dispatch(showToast(TOAST_DISPLAY_TIME_MS));
5354

54-
return response.data;
55+
const pathname = `/${newCollection.owner.username}/collections/${newCollection.id}`;
56+
const location = { pathname, state: { skipSavingPath: true } };
57+
58+
browserHistory.push(location);
5559
})
5660
.catch((response) => {
61+
console.error('Error creating collection', response.data);
5762
dispatch({
5863
type: ActionTypes.ERROR,
5964
error: response.data
6065
});
6166
dispatch(stopLoader());
62-
63-
return response.data;
6467
});
6568
};
6669
}

client/modules/IDE/components/KeyboardShortcutModal.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ function KeyboardShortcutModal() {
7474
</span>
7575
<span>Turn off Accessible Output</span>
7676
</li>
77+
<li className="keyboard-shortcut-item">
78+
<span className="keyboard-shortcut__command">
79+
{metaKeyName} + B
80+
</span>
81+
<span>Toggle Sidebar</span>
82+
</li>
83+
<li className="keyboard-shortcut-item">
84+
<span className="keyboard-shortcut__command">
85+
Ctrl + `
86+
</span>
87+
<span>Toggle Console</span>
88+
</li>
7789
</ul>
7890
);
7991
}

client/modules/IDE/components/QuickAddList/QuickAddList.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ const QuickAddList = ({
5353
{...item}
5454
onSelect={
5555
(event) => {
56-
event.target.blur();
56+
event.stopPropagation();
57+
event.currentTarget.blur();
5758
handleAction(item);
5859
}
5960
}

client/modules/IDE/components/Searchbar/Searchbar.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ class Searchbar extends React.Component {
2626

2727
handleSearchEnter = (e) => {
2828
if (e.key === 'Enter') {
29-
this.props.setSearchTerm(this.state.searchValue);
29+
this.searchChange();
3030
}
3131
}
3232

33-
searchChange = (value) => {
34-
this.props.setSearchTerm(this.state.searchValue);
33+
searchChange = () => {
34+
if (this.state.searchValue.trim().length === 0) return;
35+
this.props.setSearchTerm(this.state.searchValue.trim());
3536
};
3637

3738
handleSearchChange = (e) => {

client/modules/IDE/pages/IDEView.jsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,20 @@ class IDEView extends React.Component {
156156
} else if (e.keyCode === 49 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac)) && e.shiftKey) {
157157
e.preventDefault();
158158
this.props.setAllAccessibleOutput(true);
159+
} else if (e.keyCode === 66 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
160+
e.preventDefault();
161+
if (!this.props.ide.sidebarIsExpanded) {
162+
this.props.expandSidebar();
163+
} else {
164+
this.props.collapseSidebar();
165+
}
166+
} else if (e.keyCode === 192 && e.ctrlKey) {
167+
e.preventDefault();
168+
if (this.props.ide.consoleIsExpanded) {
169+
this.props.collapseConsole();
170+
} else {
171+
this.props.expandConsole();
172+
}
159173
}
160174
}
161175

0 commit comments

Comments
 (0)