-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generalize HSlider to support horizontal and vertical orientations #380
Comments
|
I converted The development steps would be something like:
And there may be addition things required to address phet-io and a11y dependencies on "HSlider" name. |
8/23/18 dev meeting: Assigned to me. For vertical sliders, want options for whether labels are on left vs right, and whether the tick extends out on both left and right sides. a11y: Aria orientation option in AccessibleSlider. Make sure arrow keys work. |
Conclusions from Slack discussion (expand Details below):
Chris Malley [1:23 PM] I could also consider leaving HSliderTrack and HSliderThumb named as is, since they draw track and thumb respectively in horizontal orientation. Sam Reid [1:26 PM] Michael Kauzmann [1:29 PM] Chris Malley [1:44 PM] Michael Kauzmann [1:45 PM] Chris Malley [1:45 PM] Michael Kauzmann [1:48 PM] Chris Malley [1:49 PM] Michael Kauzmann [1:49 PM] Chris Malley [1:50 PM] Michael Kauzmann [1:51 PM] Chris Malley [1:52 PM] Michael Kauzmann [1:53 PM] Chris Malley [1:55 PM] Michael Kauzmann [1:56 PM]
I don't think so, I would just assign over to @jessegreenberg, who wrote most of it, to review when complete. Chris Malley [1:57 PM] |
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
Changes in the above commits:
|
Normally WebStorm can track history across file renames. However for HSlider.js => Slider.js, it is failing to follow the history: This is confusing because
I typically find it most useful to be able to use the WebStorm history features when looking back in time, I'm not sure what is different in this case, but I thought I should point it out as soon as possible. |
I'm not sure what happened here. I used WebStorm to rename the file. And for any file that was renamed, I noted it's original name in the JSdoc at the top of the file. What do you suggest? |
It looks like something went wrong with the rename. Perhaps WebStorm had a git failure during that step. Can that step be re-done so we can easily access the history? Easy access to the history for this file seems particularly important because it crosses a11y and phet-io and is a widely used component. |
There was no git failure indicated by WebStorm. Perhaps it got confused because the file was renamed, and then a new file named HSlider was created. I have no idea how to this can be "re-done". |
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
Basically, you could try:
EDIT: changed would => could |
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
#380 (comment) says:
After completing the initial work (see #380 (comment)), I noticed that all sims with vertical sliders (see screenshots in #385 (comment)) have their labels on the left, and tick marks that point only to the left. That is consistent with the current implementation. So I'm going to propose that we don't make any additional enhancements related to tick marks until they are actually needed. @ariel-phet Since you specified the above requirements, does this sound reasonable to defer? |
The issue of restoring history for Slider.js was moved to #389. |
To restore history for some files that we renamed, some commits were reverted (see above) and then reapplied (see #389). |
@ariel-phet Assuming that deferring enhancements is acceptable (see #380 (comment)), please assign someone to review this work. |
@pixelzoom deferring enhancements is fine (if enhancements are needed, they are likely to come in graphing quadratics anyhow, but we can wait to see if that is actually necessary/desirable) @zepumph I feel like you are in a good position for this review, being very familiar with a few vertical sliders. |
@zepumph This issue got a little confused with file renaming and restoring git history (addressed in #389). So let me attempt to clarify and point you to what needs to be reviewed. The majority of the commits are related to renaming for files to have "Slider" prefix instead of "HSlider" prefix. Feel free to skim these, but they are pretty straightforward. The primary change to Slider.js is shown in 81a0a69#diff-19fdbe803307bf2e93fb8ff42915ff18. In that commit, Finally, HSlider and VSlider were created as convenient types. Reviewing those in master HEAD should be sufficient. Let me know if you have any questions. |
@pixelzoom everything you have done above looks great. I tested usages and adjusted the rotation in my working copy to see how it was working. I saw that for a11y documentation, there was still an HSlider.md, so I renamed it and passed it off for review in phetsims/binder#22 For phet-io, I wondered if the orientation of the slider is something that the phet-io data stream or api should have. Currently we don't have a need for Nodes in the state, so I think this is fine for now. I also looked around at HSlider and VSlider usages, and it looks very good. Thanks @pixelzoom. |
Thanks for the review @zepumph. @zepumph said:
In the Slack details in #380 (comment), @zepumph said:
So I didn't make any PhET-iO related changes. If we decide it's needed in the future, it seems easy enough to add. Closing. |
We currently have HSlider, whose implementation is specific to horizontal orientation. Several sims need a vertical slider, e.g. graphing-quadratics, curve-fitting, capacitor-lab-basics, color-vision. Those sims take an HSlider and rotate it -90 degrees. The tick mark features are unusable, and the sim must decorate the slider with ticks using a combination of hacks (e.g. see
GRAPHING_QUADRATICS/CoefficientSlider
).Ideally, we should do something like we did with
LayoutBox
,HBox
andVBox
. That is, have base classSlider
, with convenience subclassesHSlider
andVSlider
.Assigning to @ariel-phet to prioritize.
The text was updated successfully, but these errors were encountered: