-
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
Manage joist related code in scenery/FocusIO #866
Comments
I'd like to clarify/understand the purpose of having Focus instrumented. Some possibilities:
Mousing-over an object is not in data stream nor is it in the state--we will need to decide whether focus should be treated differently. |
In the above commit I stripped FocusIO of all sour code, because really it doesn't need to be in the state, or be able to recreate itself on the downstream side. Instead I'm thinking of On top of that I removed it from state, we don't have mouse moves in state, and that feels similar. For customization here is what it looks like in studio, not bad! @samreid please review. |
I also moved the Property under general, but ditched the display sub-tandem. Should we rename |
Does this mean a11y events can now be recorded and played back? |
Yes. Right now the only interaction I have not seen successfully recorded is the "grab button" |
It looks like this code isn't doing anything. Is that correct? var phetioIDIndices = [];
focus.trail.nodes.forEach( function( node, i ) {
// Don't include the last node, since it is the focused node
if ( i < focus.trail.nodes.length - 1 ) {
// If the node was PhET-iO instrumented, include its phetioID instead of its index (because phetioID is more stable)
if ( node.tandem ) {
phetioIDIndices.push( node.tandem.phetioID );
}
else {
phetioIDIndices.push( focus.trail.indices[ i ] );
}
}
} ); |
It isn't needed for record/playback, but I thought that something was needed for how to display FocusIOs on the data stream. When ever display.focusProperty changes it goes on the data stream. Instead of including indices which could change, I updated it to only have the instrumented nodes in the hierarchy. I also dropped the unneeded support for |
I think the last thing for this issue is to add a checklist item for how to test that a11y events can be recorded and played back. Is there a QA issue or checklist for testing record and playback where it would be appropriate to add this? After that's been added, this issue can be closed. |
@KatieWoe will you please add the following note to the recording section of the QA book, likely in the "Events: Recording Wrapper Test" section: "If this sim is outfitted with alternative input, then also test keyboard navigation to make sure that those input events work as well." or something like that. |
Done in above commit. |
It does not need to. Thanks! |
Promoting REVIEW comments from #832 found in
FocusIO.toStateObject
:Right now we are safe because this code will only be run in phet-io brand, which is (to my knowledge which will not run for non-sim scenery implementations)
@samreid can you think of a better way to do this? Perhaps this should sit until we work on a11y/phet-io combo.
The text was updated successfully, but these errors were encountered: