From 7067500aa9597fc85b34051a7228056da168916f Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 29 Mar 2019 16:28:13 -0400 Subject: [PATCH] Revert "Nothing to see here!" This reverts commit dcd74c0bfd9f249de11a9375ca92707df7bed478. --- .travis.yml | 9 - package.json | 5 +- src/components/cats/cats.jsx | 209 ------------------------ src/components/cats/cats.scss | 30 ---- src/components/footer/www/footer.jsx | 7 - src/components/grid/grid.jsx | 84 ++++------ src/components/grid/grid.scss | 9 - src/components/thumbnail/thumbnail.jsx | 8 +- src/components/thumbnail/thumbnail.scss | 6 - src/lib/piano.js | 83 ---------- src/views/explore/explore.jsx | 8 - src/views/search/computer-cat.jpg | Bin 1181861 -> 0 bytes src/views/search/fish.svg | 52 ------ src/views/search/search.jsx | 86 +--------- src/views/search/search.scss | 15 -- static/images/cats/1.jpg | Bin 47431 -> 0 bytes static/images/cats/2.jpg | Bin 39188 -> 0 bytes static/images/cats/3.jpg | Bin 26430 -> 0 bytes static/images/cats/4.jpg | Bin 33171 -> 0 bytes static/images/cats/Cat1.jpg | Bin 53749 -> 0 bytes static/images/cats/Cat2.jpg | Bin 36665 -> 0 bytes static/images/cats/Cat3.jpg | Bin 36182 -> 0 bytes static/images/cats/Cat4.jpg | Bin 39809 -> 0 bytes static/images/cats/IMG_0071.jpg | Bin 27925 -> 0 bytes static/images/cats/IMG_0122.jpg | Bin 36977 -> 0 bytes static/images/cats/IMG_0135.jpg | Bin 51481 -> 0 bytes static/images/cats/IMG_0288.jpg | Bin 45182 -> 0 bytes static/images/cats/IMG_0504.jpg | Bin 45224 -> 0 bytes static/images/cats/IMG_0681.jpg | Bin 36475 -> 0 bytes static/images/cats/IMG_0684.jpg | Bin 23612 -> 0 bytes static/images/cats/IMG_0698.jpg | Bin 44685 -> 0 bytes static/images/cats/IMG_1092.jpg | Bin 46235 -> 0 bytes static/images/cats/IMG_1157.jpg | Bin 57229 -> 0 bytes static/images/cats/IMG_1463.jpg | Bin 36217 -> 0 bytes static/images/cats/IMG_1696.jpg | Bin 23068 -> 0 bytes static/images/cats/IMG_1977.jpg | Bin 38683 -> 0 bytes static/images/cats/IMG_2507.jpg | Bin 50210 -> 0 bytes static/images/cats/IMG_2681.jpg | Bin 33133 -> 0 bytes static/images/cats/IMG_2775.jpg | Bin 32785 -> 0 bytes static/images/cats/IMG_2776.jpg | Bin 31577 -> 0 bytes static/images/cats/IMG_3218.jpg | Bin 16233 -> 0 bytes static/images/cats/IMG_5880.jpg | Bin 45899 -> 0 bytes static/images/cats/IMG_6020.jpg | Bin 49430 -> 0 bytes static/images/cats/IMG_6521.jpg | Bin 44176 -> 0 bytes static/images/cats/IMG_6558.jpg | Bin 37101 -> 0 bytes static/images/cats/IMG_9587.jpg | Bin 50189 -> 0 bytes static/images/cats/IMG_9766.jpg | Bin 36959 -> 0 bytes static/images/cats/IMG_9775.jpg | Bin 36971 -> 0 bytes 48 files changed, 39 insertions(+), 572 deletions(-) delete mode 100644 src/components/cats/cats.jsx delete mode 100644 src/components/cats/cats.scss delete mode 100644 src/lib/piano.js delete mode 100644 src/views/search/computer-cat.jpg delete mode 100644 src/views/search/fish.svg delete mode 100644 static/images/cats/1.jpg delete mode 100644 static/images/cats/2.jpg delete mode 100644 static/images/cats/3.jpg delete mode 100644 static/images/cats/4.jpg delete mode 100644 static/images/cats/Cat1.jpg delete mode 100644 static/images/cats/Cat2.jpg delete mode 100644 static/images/cats/Cat3.jpg delete mode 100644 static/images/cats/Cat4.jpg delete mode 100644 static/images/cats/IMG_0071.jpg delete mode 100644 static/images/cats/IMG_0122.jpg delete mode 100644 static/images/cats/IMG_0135.jpg delete mode 100644 static/images/cats/IMG_0288.jpg delete mode 100644 static/images/cats/IMG_0504.jpg delete mode 100644 static/images/cats/IMG_0681.jpg delete mode 100644 static/images/cats/IMG_0684.jpg delete mode 100644 static/images/cats/IMG_0698.jpg delete mode 100644 static/images/cats/IMG_1092.jpg delete mode 100644 static/images/cats/IMG_1157.jpg delete mode 100644 static/images/cats/IMG_1463.jpg delete mode 100644 static/images/cats/IMG_1696.jpg delete mode 100644 static/images/cats/IMG_1977.jpg delete mode 100644 static/images/cats/IMG_2507.jpg delete mode 100644 static/images/cats/IMG_2681.jpg delete mode 100644 static/images/cats/IMG_2775.jpg delete mode 100644 static/images/cats/IMG_2776.jpg delete mode 100644 static/images/cats/IMG_3218.jpg delete mode 100644 static/images/cats/IMG_5880.jpg delete mode 100644 static/images/cats/IMG_6020.jpg delete mode 100644 static/images/cats/IMG_6521.jpg delete mode 100644 static/images/cats/IMG_6558.jpg delete mode 100644 static/images/cats/IMG_9587.jpg delete mode 100644 static/images/cats/IMG_9766.jpg delete mode 100644 static/images/cats/IMG_9775.jpg diff --git a/.travis.yml b/.travis.yml index 886badeef..2f2cde56d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,17 +102,9 @@ install: - sudo -H pip install -r requirements.txt - npm --production=false install - npm --production=false update - - cd node_modules/scratch-gui - - npm --production=false install - - cd node_modules/scratch-blocks - - npm --production=false install - - cd ../.. - - npm run build - - cd ../.. jobs: include: - stage: test - script: env make build deploy: - provider: script skip_cleanup: $SKIP_CLEANUP @@ -121,7 +113,6 @@ jobs: repo: LLK/scratch-www branch: - develop - - totally-normal - hotfix/* - release/* - provider: script diff --git a/package.json b/package.json index 98dbd8220..6f0eaaacd 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,7 @@ "react-helmet": "5.2.0", "scratch-docker": "^1.0.2", "scratch-parser": "^5.0.0", - "scratch-storage": "^0.5.1", - "tone": "^13.4.9" + "scratch-storage": "^0.5.1" }, "devDependencies": { "ajv": "6.4.0", @@ -99,7 +98,7 @@ "react-responsive": "3.0.0", "react-slick": "0.16.0", "react-string-replace": "0.4.1", - "scratch-gui": "github:LLK/scratch-gui#totally-normal", + "scratch-gui": "0.1.0-prerelease.20190321152316", "react-telephone-input": "4.3.4", "redux": "3.5.2", "redux-thunk": "2.0.1", diff --git a/src/components/cats/cats.jsx b/src/components/cats/cats.jsx deleted file mode 100644 index feedd5081..000000000 --- a/src/components/cats/cats.jsx +++ /dev/null @@ -1,209 +0,0 @@ -const React = require('react'); -const bindAll = require('lodash.bindall'); - -const Modal = require('../modal/base/modal.jsx'); - -require('./cats.scss'); - -const catImages = [ - '/images/cats/IMG_9775.jpg', - '/images/cats/IMG_9766.jpg', - '/images/cats/IMG_9587.jpg', - '/images/cats/IMG_6558.jpg', - '/images/cats/IMG_6521.jpg', - '/images/cats/IMG_6020.jpg', - '/images/cats/IMG_5880.jpg', - '/images/cats/IMG_3218.jpg', - '/images/cats/IMG_2776.jpg', - '/images/cats/IMG_2775.jpg', - '/images/cats/IMG_2681.jpg', - '/images/cats/IMG_1092.jpg', - '/images/cats/IMG_0684.jpg', - '/images/cats/IMG_0698.jpg', - '/images/cats/IMG_0504.jpg', - '/images/cats/IMG_0288.jpg', - '/images/cats/IMG_0122.jpg', - '/images/cats/IMG_2507.jpg', - '/images/cats/IMG_1977.jpg', - '/images/cats/IMG_1696.jpg', - '/images/cats/IMG_1463.jpg', - '/images/cats/IMG_1157.jpg', - '/images/cats/IMG_0681.jpg', - '/images/cats/IMG_0135.jpg', - '/images/cats/IMG_0071.jpg', - '/images/cats/1.jpg', - '/images/cats/2.jpg', - '/images/cats/3.jpg', - '/images/cats/4.jpg', - '/images/cats/Cat1.jpg', - '/images/cats/Cat2.jpg', - '/images/cats/Cat3.jpg', - '/images/cats/Cat4.jpg' -]; - -/* eslint-disable max-len */ -const catFacts = [ - 'Cats don\'t have 9 lives, but they DO have 9 toes.', - 'All cats are turquoise for a few minutes after they\'re born.', - 'Cats born in the UK prefer tea over water.', - 'The following fact about cats is not fact.', - 'This sentence about cats is false.', - 'Cats aren\'t actually turquoise when they\'re born.', - 'More cats have been to the moon than I have. ', - 'Cats are descended from an ancient alien race from the vicinity of Betelgeuse.', - 'Cats are not not dogs.', - 'The cat Tom, from Tom and Jerry is actually my alter-ego.', - 'If a cat winks twice in a row it means they like to wink.', - 'Cats enjoy playing fetch even more than dogs.', - 'The internet was created as a way to better share images of cats with loved ones.', - 'Cats developed tails as a way to get out of doing homework.', - 'Cats train for marathons by sprinting through your house at very early hours of the morning. ', - 'Cats read newspapers when no one is looking and they can tell if a camera is on in the room.', - 'The word "cat" means "sneezing while cold" in 17 languages. ', - 'Cats are not not adorable.', - 'Cat is the longest word you can type on the keyboard with only one hand.', - 'Meow meow mrow. Meow!', - 'What even is a cat?', - 'The song "Row, Row, Row your boat" is about the authors pet cat.', - 'Cat\'s really like listening to music, but only if it is meowsic.', - 'The first cat was born in 1993.', - 'The Great Catsby is often considered a favorite among cats.', - 'When you\'re not home cats will often try on your shoes.', - 'Cats are actually born in kangaroo pouches.', - 'My friends cat has so many toes.', - 'The greatest writer of all time is a cat known as William Shakespurrrr.', - 'When a cat looks in a mirror it sees purrrrfection.', - 'What\'s a cats favorite movie? Pitch Purrrrfect.', - 'It\'s common knowledge that J.K. Meowling is the real author of the Hairy Potter series.', - 'If my cat went to Hogwarts it would be in Ravenpaw.', - 'Kitty McPurrs-a-lot would make an excellent name for a cat.', - 'Cats blame mice for everything.', - 'Boots & cats & boots & cats & boots & cats & boots & cats.', - 'When a cat is happy sometimes you can hear the soft whirr of its storage system recording the experience for an upcoming show & tell presentation.', - 'Some people think cats are aloof but actually they just really respect your independence.', - 'Modern cats evolved from a creature that looked exactly like Scratch Cat, but more orange.', - 'The reason there are so many cats on the Internet is that all the servers run on hamster wheels.', - 'The word "cat" spelled backwards is taco. Wait, no... burrito? Something like that.', - 'Cats like to attack twist ties, bottle caps, and other reminders of their lack of thumbs.', - 'Kittens were invented by scientists developing a standard measuring system for "cute."', - 'Due to the difference between metric units and other systems, 1 "mew" is about 1.6 "mrow" units.', - 'Cats sometimes knock things off shelves and tables in order to make those items safe from falling.', - 'A cat\'s tail is usually its second- or third-best friend.', - 'Catalogs were originally invented to keep logs of cats.', - 'Catering is food services for cats.', - 'Meow is slang for miauw.', - 'A cat is the only physical entity whose weight equals both 1 kilogram and 1 pound.', - 'Balls of yarn are created by watching videos of cats playing with them in reverse.', - 'Every time you sneeze a tiny kitten is born.', - 'In ancient Greece, cats kept humans as pets.', - 'Bongo cat is the great grandchild of nyancat.', - 'What\'s a cat\'s best friend? Its purrrrse.', - 'Sharing video online was created by cats to get the attention they feel they deserve.', - 'A "catseye" view is a point of view where everything is scratchable.', - 'Cat videos is the first step in their quest for world domination.', - 'The cat\'s meow is the cat\'s meow is the cat\'s meow is the cat\'s meow....', - 'A cat\'s intelligence is distributed throughout its body. Fully half of its brain matter is in its tail.', - 'Cats evolved chromatophores millions of years before octopuses.', - 'Cats are able to read minds through their whiskers.', - 'Soon after birth, cats extend their tails into a breeze and can sail hundreds of feet in the air for miles to find new territory.', - 'Cats\' memory is encoded in their DNA, which explains the knowing looks on their faces.', - 'Charles Francis Richter originally created his scale to measure the integrated power of cat purrs.', - 'Cat hair is being studied for use in building space elevators. Ironically, the first use of space elevators will be as scratching posts.', - 'When you are not looking, cats stare at a point exactly one foot behind your head.', - 'The infamous Weddell Sea cats glide from tree to tree in the forests of Dronning Maud.', - 'Once the antarctic ice melts, archologists believe the origins of cat civilization will be revealed.', - 'Cats rest on their backs because it helps them to absorb cuteness through their bellies.', - 'The 21cm hydrogen line was originally named after a 21cm long cat.', - 'Redshift would be a good name for a cat that does not like you and runs away.', - 'The MIT mascot is actually a cat that enjoys wood working.', - 'The cat packing conjecture is a widely accepted mathematical argument that proves an infinite number of cats is a good thing.', - 'Meor\'s Law states that the number of cats double every 18-24 months.', - 'A group of cats is called a hairball.', - 'There are more hairs on the head of a cat than there are scales on the head of a mouse.', - 'April 32nd is International Pet a Cat Day.', - 'The Scratch Cat is the only cat on the Internet.', - 'This sentence about cats is true.', - 'Cat bites are more common on days that end in y.', - 'Cats have a minimum of two ears.', - 'Cattails were developed in a lab as a way to reconstruct cats using plants. It didn’t work.', - 'Cats developed certain fur patterns to blend in with couch upholstery.', - 'Cats have thumbs, they’re just really really hard to see.', - 'Cats are the first most popular pet in the US, after dogs.', - 'If you rick roll a cat, it will never forgive you.', - 'Cats persuaded humans to create the internet.', - 'If you walk under a rainbow and then pet a black cat, it will actually bring you good luck.', - 'Cats can contain entire universes!', - 'Every time a hat block gets triggered, a cat starts purring.', - 'The Jungle Book is a true story based on a cat named Meowgli.', - 'Camera is a common misspelling of Catmera, a device invented specifically to record cats.', - 'Cats don\'t steal your breath because it doesn\'t smell like catfood.', - 'Cats hang out on keyboards in an attempt to send messages to other internet cats.', - 'Cat is an abbreviation for category.', - 'Cat is an acronym which stands for Cats Are Terrific.', - 'When cats are fully enclosed in boxes, they can teleport to alternative universes.', - 'If you put buttered toast butter-side up, on your cat, then your cat will be able to fly.' -]; - -/* eslint-enable max-len */ - -class Cats extends React.Component { - constructor (props) { - super(props); - bindAll(this, [ - 'handleCatsClick', - 'handleClose', - 'pickRandomFact' - ]); - this.state = { - open: false - }; - } - - handleCatsClick () { - this.setState({open: true}); - } - - handleClose () { - this.setState({open: false}); - } - - pickRandomFact () { - const randomNumber = Math.floor(Math.random() * (catFacts.length - 1)); - const catFact = catFacts[randomNumber]; - return catFact; - } - - pickRandomCatImage () { - const randomNumber = Math.floor(Math.random() * (catImages.length - 1)); - const catImage = catImages[randomNumber]; - return catImage; - } - - render () { - return ( -
- {'Cats...?'} -
- -
-
- {'Did you know...?'} -
-
-
-

{this.pickRandomFact()}

- -
-
-
- ); - - } -} - -module.exports = Cats; diff --git a/src/components/cats/cats.scss b/src/components/cats/cats.scss deleted file mode 100644 index aa3dfe257..000000000 --- a/src/components/cats/cats.scss +++ /dev/null @@ -1,30 +0,0 @@ -@import "../../colors"; -@import "../../frameless"; - -.mod-cats { - min-height: 15rem; - max-height: calc(100% - 8rem); - overflow: hidden; -} - -.cats-modal-header { - box-shadow: inset 0 -1px 0 0 $ui-blue-dark; - background-color: $ui-blue; -} - -.cats-modal-content { - margin: 0px auto; - box-shadow: none; - width: 100%; - display: flex; - align-items: center; - padding: 20px 50px; -} - -.cats-modal-content img { - width: 400px; - - @media #{$small}, #{$small-height} { - width: 100%; - } -} diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index b70798054..c6018f70a 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -6,7 +6,6 @@ const React = require('react'); const FooterBox = require('../container/footer.jsx'); const LanguageChooser = require('../../languagechooser/languagechooser.jsx'); -const Cats = require('../../cats/cats.jsx'); const frameless = require('../../../lib/frameless'); @@ -32,9 +31,6 @@ const Footer = props => ( -
- -
@@ -96,9 +92,6 @@ const Footer = props => (
-
- -
diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 36b2ef39c..73c67edc7 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -8,68 +8,52 @@ const thumbnailUrl = require('../../lib/user-thumbnail'); require('./grid.scss'); -const Grid = props => { - - const surpriseClass = props.isEggShaped ? 'egg' : ''; - - return ( -
- - {props.items.map((item, key) => { - const href = `/${props.itemType}/${item.id}/`; - const pianoFunc = props.onPianoEnter ? () => props.onPianoEnter(key) : null; - if (props.itemType === 'projects') { - return ( - - ); - } +const Grid = props => ( +
+ + {props.items.map((item, key) => { + const href = `/${props.itemType}/${item.id}/`; + if (props.itemType === 'projects') { return ( ); - })} - -
- ); -}; + } + return ( + + ); + })} +
+
+); Grid.propTypes = { className: PropTypes.string, - isEggShaped: PropTypes.bool, itemType: PropTypes.string, - items: PropTypes.arrayOf(PropTypes.object), - onPianoEnter: PropTypes.func, + items: PropTypes.arrayOf(PropTypes.object) }; Grid.defaultProps = { diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 030e8bb3c..3cd926af2 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -88,15 +88,6 @@ } } - &.egg { - .thumbnail { - margin: 7px 27px !important; - width: 180px !important; - border-radius: 50% 50% 50% 50% / 60% 60% 40% 40% !important; - overflow: hidden; - } - } - &.column { flex-direction: column; justify-content: center; diff --git a/src/components/thumbnail/thumbnail.jsx b/src/components/thumbnail/thumbnail.jsx index 378fdc3b3..461cd67b1 100644 --- a/src/components/thumbnail/thumbnail.jsx +++ b/src/components/thumbnail/thumbnail.jsx @@ -8,8 +8,6 @@ const Thumbnail = props => { const extra = []; const info = []; - const surpriseClass = props.onPianoEnter ? 'pianoKey' : ''; - if (props.loves && props.showLoves) { extra.push(
{ ); } - return (
{imgElement}
@@ -144,7 +139,6 @@ Thumbnail.propTypes = { href: PropTypes.string, linkTitle: PropTypes.bool, loves: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - onPianoEnter: PropTypes.func, remixes: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), showAvatar: PropTypes.bool, showFavorites: PropTypes.bool, diff --git a/src/components/thumbnail/thumbnail.scss b/src/components/thumbnail/thumbnail.scss index e1f878cb9..e1aee35ad 100644 --- a/src/components/thumbnail/thumbnail.scss +++ b/src/components/thumbnail/thumbnail.scss @@ -108,10 +108,4 @@ height: $gallery-height; } } - - &.pianoKey { - &:hover { - box-shadow: 0 0 0 3px #4d97ff; - } - } } diff --git a/src/lib/piano.js b/src/lib/piano.js deleted file mode 100644 index 70e432962..000000000 --- a/src/lib/piano.js +++ /dev/null @@ -1,83 +0,0 @@ -const tone = require('tone'); - -tone.Master.volume.value = -25; - -const synthPiano = new tone.MonoSynth({ - oscillator: { - type: 'square' - }, - filter: { - Q: 2, - type: 'lowpass', - rolloff: -12 - }, - envelope: { - attack: 0.005, - decay: 3, - sustain: 0, - release: 0.45 - }, - filterEnvelope: { - attack: 0.5, - decay: 0.32, - sustain: 0.9, - release: 3, - baseFrequency: 700, - octaves: 2.3 - } -}).toMaster(); - -const synthSaw = new tone.Synth({ - oscillator: { - type: 'fatsawtooth', - count: 3, - spread: 30 - }, - envelope: { - attack: 0.01, - decay: 0.1, - sustain: 0.5, - release: 0.4, - attackCurve: 'exponential' - } -}).toMaster(); - -const synthWah = new tone.MonoSynth({ - oscillator: { - type: 'pwm', - modulationFrequency: 1 - }, - filter: { - Q: 6, - rolloff: -24 - }, - envelope: { - attack: 0.025, - decay: 0.3, - sustain: 0.9, - release: 2 - }, - filterEnvelope: { - attack: 0.245, - decay: 0.131, - sustain: 0.5, - release: 2, - baseFrequency: 20, - octaves: 7.2, - exponent: 2 - } -}).toMaster(); - -const piano = (noteNumber, instrument) => { - const notes = ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4', 'C5']; - - if (instrument === 0) { - synthPiano.triggerAttackRelease(notes[noteNumber % 8], '16n'); - } else if (instrument === 1) { - synthSaw.triggerAttackRelease(notes[noteNumber % 8], '8n'); - } else if (instrument === 2) { - synthWah.triggerAttackRelease(notes[noteNumber % 8], '4n'); - } -}; - -module.exports = piano; diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 9f2c04c4c..f2dd1ea25 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -19,8 +19,6 @@ const Grid = require('../../components/grid/grid.jsx'); require('./explore.scss'); -const piano = require('../../lib/piano'); - class Explore extends React.Component { constructor (props) { super(props); @@ -29,7 +27,6 @@ class Explore extends React.Component { 'handleGetExploreMore', 'changeItemType', 'handleChangeSortMode', - 'handlePianoHover', 'getBubble', 'getTab' ]); @@ -41,10 +38,6 @@ class Explore extends React.Component { componentDidMount () { this.handleGetExploreMore(); } - handlePianoHover (noteNumber) { - const instumentNumber = this.state.acceptableModes.indexOf(this.state.mode) % 3; - piano(noteNumber, instumentNumber); - } getExploreState () { const categoryOptions = { all: '*', @@ -214,7 +207,6 @@ class Explore extends React.Component { showFavorites={false} showLoves={false} showViews={false} - onPianoEnter={this.state.category === 'music' ? this.handlePianoHover : null} />