phetsims / fourier-making-waves

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

Visibility of measurement tools is inconsistent/complicated. #185

Closed pixelzoom closed 2 years ago

pixelzoom commented 2 years ago

Related to https://github.com/phetsims/fourier-making-waves/issues/178.

In the Discrete screen, visibility of the measurement tools is controlled solely by their associated checkboxes. If you collapse both charts while the checkboxes are checked, the tools will be remain visible. For example:

screenshot_1277

The Wave Packet screen tried to be more clever. If the charts associated with the tools are collapses, then the tools are hidden, even if their checkboxes are checked. For example:

screenshot_1278

The first problem is that these 2 behaviors are inconsistent - we should do the same thing in both screens.

The second problem is that the behavior of the Wave Packet screens feels too clever, and could be confusing. (Why don't I see the tools when I have them enabled via checkboxes?) The implementation is also more complicated, and harder to maintain - I've broken it several times during implementation, and forsee someone easily breaking it in the future.

So I'm going to change the Wave Packet screen to behave like the Discrete screen. Visibility of the measurement tools will be controlled solely by their associated checkboxes.

pixelzoom commented 2 years ago

Done in the above commit. Visibility of ALL measurement tools in the sim is now controlled solely by their associated checkboxes. @arouinfar please review in master.

arouinfar commented 2 years ago

So I'm going to change the Wave Packet screen to behave like the Discrete screen. Visibility of the measurement tools will be controlled solely by their associated checkboxes.

Good call @pixelzoom. The behavior likely came from the original implementation before the tools on the Wave Packet screen had their own checkboxes. The behavior in master feels much better to me.