Closed Nancy-Salpepi closed 1 year ago
Reproduced in main. This is because PAGE_KEYBOARD_STEP is currently the same as the maximum range. So home and page will both move to min/max.
The current "keyboard step" values for each slider are shown below. @arouinfar let me know how you'd like these modified.
InitialConcentrationSlider:
// These values are regrettably hardcoded, see https://github.com/phetsims/acid-base-solutions/issues/212
// LogSlider's linearValueRange is [-3,0] in this case, with a tick mark at each integer value, so...
const PAGE_KEYBOARD_STEP = 3; // page up/down will jump to min and max
const KEYBOARD_STEP = 0.5; // up/down, 2 intervals per tick mark
const SHIFT_KEYBOARD_STEP = 0.2; // shift-up/down, 5 intervals per tick mark
StrengthSlider:
// These values are regrettably hardcoded, see https://github.com/phetsims/acid-base-solutions/issues/212
// LogSlider's linearValueRange is [-10,2] in this case, with tick marks only at min and max, so...
const PAGE_KEYBOARD_STEP = 12; // page up/down will jump to min and max
const KEYBOARD_STEP = 1; // up/down interval
const SHIFT_KEYBOARD_STEP = 0.25; // shift up/down interval
const NUMBER_OF_MIDDLE_THRESHOLDS = 23; // number of sounds when dragging between min and max
@arouinfar How about if we change PAGE_KEYBOARD_STEP as shown below. The other steps seem reasonable.
// InitialConcentrationSlider
const PAGE_KEYBOARD_STEP = 1; // so that there are 3 steps over the range [-3,0]
// StrengthSlider
const PAGE_KEYBOARD_STEP = 4; // so that there are 3 steps over the range [-10, 2]
I went ahead an committed what I suggested in https://github.com/phetsims/acid-base-solutions/issues/231#issuecomment-1709187958. @arouinfar and @Nancy-Salpepi please review. Last one to review can please close, if everything looks OK.
This change looks good to me!
Looks good on main, thanks @pixelzoom!
Test device MacBook Air M1 chip
Operating System 13.5
Browser Safari 16.6
Problem description For https://github.com/phetsims/qa/issues/975, the home/end keys (fn +left/right arrows) and the page up/down keys (fn + up/down arrows) do the same thing --they jump to the minimum and maximum values.
Steps to reproduce