Closed jessegreenberg closed 8 months ago
Oh, I noticed @pixelzoom also started a class called FaucetControlsKeyboardHelpContent
in ph-scale (from before we added other key commands) that looks like this:
Feel free to use FaucetControlsKeyboardHelpContent
as a starting point, if it's helpful. We'll need an option to add a description of "Space", for FaucetNode instances that are created with tapToDispense=true
.
Thanks, @jessegreenberg @pixelzoom for starting this content. There are aspects I like about both, and would like to combine them somewhat. I don't know how much flexibility we have to change the core slider content, but having separate entries for Home and 0 seems odd.
Here's my proposal:
Faucet Controls
Adjust faucet flow [Left] [Right]
Adjust in smaller steps [Shift] + [Left] [Right] Adjust in larger steps [Pg Up] [Pg Down] Close faucet [Home] or [0] Open faucet fully [End] Dispense a little fluid [Space] or [Enter]
Since the faucet has a left/right orientation, I only included the left/right arrows. I think it looks a bit cleaner with just left/right, even though up/down also works. If we need all four arrows, that's also fine with me.
I took some liberties with how we describe the home/end behavior, and I don't know if that's acceptable. If the content needs to look more slider-like, we could use the typical home/end content and add a separate entry for the [0] key, like @jessegreenberg's screenshot.
If it would be more helpful to iterate on this content synchronously, let me know, and I'd be happy to schedule a meeting.
@arouinfar Your proposal sounds great to me.
@jessegreenberg @terracoda Do you have any additional input?
@jessegreenberg Would you like me to modify and generalize FaucetControlsKeyboardHelpContent?
Yes, I might. Will review shortly.
@arouinfar & @pixelzoom I was also thinking "flow" needed to be part of the description. Adding "Flow" to the main heading makes the control more about flow and less about the faucet.
"Faucet Flow" or "Fluid Flow" or "Faucet Flow Control" or "Fluid Flow Control" or even "Faucet Fluid Flow"
@arouinfar, I think adjusting the Home/End Shortcuts makes total sense.
Since Faucet Node can also empty a container, do we need to account for that case in the general descriptions, or have 2 versions?
"Faucet Fluid Flow"
Dispense {{or drain}} a little at a time [Space] or [Enter]
Depending on the direction of the faucet the Right or Left arrow can start the flow or open the drain, so wondering if "start" is useful. Also, not sure if we need "drain" somewhere or if that should be an option.
@arouinfar, or others, what combinations of words feels best or perhaps most general?
A very rough visual
@jessegreenberg pointed out that there's a rough version of this in pH Scale, see https://github.com/phetsims/scenery-phet/issues/839#issuecomment-1919288920.
In our design discussions for pH Scale, we intentionally avoided using the word "Fluid", because:
A fluid is a substance that flows, and includes both liquids and gases, but not solids.
We're unlikely to use FaucetNode to dispense the "gases" type of fluid.
We can imaging dispensing granular solids (e.g. sand) that flow and behave like liquids, but are not "fluids".
Sims don't always describe what comes out of the faucet as "fluid". In Fluid Pressure & Flow, it's indeed "fluid". In pH Scale, there are 2 faucets: solvent (or water) and solute. In Beer's Law Lab and Wave Interference, it's water. And we didn't want to get into sim-specific/paramterized labels like "Solvent Flow Controls" and "Water Flow Controls" when a general label like "Faucet Controls" would work.
So since FaucetNode looks like a faucet regardless of what it is dispensing, I think it would be more general to title this "Faucet Controls", as @arouinfar suggested.
Thanks @pixelzoom for the context on "fluid". I did suggest "Faucet Flow" and "Faucet Flow Control".
If you have flow in the main heading, it might work to use it less in the instructions. For example:
Faucet Flow Control
Totally open to a different order as well.
I was also thinking "flow" needed to be part of the description. Adding "Flow" to the main heading makes the control more about flow and less about the faucet.
I think it's important to call it a "Faucet" because that is the name of the component, and I would likely use "Faucet" in the accessible name of the control, e.g. "Solute Faucet". I think "flow" is best suited to the description of the controls, not the section title. If it needs to be in the section title, then 'Faucet Flow Controls" is fine.
I think adjusting the Home/End Shortcuts makes total sense.
Great! Glad to know we have that flexibility. It would be nice if the language for home/end was parallel, like using close/open. But if we use "Jump to max flow" then "Stop flow" works better.
Since Faucet Node can also empty a container, do we need to account for that case in the general descriptions, or have 2 versions?
Oh, that's an excellent point @terracoda. In principle, a sim could have only draining faucets, only dispensing faucets, or both. It might be simpler to avoid conditional dispense/drain language altogether and use something more general. I think "Open briefly" could work.
Depending on the direction of the faucet the Right or Left arrow can start the flow or open the drain, so wondering if "start" is useful.
I think "Adjust flow" is a flexible enough description to include starting the flow, but if we want to be more explicit "Start or adjust flow" sounds good to me.
Here's another iteration, combining some of the ideas thus far:
Faucet Controls or Faucet Flow Controls
So glad we agree on some ideas :-)
Re "Controls", I see it as a single control object, a "Faucet Control" or a "Faucet Flow Control", either work.
The control object has many ways to control the flow based on input method. I would not make it plural unless there was more than one faucet in the sim.
I do like the idea of language matching start/stop flow or open/close faucet, but was having trouble finding a parallel with the addition of "flow". Iteration brings new ideas:
Faucet Control
I think open/close works well with the faucet metaphor, but the last one is hardest as it is kind of a manual self control that can dispense a little or a lot.
Faucet Control
The last item needs to optional.
I've spent time reviewing this issue and playing with the demo, and my recommendation (and reasoning is here).
Faucet Controls -> (to be consistent with the other headers ... e.g. Slider Controls ... and there are many controls below) Adjust faucet flow [left] [right] -> (to make it shorter, it will be obvious that it starts a flow) Adjust in smaller steps [Shift] + [Left] [Right] Adjust in larger steps [Pg Up][Pg Down] Close faucet [Home] or [0] Open faucet fully [End] -> (“fully” word matches "open" context) Open faucet briefly [Space] or [Enter] -> (makes sense, other options do not make sense based on the way the control works)
Thanks for bringing all the different pieces together, @kathy-phet .
Thanks for the review, @terracoda.
Let's go with this version then. FYI - @jessegreenberg @arouinfar @pixelzoom
Faucet Controls Adjust faucet flow [left] [right] Adjust in smaller steps [Shift] + [Left] [Right] Adjust in larger steps [Pg Up][Pg Down] Close faucet [Home] or [0] Open faucet fully [End] Open faucet briefly [Space] or [Enter]
In the above commits, I implemented what is described in https://github.com/phetsims/scenery-phet/issues/839#issuecomment-1933006978, using what I had done in ph-scale as a starting point. Following the naming convention used elsewhere, the class is FaucetControlsKeyboardHelpSection.
You can test-drive in scenery-phet demo, "Keyboard" screen, see screenshot below. Note that the "Open faucet briefly" row is optional, to be included if your FaucetNode is created with tapToDispenseEnabled: true
.
This is fully translatable, but does not include description. Looking at other keyboard help sections, I don't see a clear "exemplar" for how to set up keyboard help for description. In SliderControlsKeyboardHelpSection, it looks like more than half of the implementation is for description, so considerably more work. We don't have a description design for this. And description is not included in the FEL 1.0 release.
Back to @jessegreenberg to review the implementation, and decided whether description needs to be addressed now. Feel free to close this issue or leave it open, as you see fit.
I'll proceed with integrating this help into FEL in https://github.com/phetsims/faradays-electromagnetic-lab/issues/74.
FaucetControlsKeyboardHelpSection
looks really great! Not extending SliderControlsKeyboardHelpSection
(adding options to it for this) makes sense at this point. As part of review I spot checked the keys in scenery-phet-strings_en.json
and tested FEL with ?stringTest=dynamic
and it worked well.
Thanks for adding this!
Lets not include description as part of this issue. We can open a new issue for that when it it is time.
Thanks everyone! Closing.
In https://github.com/phetsims/scenery-phet/issues/773 we added alt input to the FaucetNode. Now we should add keyboard help content for it.
It behaves a lot like a slider but with some extras. Design is listed here: https://github.com/phetsims/scenery-phet/issues/773#issuecomment-1896504404
I would like to use
SliderControlsKeyboardHelpSection
as much as we can. Here is what that would look like to get us started.SliderControlsKeyboardHelpSection
has other options to control the language. @terracoda @arouinfar what do you think of this and what should change from here?Here is the patch but we would create a subclass just for this.