Merge branch 'develop' of https://github.com/processing/p5.js-web-editor into feature/mobile-examples

This commit is contained in:
ghalestrilo 2020-07-28 16:41:03 -03:00
commit f1108c85ec
2 changed files with 2 additions and 10 deletions

View File

@ -23,20 +23,13 @@ class Searchbar extends React.Component {
}); });
} }
handleSearchEnter = (e) => {
if (e.key === 'Enter') {
this.searchChange();
}
}
searchChange = () => { searchChange = () => {
if (this.state.searchValue.trim().length === 0) return;
this.props.setSearchTerm(this.state.searchValue.trim()); this.props.setSearchTerm(this.state.searchValue.trim());
}; };
handleSearchChange = (e) => { handleSearchChange = (e) => {
this.setState({ searchValue: e.target.value }, () => { this.setState({ searchValue: e.target.value }, () => {
this.throttledSearchChange(this.state.searchValue); this.throttledSearchChange(this.state.searchValue.trim());
}); });
} }
@ -53,7 +46,6 @@ class Searchbar extends React.Component {
value={searchValue} value={searchValue}
placeholder={this.props.searchLabel} placeholder={this.props.searchLabel}
onChange={this.handleSearchChange} onChange={this.handleSearchChange}
onKeyUp={this.handleSearchEnter}
/> />
<button <button
className="searchbar__clear-button" className="searchbar__clear-button"

View File

@ -25,7 +25,7 @@ _Note_: The installation steps assume you are using a Unix-like shell. If you ar
* For Mac OSX with [homebrew](http://brew.sh/): `brew tap mongodb/brew` then `brew install mongodb-community` and finally start the server with `brew services start mongodb-community` or you can visit the installation guide here [Installation Guide For MacOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/) * For Mac OSX with [homebrew](http://brew.sh/): `brew tap mongodb/brew` then `brew install mongodb-community` and finally start the server with `brew services start mongodb-community` or you can visit the installation guide here [Installation Guide For MacOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/)
* For Windows and Linux: [MongoDB Installation](https://docs.mongodb.com/manual/installation/) * For Windows and Linux: [MongoDB Installation](https://docs.mongodb.com/manual/installation/)
7. `$ cp .env.example .env` 7. `$ cp .env.example .env`
8. (Optional) Update `.env` with necessary keys to enable certain app behavoirs, i.e. add Github ID and Github Secret if you want to be able to log in with Github. 8. (Optional) Update `.env` with necessary keys to enable certain app behaviors, i.e. add Github ID and Github Secret if you want to be able to log in with Github.
9. `$ npm run fetch-examples` - this downloads the example sketches into a user called 'p5' 9. `$ npm run fetch-examples` - this downloads the example sketches into a user called 'p5'
10. `$ npm start` 10. `$ npm start`
11. Navigate to [http://localhost:8000](http://localhost:8000) in your browser 11. Navigate to [http://localhost:8000](http://localhost:8000) in your browser