phetsims / capacitor-lab-basics

"Capacitor Lab: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 4 forks source link

Voltage meter overlapping checkboxes #263

Closed etwa4650 closed 3 years ago

etwa4650 commented 5 years ago

Operating System

MAC OS 10.13.6

Browser

Chrome 74.0.3729.131

Problem Description

If the Voltage meter is close enough to a checkbox in the top right corner, the voltage meter will be selected instead of the checkbox when attempting to click on the checkbox. Even though the voltage meter does not visually overlap the checkbox.

Screen Recording below.

Visuals

https://drive.google.com/file/d/1Z8nGrryKdIjP1K9FUCjZGcObF1oCjl7P/view?usp=sharing

Denz1994 commented 5 years ago

The overlap was reduced by reducing the bounds of the touch/mouse area. There is still some overlap because bounds are generated in rectangular/square shapes to contain all of the possible elements of a node.

Reducing the touch/mouse areas anymore may compromise the padding that we give draggable objects for usability. This is how the touch areas currently look. Thoughts @arouinfar?

image

arouinfar commented 5 years ago

@Denz1994 let's remove the extra padding at the top of the voltmeter body. The voltmeter body is already quite large, so I don't think its pointerAreas need to be dilated. This will further reduce the likelihood that users run into this issue.

Denz1994 commented 5 years ago

I believe there is still an underlying issue here. The movableDragHandler is being hit despite being outside of the touch/mouse area bounds. The movableDragHandler is added to the VoltmeterBodyNode after the touch areas are being altered so I'm not following how the movableDragHandler is generating its bounds. I'll consult with @jonathanolson.

ariel-phet commented 5 years ago

@etwa4650 please always check if an issue exists in the published version of a sim (if a published version exists)

@Denz1994 this same behavior also exists in the published version. It is a nice catch by @etwa4650 and worthy of being understood, but I don't see it as a blocking issue for this RC.

Marking deferred. @Denz1994 if it is something simple to address use your discretion as to how and when to address it, but the sim can be published with this issue as it is unlikely to occur during normal usage (most people will pull the voltmeter well into the play area)

arouinfar commented 3 years ago

This is still an issue in rc.4. The voltmeter pointerAreas are not visible withshowPointerAreas but clicking on the Bar Graph checkbox or any part of the Ba does not toggle the checkbox, which makes me believe I'm clicking on the voltmeter pointerArea.

image

I think this is a minor issue, and users can simply drag the voltmeter so it's out of the panel. @Denz1994 I am fine with closing this as wont-fix, but I'll let you decide if you'd rather leave it open and deferred.

Denz1994 commented 3 years ago

I'll opt to close and leave as a don't fix. I agree with the feedback in the above commit. If we really wanted to fix this bug, we would need a custom path drawn for the touch area. This custom touch area would also need to be dilated to consider a11y concerns. Closing this one and labeling wont-fix.