Code Monkey home page Code Monkey logo

snap's People

Contributors

bl-nero avatar brianharvey avatar brollb avatar bromagosa avatar cycomachead avatar cymplecy avatar ego-lay-atman-bay avatar harshpadhye avatar hm100 avatar jadga-h avatar jeeves833 avatar jguille2 avatar jmoenig avatar joecooldoo avatar kach avatar mmsequeira avatar nathan avatar p1nef0rest935 avatar r4356th avatar sdmeijer avatar simon-mong avatar superruzafa avatar swiperthefox avatar temaps avatar tnegash avatar ubertao avatar virajmahesh avatar warpedwartwars avatar xbzzzz avatar yossicohen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snap's Issues

Passing NaN to <move () steps> causes the sprite to move offscreen

Passing a non-number value as the argument to <move () steps>, e.g., the result of <join (hello ) (world)>, causes the sprite to move offscreen; the exact position varies depending on the size of your viewport.

This is caused by SpriteMorph.prototype.forward failing to check for NaN in casting its argument from a string to a number. The simplest fix is to use steps * this.parent.scale || 0 rather than parseFloat(steps * this.parent.scale).

Other affected blocks:

  • <turn left () degrees> and <turn right () degrees> (which cause the default sprite to turn into a diagonal line)
  • <set size to ()> and <change size by ()> (which both make the sprite a single pixel wide regardless of its previous size)
  • <set pen size to ()> and <change pen size by ()> (which draws dotted lines…?)
  • <go to x: () y: ()> (which moves the sprite offscreen)
  • <change x by ()> and <change y by ()> (which set it to zero)
  • <set tempo to ()> (which sets it to NaN)
  • <change tempo by ()> (which sets it to the minimum value)

The general approach in these blocks of using parseFloat(value || '0') to cast to a number is flawed because it only guards against an empty string value and doesn't respond well to non-numeric strings—it still produces NaN. +value || 0 is a good solution for a zero default value (what Scratch and BYOB use), and isNaN(value) ? default : +value is good for non-zero default values.

Non-localized strings

There are a few non-localized strings (or at least not included in the German localization):

  • Scale blocks…
  • Rasterize SVGs
  • url…
  • export project media only…
  • export project without media…
  • export project as cloud data…

Spaces are rendered as circles in enumerated inputs

This looks a bit unpleasant against the darker block background color.

Screen Shot 2013-04-13 at 09 32 29

I see the reason for rendering them in user-editable fields, but is this intentional for enumerated inputs? (They're not shown in the menu of choices.)

"show definition" command for variables

I propose that right-clicking on a variable reporter or setter block (CHANGE or SET) would present the user with a "show definition" command. If it refers to a variable that has not been declared in its lexical scope, the command would be hidden. When the command is selected, the following would occur:

  • If the variable to which the block refers is a script-local variable, the SCRIPT VARIABLES block in which it is declared would be scrolled into view.
  • If the variable to which the block refers is a formal parameter to a block, the block prototype would be scrolled into view.
  • If the variable is a global or sprite-local variable, the variables palette would be shown and the variable reporter corresponding to the variable would be scrolled into view.

Incorrect ellipsis on "Import tools…" menu item

An ellipsis in a menu item indicates that further user interaction is required to complete that command (often this is in the form of a modal or nonmodal dialog). Clicking "Import tools…" imports the full tool set and does not prompt the user for any more information, so it should not end with an ellipsis.

Renaming variables should rename all occurrences within the scope of the variable

As it currently functions, choosing "rename…" from a variable reporter's context menu only changes the label of that variable reporter—it doesn't actually change the declaration of the variable or any of its other occurrences.

Before renaming:
Screen Shot 2013-04-14 at 11 28 19

After renaming:
Screen Shot 2013-04-14 at 11 28 52

Renaming a variable means changing its name, so when a user renames a variable its declaration (with script variables … or as a sprite or global variable) should also be changed to reflect the new name, as should all reporters within the variable's scope which refer to it.

Desired result:

Screen Shot 2013-04-14 at 11 37 00

In addition to being a much more intuitive result for the "rename" command, this process is also consistent with Scratch 2.0's variable renaming feature.

Users should still be able to change the variable to which the reporter points (i.e., change only its own label), but this feature should be available from the "relabel…" command rather than the "rename…" command.

Large amounts of text cause rendering errors

If a comment (wrapped to a reasonably narrow line width) or block contains a large amount of text, the scripting area which contains it no longer renders its background texture. The text itself is also not rendered, nor is the background of the comment/block.

Screen Shot 2013-04-12 at 12 44 29 PM

Screen Shot 2013-04-12 at 19 06 47

Dead key input not working (Mac)

At least in Mac OS X, non-ASCII characters cannot be input the usual way (i.e., ´+a to get á). All non-ASCII characteres must thus be pasted from elsewhere.

Incorrect hovered state in "About" dialog

  1. Open the about dialog (Snap! logo → About…)
  2. Click the "Modules…" button
  3. Without moving the mouse, click the "Back…" button
  4. Click the "Credits…" or "License…" button

The "Back…" button looks like the mouse is hovered over it, even though it is not.

Screen Shot 2013-04-12 at 19 00 33

General Lag / Crashing in Firefox

When I've tried snap on win7 in firefox or chrome, there is a general lag - its very slow to load - and some script or other often freezes the browser. Sometimes basic UI interaction works at first, until I try to load the official blocks, or open a project. Is this expected at this stage in development?

Watching circular lists breaks Snap!

While Snap! allows cirularity in lists and is able to serialize / deserialize them displaying them in a list watcher - either on stage or in a bubble - freezes Snap!

Calling things "hasOwnProperty" breaks Snap!

  • Making a variable called hasOwnProperty breaks the variables palette.
  • Making a sprite called hasOwnProperty breaks the sprite name menu.
  • Making a costume called hasOwnProperty breaks the costume name menu.
  • Making a sound called hasOwnProperty breaks the sound name menu.
  • Making a broadcast called hasOwnProperty breaks the broadcast menu.

Keyboard shortcuts

It would be really nice if Snap! supported keyboard shortcuts for these common commands:

  • ⌘S / Ctrl+S – Save
  • ⇧⌘S / Ctrl+Shift+S – Save as…
  • ⌘O / Ctrl+O – Open
  • ⌘N / Ctrl+N – New
  • ⌥⌘T / Ctrl+Alt+T – Import tools (not ⌘T / Ctrl+T because that's a frequently-used browser command)
  • (Alternative to above: ⇧⌘N / Ctrl+Shift+N – New project with tools)
  • ⌘U / Ctrl+U – Clean up current scripting area
  • ⌘M / Ctrl+M – New sprite
  • ⌘K / Ctrl+K – Make a variable (anyone have a better suggestion for this that's not ⌘V / Ctrl+V, ⌘L / Ctrl+L or ⌘A / Ctrl+A?)
  • ⌘B / Ctrl+B – Make a block

(I'm aware that Snap! already has keyboard shortcuts for starting and stopping scripts)

Clicking and dragging on a dialog button moves the dialog

When a user clicks and drags on a dialog button, he/she picks up the dialog itself and can't finish clicking the button. The button should prevent the drag event from propagating to its parent dialog so a user can press the mouse, drag slightly, release it, and still complete the click; this is the behavior exhibited by other buttons in the interface, e.g., the palette buttons.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.