phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

Desired reset behavior? #100

Closed Denz1994 closed 4 years ago

Denz1994 commented 4 years ago

Currently, atoms dragged into the play area cannot be reset to their kits unless the user drags them back to the kit area. Looking at an older dev version, we have a reset kit button.

Do we want a similar button for this behavior? This becomes more relevant on the "Larger" screen because we can drag out many molecules in the play area. Carousel doesn't support this directly, but I believe we can get away with positioning a button over the kit area and keeping the same kit reset functionality.

If we do pursue a reset kit button, there will exist two reset buttons: one for the collection boxes and one for the kits. I just want to make sure this is the desired behavior.

Thoughts @ariel-phet.

ariel-phet commented 4 years ago

Discussed with @Denz1994 10/3/2019

First of all we should have a ResetAll button in this sim, the legacy version does not have a this button, but it is standard practice to always have the ResetAll button in sims.

It may be that having ResetAll will meet the needs of resetting the sim. Currently the "Reset Collection" button in the legacy sim appears to reset everything but the "kit position", not sure if that buys us anything over a full ResetAll button.

I am going to mark for design meeting, and have @Denz1994 request time to discuss once the sim has the ResetAll button and the proper "Refill" behavior

Denz1994 commented 4 years ago

The resetAllButton and refill button are functioning well enough to compare. It would also be worth deciding where the placement of the resetAllButton should go on each screen.

ariel-phet commented 4 years ago

@Denz1994 I think now that we have the refillButton and the resetAllButton any sort of reset collection button is unnecessary.

As for the positioning of the resetAllButton, two comments.

  1. The current sim appears to be using an "old size" button, I believe this is related to potentially having old layout bounds, you might want to ask the dev channel or @pixelzoom specifically as I believe he knows the root of that issue. We want to update to the "modern" size seen in a sim like vector addition

  2. As for position, I think we want to try to stick to bottom righthand corner. I think that can be accomplished on the "Larger" screen by reducing bucket sizes a bit. I did a quick mockup below. (There is lots of uneeded space on the right and lefthand sides of each bucket that can be reduced)

BAM

  1. Ideally keep the button position consistent across all 3 screens
pixelzoom commented 4 years ago

@ariel-phet said:

  1. The current sim appears to be using an "old size" button, I believe this is related to potentially having old layout bounds, you might want to ask the dev channel or @pixelzoom specifically as I believe he knows the root of that issue. We want to update to the "modern" size seen in a sim like vector addition

The sim appears to be using default (standard) layoutBounds for its ScreenViews. But BAMView is setting a non-standard radius for the ResetAllButton:

137  radius: BAMConstants.RESET_BUTTON_RADIUS,
pixelzoom commented 4 years ago

@ariel-phet said:

  1. Ideally keep the button position consistent across all 3 screens

Two ways to do this (which may be combined):

(1) Create a ScreenView subclass that serves as the base class in all screens. Instantiate and set the ResetAllButton position in this subclass. (It looks like BAMView may serve this purpose.)

(2) Create BAMConstants SCREEN_VIEW_X_MARGIN and SCREEN_VIEW_Y_MARGIN and pass these options to each call to new ResetAllButton:

right: this.layoutBounds.right - BAMConstants.SCREEN_VIEW_X_MARGIN,
bottom: this.layoutBounds.bottom - BAMConstants.SCREEN_VIEW_Y_MARGIN
Denz1994 commented 4 years ago

As part of a design meeting 11/27/19:

It was suggested to use a refresh button for the collection panel. The reason for this is due to a user not being able to only reset a collection. A refresh button was added to each collection panel and follows the behavior in the java version.

Will release dev version for comparison.

Denz1994 commented 4 years ago

This can be reviewed in this dev version @ariel-phet. I think we have the desired behavior settled.

ariel-phet commented 4 years ago

@Denz1994 behavior looks correct to me, closing