phetsims / make-a-ten

"Making Tens" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

[iOS] ?stringTest=double fails in the level headers #263

Closed phet-steele closed 7 years ago

phet-steele commented 7 years ago

Only on certain levels with long enough titles, and when the number of stars obtained enters double digits. The level text and number of stars begin to overlap:

img_0063

Seen on iOS 10.2, for phetsims/tasks/issues/762.

phet-steele commented 7 years ago

I should note, desktop is fine.

jonathanolson commented 7 years ago

I guess technically the user could solve any finite number of challenges, but maybe we say if they win a level more than 999 times we could either accept overlapping or the label could change size to accommodate?

Since JS toString() starts using scientific notation at approximately this many digits (1.234567891234568e+21), we could leave that much space?

jonathanolson commented 7 years ago

@amanda-phet, thoughts on providing enough space for 3 digits of solves (up to 999 solves), and accepting overlap after 1000 solves of a specific level?

amanda-phet commented 7 years ago

I'm fine with overlapping or changing size after 999 stars. I'm not sure which is preferable- probably changing size to accommodate?

I don't understand what you mean about scientific notation- are you saying that once a number reaches 20 (?) digits it will start to be written in scientific notation, so we'd want space for a number to reach that many digits? Is it worth accommodating that situation?

If it's easiest to just overlap 1000+ solves that is also fine with me. It would be an unlikely scenario!

jonathanolson commented 7 years ago

It's easier to just allow overlap, but I can check how difficult it is to resize to prevent overlap after a certain number of digits.

jonathanolson commented 7 years ago

I don't understand what you mean about scientific notation- are you saying that once a number reaches 20 (?) digits it will start to be written in scientific notation

Yes, it would reach scientific notation because of the way things are added there.

so we'd want space for a number to reach that many digits? Is it worth accommodating that situation?

I'm not worried about people reaching that.

amanda-phet commented 7 years ago

Thanks for clarifying.

Let's allow overlap after 1000+ correct challenges.

jonathanolson commented 7 years ago

@phet-steele, can you check my fix?

It was simplest to just fit the title in available space. In English, this is never even a problem.

phet-steele commented 7 years ago

🐨 Looks good, but I don't want to spend the time getting to 1000 stars to see what that looks like.....