scratchfoundation / scratchfoundation/scratch-blocks

Custom menu widgets for numeric input fields

Open
#996 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design enhancement
Dominant language
JavaScript
Stars
2.8k
Forks
1.6k
Avg merge
4h 51m
Merged PRs (30d)
12

Description

We currently have a few custom menu widgets for fields like the color and angle pickers. We should consider adding custom menu widgets with sliders for all or almost all blocks that that have numeric inputs, because:

  • Having the option to move a slider rather than typing a number can be convenient and more child-friendly
  • This would help kids who do not know about negative numbers or about typing the negative sign to solve problems such as making a sprite "go backward" or "get smaller" (see https://github.com/LLK/scratch-gui/issues/483 and https://github.com/LLK/scratch-gui/issues/499)
  • The slider could display a marker at 0, and optionally at fixed min and max values to which the value is internally clamped- these clamp points are otherwise invisible to users (!) and can cause confusion.

Here are some examples:

  • The "move 10 steps" block would have a slider from (say) -50 to 50.
  • The "turn 15 degrees" block would have a slider from (say) -180 to 180.
  • The "go to x: 0 y: 0" would have sliders for each axis, with ranges corresponding to the stage size (-180 to 180 and -240 to 240)
  • Blocks with time input such as "wait 1 secs" and the "glide" block would have sliders that do not go negative (zero at the left edge), and have a relatively small maximum value (such as 5 seconds). Unlike most other sliders, this would not move in increments of 1 but instead 0.1, so you could set a value like 1.5.
  • the "set size" block would also have a minimum of zero, and a relatively low maximum, such as 200% or 250% (this is a tricky case, because as far as I know the maximum scale that will actually work depends on the sprites original size).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing custom menu widgets for color and angle pickers, then inventory the numeric-input blocks described in the issue. Define slider ranges, increments, zero markers, and clamping behavior for each applicable input, including negative, time, position, and size values. Done means the supported blocks have consistent, child-friendly sliders and their edge cases are specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.