Git Product home page Git Product logo

Comments (12)

NeilFraser avatar NeilFraser commented on August 10, 2024

Minor point: The "=" button on Scratch zooms to 100%, where as its equivalent in Blockly zooms to 100% and also snaps to the center of the workspace. I think snapping to the center is better (otherwise one can end up looking way offscreen), but this functionality can be disabled if you want to keep the Scratch behaviour.

from scratch-blocks.

tmickel avatar tmickel commented on August 10, 2024

Is it even possible to properly support pinch-to-zoom on desktop? I'd say no given that many users will be using a mouse (and I'm pretty sure JavaScript click events don't support multiple pointers/gestures).

We could go for pinch-to-zoom on touch and button controls on desktop, if we're willing to have an inconsistent experience.

Or, my preferred approach would be having buttons on both platforms, which would let us do multi-touch on tablets/phones.

from scratch-blocks.

NeilFraser avatar NeilFraser commented on August 10, 2024

If the desktop only has a mouse, then pinch-to-zoom is impossible. But we definitely want to support pinch-to-zoom on desktops with trackpads, touch screens, or other multi-touch inputs. JS exposes a list of touch points, the rest is just math.

from scratch-blocks.

tmickel avatar tmickel commented on August 10, 2024

On my Macbook no touch events seem to be generated in browsers (in Google Maps, for example, the whole page zooms, not just the map frame). I'm assuming devices with touch screens might work. We'd also need to disable page-level zooming triggered by multitouch gestures in the browser.

from scratch-blocks.

thisandagain avatar thisandagain commented on August 10, 2024

@carljbowman I recommend we avoid zoom controls for the I/O prototype. Thoughts?

from scratch-blocks.

carljbowman avatar carljbowman commented on August 10, 2024

@thisandagain - Holding off on zoom for the I/O prototype is fine with me. Especially with the Nexus 9's larger screen there is less of a need to zoom out/in to move around.

from scratch-blocks.

tmickel avatar tmickel commented on August 10, 2024

@carljbowman This is on the list for the prototype, so we'll need a design.

from scratch-blocks.

carljbowman avatar carljbowman commented on August 10, 2024

Assigning both @rachel-fenichel and @picklesrus – Was not sure who to assign as I know there are refactors going on in Blockly that may impact these changes. Feel free to reassign.

We held off on exploring pinch zoom in touch environments, namely the I/O prototype. As we focus on the desktop experience, pinch zoom will remain out of scope.

Zoom In/Out Behavior

Overall we should keep Blockly's zoom behavior: zooming towards the center of the workspace viewport. Since the viewport includes the Block Palette and in Scratch Blocks we always have the palette open the zoom feels a bit off. We need to account for the blocks palette width (vertical grammar) or height (horizontal grammar) when zooming.

screen shot 2017-01-17 at 9 14 04 am

Reset Zoom Control Behavior

Currently Blockly does two things when resetting: returns to 100% zoom and repositions the viewport to the center of the blocks. This centering behavior can be a bit disorienting and should be removed.

Reset should instead just return to 100% zoom and position to the center of the viewport, similarly to how zooming in/out positions.

Zoom Controls Postion

If this is not already implemented within the code, we should allow the controls to be positionable in the corners of the workspace: top-left, top-right, bottom-left, bottom-right. Default position in Scratch-blocks should be bottom-right (or in RTL bottom-left).

Design & Icon Assets

screen shot 2017-01-17 at 9 35 10 am

zoom-icons.zip

Scroll Gestures

The current behavior in scratch-gui feels appropriate: scrolling should move (scroll) the workspace in rather than zooming the workspace, which is the current behavior within the Blockly Playground.

from scratch-blocks.

rachel-fenichel avatar rachel-fenichel commented on August 10, 2024

More spec, from an offline discussion with @carljbowman:
The zoom buttons/icons on a layer above the blocks by default. When dragging the workspace the blocks move above the icons. When dragging blocks/block stacks, the dragging blocks move above the icons.
The icons should be opaque with a button around them.

from scratch-blocks.

thisandagain avatar thisandagain commented on August 10, 2024

@carljbowman From the assets here (particularly due to the mock being zoomed in) there are still a few questions:

  • What are the outer dimensions of these buttons (the assets you provided are ~10x10px / existing zoom controls are 32x32px)?
  • What is the vertical margin between them?
  • Is there a hover state?

Alternatively: having the latest general GUI mockup easily available in vector could help alleviate these questions as well.

from scratch-blocks.

thisandagain avatar thisandagain commented on August 10, 2024

Quick first pass:

Current status at 300% zoom (compare with above both at 100%):
image

Current status at 100% zoom:
image

I switched these over to SVG (currently renders from sprites.png), but SVG rendering thins out the strokes (differences in anti aliasing). Looks like they are breaking up / hard to parse at 100% zoom. @carljbowman and @lifeinchords any thoughts? My instinct is to bulk up the sizing and strokes a bit.

WIP commit here: thisandagain@fd95bb1

from scratch-blocks.

cpseager avatar cpseager commented on August 10, 2024

Would putting 100% as the middle icon (as it was in 2) make its function more obvious?

from scratch-blocks.

Related Issues (20)

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.