Commit Graph
123 Commits
Author SHA1 Message Date
Eric Rosenbaum c4decffcdb Check for empty sound array 2017-02-15 17:27:36 -05:00
Steven Dale 74dde69fd0 Design pass: layout panes, sprite libraries, info area, import buttons, + menu bar (#83)
* Covers parts of these issues: GUI layout panes (#69), sprite libraries (#12), import buttons (#64), menu bar (#67), and sprite info area (#53)

~ Refactored layout pane structure by removing `display: flex` from `.box`, by default. Declaring flex instead only where specifically needed. This helped fix layout quirks, and should help us avoid hard to find issues related to nested flex boxes

~ Added descriptive classnames to boxes/containers/wrappers. Moved more padding, margins + layout into these wrappers to help with component reusability.

~ Set up a spacer unit variable inside `gui.css`, to start keeping consistent padding, margins and rounded corners between panes. Used [CSS/PostCSS Modules](https://github.com/css-modules/postcss-modules-values) to avoid SCSS dependency.

~ Refactored inline styles from JSX, into CSS files. 2 reasons: a) prepping for reuse of CSS Module variables. b) Feels easier to debug complex flex layouts when all the styles are in one place vs JS/HTML/CSS syntax mixed together

~ Added menu bar into layout via new component, and sprite info header in sprite selector pane, with stubs for the labels + forms. Sprite items are correctly scrolling, while leaving the header fixed, in Chrome. Mostly working in FFx. Not working in Safari, IE yet.

~ Style pass on library modal

~ Experimenting with a few different transition styles: Logo in menu bar, sprite library items, Add buttons.
2017-02-15 08:46:16 -05:00
TheBrokenRail ff0ed97e27 Add sprites to drop-down menus (#81) 2017-02-13 19:02:25 -05:00
Eric Rosenbaum f9df8c7cfa Merge pull request #80 from ericrosenbaum/dynamic-menus
Dynamic menus for costumes and backdrops
2017-02-10 14:13:13 -05:00
Eric Rosenbaum 312fafab08 Dynamic menus for costumes and backdrops 2017-02-09 17:21:56 -05:00
Eric Rosenbaum 13e1a377f3 Merge pull request #77 from ericrosenbaum/sound-menu-update
PygmyMarmosetPatch for sound menu updates on workspace update
2017-02-08 14:15:46 -05:00
Eric Rosenbaum f2cad9c115 Sound menu updates on workspace update 2017-02-08 12:15:34 -05:00
Eric Rosenbaum 861aeb4f6f Merge pull request #76 from ericrosenbaum/sound-menu
Monkeypatch dynamic sound menu into ScratchBlocks
2017-02-07 17:33:08 -05:00
Eric Rosenbaum c4ae964a3e monkeypatch dynamic sound menu into scratchblocks
/ht @rschamp
2017-02-07 17:23:11 -05:00
Ray Schamp 14781062d9 Merge pull request #72 from rschamp/perf-target-pane
Implement shouldComponentUpdate on TargetPane
2017-02-07 14:02:02 -05:00
Ray Schamp ac8d93d28f Use correct syntax for viewport meta tag 2017-02-06 12:33:59 -05:00
Ray Schamp 596b61626e Supply viewport metadata for retina displays
Resolves #73
2017-02-06 12:07:22 -05:00
Ray Schamp bd648e3bd5 Implement shouldComponentUpdate on TargetPane
Improves performance by comparing sprite info values (rather than object identities), and by excluding irrelevant data from this comparison.
2017-02-03 17:23:18 -05:00
Ray Schamp 5956e58dc7 Merge pull request #60 from LLK/greenkeeper/initial
Update dependencies to enable Greenkeeper 🌴
2017-02-02 15:02:09 -05:00
Ray Schamp 16b1c90706 Fix components for react-modal 1.6.5 2017-02-02 14:48:24 -05:00
Ray Schamp 87eab8551d Don't render library modals until visible
Previously modal content was rendered before the modal was use, causing a re-render on every spriteInfoReport.
2017-02-01 10:58:21 -05:00
Ray Schamp 6385cb069c Cache stage bounding box
`getBoundingClientRect` forces WebKit to recalculate the layout ("force reflow"), so cache the canvas bounding box rather than getting it on every mouse event.
2017-01-31 10:38:58 -05:00
TheBrokenRail 12b73fb52a Make Compatibility Mode on By Default 2017-01-30 16:58:37 -05:00
TheBrokenRail b9dee65a2e Make Insertion Marker Visible 2017-01-27 19:32:54 -05:00
TheBrokenRail 139a67dd65 Change ScratchBlocks Colors to match concept colors from #1 (#46)
Change Toolbox Categories to match new design color
2017-01-27 11:00:28 -05:00
Cosmic Web Services a97292b73e Update green-flag.css 2017-01-23 20:43:19 -05:00
Cosmic Web Services cba56276fc Update box.css 2017-01-23 20:37:13 -05:00
Silly Inventor e6d036aa14 Added Image Size and Resolution Data to Backdrop Library For Missing Files 2017-01-19 12:17:12 -05:00
Andrew Sliwinski afb6d1fe7d Merge pull request #34 from rschamp/static-libraries
Improve media library performance
2017-01-17 17:27:55 -05:00
Ray Schamp 58d5286b60 Calculate rotation centers from backdrop library
The `info` property seems to refer to the image size, not the rotation center in the backdrop library. So if it exists, halve it to find the center.

Towards #18
2017-01-13 12:52:24 -05:00
Ray Schamp 845076ca18 Replace other libraries with static json
Remove MediaLibrary helper since it is now unused
2017-01-12 09:26:57 -05:00
Ray Schamp 26bfe9560f Static-ify sprite library 2017-01-11 18:58:46 -05:00
Ray Schamp 8168483d98 Use native SVG rendering for library thumbnails
Now possible because we send down the correct content type for SVG assets.
2017-01-09 16:15:55 -05:00
Eric Rosenbaum 2dd8c55ba0 update package name for scratch-audio 2017-01-06 10:14:32 -05:00
Eric Rosenbaum 58984a1ec5 instantiate audio engine on stage 2017-01-04 18:35:20 -05:00
Ray Schamp f9172d3a4a Merge pull request #29 from rschamp/declutter
YAGNI: Remove clutter from GUI component
2016-12-20 17:04:19 -05:00
Ray Schamp b85c61a60b YAGNI: Remove clutter from GUI component 2016-12-20 16:49:43 -05:00
Ray Schamp 1fa695dfec Update in/active states for flag and stop 2016-12-16 10:10:53 -05:00
Ray Schamp f9970d6c87 Lint 2016-12-15 14:23:08 -05:00
Ray Schamp 370d66e45f Adhere to Trello CSS guide in green flag/stop 2016-12-15 11:15:40 -05:00
Ray Schamp 6ae2fbb6a0 Use Box in libraries and modal 2016-12-15 11:15:18 -05:00
Ray Schamp 789fd14653 Layout pass
Move layout styles from component stylesheets to the GUI, or the component that is placing the component.

Add a new `Box` component to control layouts, basically giving a convenient way to lay out with flexbox.

Use `Box` as the output component for any component that may need to be passed layout options. The props passing convention allows giving layout props to the final `Box` component, making wrapping with another `Box` unnecessary in some cases.
2016-12-15 11:14:40 -05:00
Ray Schamp 90c40716a6 Move MediaLibrary init to target-pane
It was not being used by GUI so no reason for it to be initialized there
2016-12-12 11:28:09 -05:00
Ray Schamp bd9910184b Sprites always have costume data now 2016-12-12 11:22:06 -05:00
Ray Schamp 525623769d Make ...rest syntax consistent. 2016-12-12 11:18:52 -05:00
Ray Schamp 7542f1b549 Give GUIComponent responsibility of children
This will allow the GUIComponent to have control over the layout
2016-12-07 16:44:35 -05:00
Ray Schamp 16fbb64cca Use CSS modules for styles
The inline css method gives us nothing that CSS modules can't give us. This puts the project more in line with the way www works, and makes CSS actually readable.

Using class names gives us full control of the modal styles.
2016-12-07 15:59:07 -05:00
Ray Schamp d139609100 Style pass
Refactor SpriteSelector into "Target Pane" which contains the sprite selector, stage selector, and the buttons for new sprites, costumes and backdrops.
2016-12-06 18:12:57 -05:00
Ray Schamp b29670bc52 Split stage selection from sprites
Add a new stage selection component that displays the stage separately from the sprite list.
2016-12-05 18:01:17 -05:00
Ray Schamp cf85a3b1e8 Reduxify modals 2016-12-05 10:47:58 -05:00
Ray Schamp 3cea22ac8e Fix editingTarget selection 2016-12-05 10:47:24 -05:00
Ray Schamp 24389c30c3 Reduxify sprite selector
In preparation to split the sprites from the stage, start managing the target list state in a single place.
2016-12-02 19:16:19 -05:00
Ray Schamp ccc8a1e25b Don't use node rules in src/ eslint config 2016-12-02 19:12:17 -05:00
Ray Schamp 865a2916d2 Add custom sprite selector with costume display 2016-12-02 15:22:50 -05:00
Ray Schamp e3b0069487 Refactor libraries to be a part of SpriteSelector 2016-12-02 15:22:50 -05:00