phetsims / arithmetic

"Arithmetic" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/arithmetic
GNU General Public License v3.0
5 stars 5 forks source link

Should the '?' disappear after the first entry? #210

Closed Nancy-Salpepi closed 3 months ago

Nancy-Salpepi commented 4 months ago

Test device MacBook Air M1 chip

Operating System 14.3.1

Browser Safari 17.3.1

Problem description For https://github.com/phetsims/qa/issues/1046 and related to https://github.com/phetsims/arithmetic/issues/7, on the Multiply Screen, there is a question mark in the answer box for each new problem. On the Divide screen, the question mark goes away after the first question is answered. I'm not sure which behavior was the desired one here (personally, I like that the question mark goes away after the first question is answered). Also noting that pressing the Eraser button causes the question mark to reappear on the Divide screen.

Visuals

https://github.com/phetsims/arithmetic/assets/87318828/0cc67504-eaad-4272-a582-cb96538d0e2a

Luisav1 commented 4 months ago

@amanda-phet Could you weigh in on this? I'm not sure what the desired behaviour would be here either. Thanks!

amanda-phet commented 4 months ago

I reviewed #7 and it seems like the suggestions for a question mark was only for the case where we didn't end up adding keyboard input.

Before I suggest removing the question mark- Do either of you know why we added it when we added keyboard input?

Nancy-Salpepi commented 4 months ago

I interpreted the suggestion in https://github.com/phetsims/arithmetic/issues/7 the same way you did Amanda. I don't know why it was added.

amanda-phet commented 4 months ago

@marlitas do you remember why the question mark was added?

amanda-phet commented 4 months ago

@marlitas @Luisav1 and I tried to do some digging around and can't figure out why this '?' showed up between December and February.

We do need the '?' on the Factor screen, for the two unknowns, because that screen doesn't have keyboard or keypad input.

We would like to remove the '?' from the Multiply and Divide screens.

Luisav1 commented 4 months ago

We may have this was added in https://github.com/phetsims/arithmetic/commit/e4db552f18b2f9be3ffa0660920e6273caf6799e so I removed the code that made it visible in clear() in EquationInputNode.

I also made the '?' invisible by default so it isn't visible at the start of the games either.

Now the '?' only appears in the factor screen.

@Nancy-Salpepi Could you review this as well to ensure it's what you expect?

Nancy-Salpepi commented 4 months ago

Things look good on the Multiply screen. The '?' still appears every time the Eraser button is pressed in a game level on the Divide Screen.

Steps:

  1. Enter any game level on the Divide Screen
  2. Press the eraser button--The question mark will appear
  3. Press Start Over button and enter a different game level --the question mark will be there too
Luisav1 commented 3 months ago

Ah oops, thanks @Nancy-Salpepi. This is ready for review again. I believe both the Multiply and Divide screen should now be following this behaviour.

I missed that this.unknownValueText.visible = isNaN( value ) makes the text visible whenever the valueProperty changes. So now there's a boolean this.unknownValueTextVisible that keeps track of whether to allow this text to be visible or not, set to false by default, which is set to true when setPlaceholder() is called in the Factor screen.

Nancy-Salpepi commented 3 months ago

This looks good now @Luisav1! Closing.