Skip to content

Commit

Permalink
update TODO to point to new issue, phetsims/scenery#1340 phetsims/sce…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 4, 2022
1 parent 4617e29 commit 193df01
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions js/accessibility/AccessibleNumberSpinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const AccessibleNumberSpinner = <SuperType extends Constructor>( Type: SuperType
// Unfortunately, nothing can be private or protected in this class, see https://github.com/phetsims/scenery/issues/1340#issuecomment-1020692592
return class extends AccessibleValueHandlerClass {
_callbackTimer: CallbackTimer;
incrementDownEmitter: Emitter<[ boolean ]>; // TODO: we want this to be @protected, https://github.com/phetsims/scenery/issues/1340
decrementDownEmitter: Emitter<[ boolean ]>; // TODO: we want this to be @protected, https://github.com/phetsims/scenery/issues/1340
incrementDownEmitter: Emitter<[ boolean ]>; // @protected
decrementDownEmitter: Emitter<[ boolean ]>; // @protected
_disposeAccessibleNumberSpinner: () => void;

constructor( ...args: any[] ) {
Expand Down Expand Up @@ -87,7 +87,7 @@ const AccessibleNumberSpinner = <SuperType extends Constructor>( Type: SuperType
interval: options.timerInterval
} );

// @protected {Emitter} emits events when increment and decrement actions occur, but only for changes
// @protected - emits events when increment and decrement actions occur, but only for changes
// of keyboardStep (not pageKeyboardStep or shiftKeyboardStep)
this.incrementDownEmitter = new Emitter( { parameters: [ { valueType: 'boolean' } ] } );
this.decrementDownEmitter = new Emitter( { parameters: [ { valueType: 'boolean' } ] } );
Expand Down Expand Up @@ -179,7 +179,7 @@ const AccessibleNumberSpinner = <SuperType extends Constructor>( Type: SuperType
/**
* Handle the keydown event and emit events related to the user interaction. Ideally, this would
* override AccessibleValueHandler.handleKeyDown, but overriding is not supported with PhET Trait pattern.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
accessibleNumberSpinnerHandleKeyDown( event: SceneryEvent ) {
assert && assert( event.domEvent, 'must have a domEvent' );
Expand All @@ -190,7 +190,7 @@ const AccessibleNumberSpinner = <SuperType extends Constructor>( Type: SuperType
/**
* Emit events related to the keystate of the spinner. Typically used to style the spinner during keyboard
* interaction.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*
* @param domEvent - the code of the key changing state
* @param isDown - whether or not event was triggered from down or up keys
Expand Down
50 changes: 25 additions & 25 deletions js/accessibility/AccessibleValueHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,22 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
_pageKeyboardStep: number;
_ariaOrientation: Orientation;
_shiftKey: boolean;
oldValue: number | null; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
a11yCreateContextResponseAlert: CreateTextFunction | null; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
valueOnStart: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
contextResponseUtterance: Utterance; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
timesValueTextChangedBeforeAlerting: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
contextResponsePerValueChangeDelay: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
contextResponseMaxDelay: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
a11yInputHandled: boolean; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
blockInput: boolean; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
roundToStepSize: boolean; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
rangeKeysDown: { [ key: string ]: boolean }; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
a11yMapPDOMValue: ( ( value: number ) => number ); // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
a11yCreateAriaValueText: CreateTextFunction; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
oldValue: number | null; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
a11yCreateContextResponseAlert: CreateTextFunction | null; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
valueOnStart: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
contextResponseUtterance: Utterance; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
timesValueTextChangedBeforeAlerting: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
contextResponsePerValueChangeDelay: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
contextResponseMaxDelay: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
a11yInputHandled: boolean; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
blockInput: boolean; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
roundToStepSize: boolean; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
rangeKeysDown: { [ key: string ]: boolean }; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
a11yMapPDOMValue: ( ( value: number ) => number ); // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
a11yCreateAriaValueText: CreateTextFunction; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
_dependenciesMultilink: Multilink<any[]> | null;
_a11yRepeatEqualValueText: boolean;
timesChangedBeforeAlerting: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1340
timesChangedBeforeAlerting: number; // TODO: use underscore so that there is a "private" convention. https://github.com/phetsims/scenery/issues/1348
_voicingCreateContextResponse: ( () => null | string ) | null;
_voicingCreateObjectResponse: ( () => null | string ) | null;
_disposeAccessibleValueHandler: () => void;
Expand Down Expand Up @@ -439,7 +439,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
}

/**
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
updateAriaValueText( oldPropertyValue: number | null ) {
const mappedValue = this.getMappedValue();
Expand Down Expand Up @@ -528,7 +528,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
/**
* get the formatted value based on the current value of the Property.
* @param [value] - if not provided, will use the current value of the valueProperty
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
getMappedValue( value = this._valueProperty.value ): number {
const mappedValue = this.a11yMapPDOMValue( value );
Expand Down Expand Up @@ -687,7 +687,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
/**
* Handle key up event on this accessible slider, managing the shift key, and calling an optional endDrag
* function on release. Add this as an input listener to the node mixing in AccessibleValueHandler.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
handleKeyUp( event: SceneryEvent ) {
const key = KeyboardUtils.getEventCode( event.domEvent )!;
Expand Down Expand Up @@ -721,7 +721,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
*
* Add this as a listener to the 'change' input event on the Node that is mixing in AccessibleValueHandler.
*
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
handleChange( event: SceneryEvent ) {

Expand All @@ -745,7 +745,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
*
* Add this as a listener to the `input` event on the Node that is mixing in AccessibleValueHandler.
*
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
handleInput( event: SceneryEvent ) {
if ( ( this as unknown as Node ).enabledProperty.get() && !this.blockInput ) {
Expand Down Expand Up @@ -799,7 +799,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
* Fires when the accessible slider loses focus.
*
* Add this as a listener on the `blur` event to the Node that is mixing in AccessibleValueHandler.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
handleBlur( event: SceneryEvent ) {

Expand All @@ -821,7 +821,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
/**
* Interaction with this input has started, save the value on start so that it can be used as an "old" value
* when generating the context response with option a11yCreateContextResponse.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
onInteractionStart( event: SceneryEvent ) {
this.valueOnStart = this._valueProperty.value;
Expand All @@ -831,7 +831,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
/**
* Interaction with this input has completed, generate an utterance describing changes if necessary and call
* optional "end" function.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
onInteractionEnd( event: SceneryEvent ) {
this.alertContextResponse();
Expand Down Expand Up @@ -935,7 +935,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,

/**
* Returns true if all range keys are currently up (not held down).
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
allKeysUp() {
return _.every( this.rangeKeysDown, entry => !entry );
Expand All @@ -945,7 +945,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
* Returns true if any range keys are currently down on this slider. Useful for determining when to call
* startDrag or endDrag based on interaction.
*
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
anyKeysDown() {
return !!_.find( this.rangeKeysDown, entry => entry );
Expand Down Expand Up @@ -977,7 +977,7 @@ const AccessibleValueHandler = <SuperType extends Constructor>( Type: SuperType,
* by the client so that all values are allowed. If we encounter the VoiceOver case described above we fall
* back to setting the step size at 1/100th of the max value since the keyboard step generally evenly divides
* the max value rather than the full range.
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1340
* TODO: we want this to be @private, https://github.com/phetsims/scenery/issues/1348
*/
updateSiblingStepAttribute() {
const smallestStep = Math.min( Math.min( this.keyboardStep, this.shiftKeyboardStep ), this.pageKeyboardStep );
Expand Down

0 comments on commit 193df01

Please sign in to comment.