phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

Sliders aren't working (Net Force) #244

Closed ghost closed 6 years ago

ghost commented 7 years ago

Test device:

MacBook Air (13-inch, Early 2015)

Operating System:

macOS Sierra 10.12.4

Browser:

Safari 10.1

Problem description:

In the Instance Proxies wrapper, some of the sliders aren't working. The specific sliders and their issues are enumerated and described below. I would recommend either fixing the domains for the sliders or adding notes that tell the users not to use the sliders. This is for phetsims/QA/issues/42.


Summary:

I assume the default domain for sliders is [0, 1]. This doesn't work for some of the properties.

I. Slider is an inappropriate input. II. Domain issue. III. Domain issue. IV. Domain issue. V. Domain issue. VI. Domain issue. VII. Domain issue.


Detailed Descriptions:

I. Number Pullers Attached Property

forcesAndMotionBasics.netForceScreen.model.numberPullersAttachedProperty: TProperty.

The slider number is initially 0. The domain is initially [0, 1]. When pullers are added, the slider number increases to whatever the number of pullers is. When the slider is moved, the domain reverts to its original domain of [0, 1]. (Slider is an inappropriate input.)


II. Speed Property

forcesAndMotionBasics.netForceScreen.model.speedProperty: TProperty.

The domain is [0, 1]. The speed can be greater than 1. Max speed ~3.7 m/s.


III. Duration Property

forcesAndMotionBasics.netForceScreen.model.durationProperty: TProperty.

The domain is [0, 1]. The duration can be greater than 1. Max duration ~9.46 s.


IV. X Property (Cart)

forcesAndMotionBasics.netForceScreen.model.cart.xProperty: TProperty.

The domain on the slider is [-200, 200]. The actual domain is [-403, 403].


V. V Property

forcesAndMotionBasics.netForceScreen.model.cart.vProperty: TProperty.

The domain on the slider is [-1.35, 1.35]. Max speed ~3.7 m/s.


VI. X Property (Blue Knots 0-3)

forcesAndMotionBasics.netForceScreen.model.blueKnot0.xProperty: TProperty.

The x-value for the knot is the initial slider value. When the slider is moved, the domain becomes [0, 1] and the puller on that knot ends up just offscreen to the left.


VII. X Property (Red Knots 0-3)

forcesAndMotionBasics.netForceScreen.model.redKnot0.xProperty: TProperty.

The x-value for the knot is the initial slider value. When the slider is moved, the domain becomes [0, 1] and the puller on that knot ends up on the left side of the screen where the blue pullers usually go.


Steps to reproduce:

I. Number Pullers Attached Property

  1. Open the Instance Proxies wrapper.
  2. Notice that the domain is [0, 1].
  3. Scroll down to the first slider you see, which should be the Number Pullers Attached Property.
  4. Add pullers.
  5. Notice that the number of sliders is increasing.
  6. Move the slider down. You'll notice that moving it down slightly makes the slider revert to its original domain of [0, 1].

II. Speed Property

  1. Notice that the domain is [0, 1].
  2. Add several pullers.
  3. Click the Go button. You'll notice that the speed becomes greater than 1.

III. Duration Property (Same steps as those listed in II.) Max speed is ~9.46 m/s.


IV. X Property (Cart)

  1. Notice that the slider domain is [-200, 200].
  2. Add pullers for either direction.
  3. Click the Go button.
  4. Notice that the cart stops at either x=-403 or x=403.

V. V Property

  1. Notice that the slider domain is [-1.35, 1.35].
  2. Add 4 pullers for either direction.
  3. Click the Go button.
  4. Notice that the max speed is ~3.7 m/s.

VI. X Property (Blue Knots 0-3)

  1. Notice the initial slider value.
  2. Add a puller to the knot.
  3. Move the slider.
  4. Notice that the domain is now [0, 1].
  5. Notice that the puller's hand is just barely visible on the left side of the screen.

VII. X Property (Red Knots 0-3)

  1. Notice the initial slider value.
  2. Add a puller to the knot.
  3. Move the slider.
  4. Notice that the domain is now [0, 1].
  5. Notice that the puller is on the left side of the screen.

Screenshots:

I. Number Pullers Attached Property screen shot 2017-08-24 at 2 48 42 pm


II. Speed Property A) screen shot 2017-08-24 at 3 01 11 pm B) screen shot 2017-08-24 at 3 01 41 pm


III. Duration Property A) screen shot 2017-08-24 at 3 22 03 pm B) screen shot 2017-08-24 at 2 54 28 pm


IV. X Property (Cart) screen shot 2017-08-24 at 2 49 53 pm


V. V Property screen shot 2017-08-24 at 3 04 21 pm


VI. X Property (Blue Knots 0-3) screen shot 2017-08-24 at 3 05 19 pm


VII. X Property (Red Knots 0-3) screen shot 2017-08-24 at 3 18 12 pm

jessegreenberg commented 7 years ago

I defined ranges for Cart.xProperty, Cart.vProperty, Knot.xProperty, netForceModel.speedProperty.

The others in the list were NetForceModel.durationProperty and NetForceProperty.numberPullersAttachedProperty.

@samreid @zepumph these Properties don't have a defined range, and setting numberPullersAttachedProperty directly doesn't make much since anyway as described in the original issue ticket. Does anything else need to be done for those?

samreid commented 7 years ago

It seems numberPullersAttachedProperty has a range of 0 to 4 (correct me if I'm misunderstanding something). Even though this range wouldn't be used to set a slider range, it could potentially be used for clients to understand the sim or understand the data stream. It seems like it would be good to add that if not too much work.

For the durationProperty, I think the range would be 0 to infinity, because the user could keep switching pullers after time started.

jessegreenberg commented 7 years ago

It seems numberPullersAttachedProperty has a range of 0 to 4.

Ok, sounds good, not difficult to add the range. It just felt like a strange way to control the Property because knots on the rope also need to be filled in order for this number to have meaning.

jessegreenberg commented 7 years ago

For the durationProperty, I think the range would be 0 to infinity, because the user could keep switching pullers after time started.

Yes, I agree. I wasn't sure what the browser would do with infinite range for a range input, but seems good in Chrome - it automatically places a limit at 100 for the slider.

jessegreenberg commented 6 years ago

Changes merged into 2.3 and 2.3-phetio release branches

phet-steele commented 6 years ago

Sliders check out.