Commit Graph
97 Commits
Author SHA1 Message Date
Chris Garrity e2c2bd3927 remove callbacks 2019-07-31 15:38:30 -04:00
Chris Garrity 043e31a472 Refactor
* split play-button into container and component
* revised sound library tile:
  * play button in upper right
  * smaller sound icon (make the tile less loaded)
2019-07-31 12:05:16 -04:00
Chris Garrity 91f5c4910f refactor to create play-button for sound items
Play button doesn’t have a ‘touch-outside’ listener to stop sounds. That seems to be ok as other events cause the sound to stop.

Both handleClick and handleMouseDown are needed. Must use handleMouseDown for `preventDefault` to skip setting focus on the item. handleClick is needed to prevent the Click from propagating to the item and selecting it.
2019-07-31 12:05:16 -04:00
Chris Garrity 41cc11c32e Handle sound ending
Update UI play/stop button when the sound ends
2019-07-31 12:05:16 -04:00
Chris Garrity 6216e7dfa7 improve touch interactions
Play button is larger (easier to touch). Can both start and stop sounds.
Sound doesn’t restart on mouseEnter if the sound is already playing.
Sound stops if you move off play button

Missing: stop button does not revert to play button when the sound finishes.
2019-07-31 12:05:16 -04:00
Chris Garrity f3d1a91533 Add play buttons to sound library tiles for touch
Add prop to library items to show a play button. If a play button is present the ‘play on hover’ only applies over the icon rather than the full tile.
2019-07-31 12:05:16 -04:00
Paul Kaplan cea2dd9ab9 Fix spacing 2019-06-21 09:45:23 -04:00
Paul Kaplan 7c1931749c Use name or url for library keys 2019-06-21 09:19:43 -04:00
Paul Kaplan c4480b9ade Show spinner before loading library content 2019-06-07 09:05:56 -04:00
Paul Kaplan 0fbbf55b51 Revert "Load library images through storage" 2019-04-11 11:13:34 -04:00
Christopher Willis-Ford 5f6b89ec2a Simplify unnecessarily complicated loop 2019-03-18 12:07:41 -07:00
Chris Willis-Ford f773ee2dab Merge branch 'develop' into load-library-images-through-storage 2019-03-13 16:33:38 -07:00
Christopher Willis-Ford 790fc13157 Fix ScratchImage incompatibilities 2019-03-12 15:01:50 -07:00
Christopher Willis-Ford 5c16407818 Fix imageSource for rotating library icons 2019-03-12 15:01:50 -07:00
Christopher Willis-Ford d8201fd4ad Merge branch 'develop' into scratch-desktop
Conflicts:
	src/components/library-item/library-item.jsx
	src/components/library/library.jsx
	src/components/menu-bar/menu-bar.jsx
	src/containers/library-item.jsx
	src/lib/project-saver-hoc.jsx
2019-03-12 15:01:42 -07:00
Christopher Willis-Ford 46ce75bf2a Prevent crash when opening tutorials library 2019-03-12 15:01:23 -07:00
Christopher Willis-Ford d1c3cf8bb0 Move image-from-storage code into new ScratchImage component 2019-03-12 14:38:25 -07:00
Christopher Willis-Ford db9236bef2 Fix sprite lib animation: move load into LibraryItem
The `LibraryItem` component has been split into a container, responsible
for handling interaction with the storage module, and a component,
responsible for presentation. The component now always takes an
`iconURI` and the logic to load an icon from storage has been moved from
`Library` into `LibraryItem`.

TODO: move animation logic from `SpriteLibrary` into `LibraryItem`. This
should simplify the code quite a bit and might also improve performance.
2019-03-12 14:38:25 -07:00
Paul Kaplan 51f9aafec1 Remove analytics library imports 2019-03-11 15:41:07 -04:00
Paul Kaplan e746b98d83 Remove some of the high-volume analytics events
Too much traffic, not enough value. Leaving stuff having to do with tips library/tutorial card navigation as well as hardware extension connectivity, as those help us find issues with Scratch.
2019-03-11 15:14:30 -04:00
Christopher Willis-Ford 86b6e12453 WIP: Load media libs with scratch-storage
The basics work but hover animations are broken
2018-12-20 18:45:55 -08:00
Ben Wheeler c484ee5962 removed two more event handlers from library-item component, moved them to container 2018-12-17 16:59:13 -05:00
Ben Wheeler 893beb5a15 added library-item container, moved costume rotation to library items 2018-12-17 09:43:23 -05:00
Evelyn Eastmond 6dac629fbd Fixing filtering based on library item name to check for name validity first. 2018-12-06 13:28:44 -05:00
Evelyn Eastmond dffe7c0edc Beginning to add two, hidden tutorial library items for WeDo2 and EV3. 2018-12-06 11:31:00 -05:00
Evelyn Eastmond 16f8f7feeb Removing 100% height, resolves #3825. 2018-11-19 10:51:02 -05:00
Evelyn Eastmond eeaeb58e35 Filter new library item formatting on extensions only. 2018-11-13 11:44:43 -05:00
Evelyn Eastmond 671aad0554 Adding props for bluetoothRequired, internetConnectionRequired and collaborator, etc. 2018-11-13 11:44:43 -05:00
Paul Kaplan 9ff25ab93e Add tutorial filters and tags, and fix translated search in libraries 2018-10-23 15:34:43 -04:00
chrisgarrity c906ae556c Localize library tags
* convert all tags to have a `tag` field corresponding to the query parameter, and `intlLabel` field that defines the title message for `FormattedMessage`
* define all the tag messages in a shared file so they can be included in multiple places.
* convert the `TagButton` to use `tag` for the `onclick` handler value, and localize `intlLabel` for the title.

In the library I’ve continued to use `tag.toLowercase()` even though all the tags are currently defined as lowercase. It’s safer, but currently not strictly needed.
2018-09-17 14:55:20 -04:00
Paul Kaplan 608ff599c8 Use pageview with query param for tracking search usage
This replaces the event-based search analytics because that method does not allow us to get the advantages of more search-specific analytics.
2018-07-23 11:22:00 -04:00
Paul Kaplan c6e67044dd Add library analytics for searches 2018-07-19 11:29:44 -04:00
sjhuang26 535583e756 Change CSS 2018-06-10 17:37:30 -04:00
sjhuang26 a626062931 Additional fixes 2018-05-29 16:03:34 -04:00
sjhuang26 2aa3876fce Scroll to top when search query or tag changed 2018-05-28 17:30:46 -04:00
chrisgarrity 45032cc291 Add translation to missing strings
Question, should ‘x’ and ‘y’ be localizable?
2018-04-30 12:22:23 -04:00
Paul Kaplan 76bfe175aa Framework and demo content for how-tos inside the editor (#1867)
* WIP tips

* WIP first card stack

* WIP use tips reducer to show things to try

* single card deck similar to mask sequence

* collapse option

* Add zoom card

* WIP tips

* Reorganized to redux

* Add zooming to the gifs

* Blue cards + navigation

* Add tips to new nav bar

* Remove blue

* Update design with icons

* deck updates wip

* Updated card decks

* Add videos to libraries

* Update initial card and clicker preview

* Add backdrop to initial card step.

* WIP use vimeo player instead

* New simple spin deck

* Spin around and say hello decks

* Update button and sub-card styles

* Fix "tips" button in menu bar

* Use move cursor

* Fix cursor

* Use same image for deck preview and library

* Fix cursor again

* Update clicker game deck

* Add videos as single-step decks

* Change tips in menu bar to ? icon

* Change “tips” to “how-tos” in library

* Add help icon to cards

* Update deck library images

* Add drag cover for youtube video to prevent catching mouseup

* add a step to spin deck for clicking control

* Blue bar style updates

* Add step pips

* Update clicker game name to run away

* Fix image padding

* Add change color step to spin deck

* Add start sound step to run away deck

* Update say deck to start with adding a sprite

* Remove package lock

* Remove zooming functionality

* Remove unnecassary prototype changes

* Split up rendering of cards into smaller parts

* Use FormattedMessage for all strings

* Automatic lint fixes

* Almost finished with lint errors!

* Fix more lint errors

* Clean up CSS

* Fix webpack config
2018-04-27 11:11:42 -04:00
Ray Schamp 69e242f051 Merge pull request #1858 from rschamp/feature/modal-back-button
Allow the back button to work with libraries
2018-04-24 16:25:01 -04:00
Ray Schamp 3c576a0110 Allow the back button to work with libraries
Push to history when the library mounts. Whenever popstate occurs after mounting, request to be closed.

Behavior captured in the `Modal` container. If we want to re-use this functionality for anything else that uses `ModalComponent`, just use the `Modal` container rather than `ModalComponent`.
2018-04-24 09:35:46 -04:00
Ray Schamp afbb63bacc Merge pull request #1841 from rschamp/bugfix/search-height
Make the library filter input full height
2018-04-24 09:27:07 -04:00
Ray Schamp c6bab0a0f1 Merge pull request #1842 from rschamp/bugfix/library-header-height
Account for filter bar in library grid height
2018-04-24 09:26:37 -04:00
Paul Kaplan 170eb4343c Make whole search clickable 2018-04-23 10:13:19 -04:00
Ray Schamp f9614f1996 Account for filter bar in library grid height
This prevents the fullscreen modal from being scrollable by removing extra height from the library
2018-04-21 14:20:33 -04:00
Ray Schamp 9049f24b17 Search name and tags while filtering
Concatenate all the tags plus the library item name into one string and search for a match within that. This allows queries to partially match tags and library item names.

The `\n` delimiter is because my first choices of `' '` or `,` are typeable, and would end up matching everything.
2018-04-21 14:12:21 -04:00
Ray Schamp a36ff212ea Final spacing and height tweaks with @carljbowman 2018-04-20 12:05:17 -04:00
Ray Schamp fa1e6c9333 Clip overflowed tags 2018-04-20 10:18:08 -04:00
Ray Schamp 3601eacb1d Fix propType warnings
Including action-menu which was also giving one when the backdrop library opened.
Localize the costume library, I missed it while doing the other libraries.
2018-04-20 09:47:59 -04:00
Ray Schamp c8e25b4192 Clear tags on filter query change 2018-04-19 16:01:43 -04:00
Ray Schamp 6cf8c16021 Revert joke 2018-04-19 14:00:38 -04:00
Ray Schamp fc87a1e0e0 Implement tag filtering 2018-04-19 14:00:38 -04:00