Skip to content

Commit

Permalink
SliderKeyboardHelpSection.js -> SliderControlsKeyboardHelpSection.js,…
Browse files Browse the repository at this point in the history
… see #714
  • Loading branch information
jessegreenberg committed Dec 16, 2021
1 parent 35fa981 commit f2f0fff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions js/demo/ComponentsScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import ArrowKeyNode from '../keyboard/ArrowKeyNode.js';
import BasicActionsKeyboardHelpSection from '../keyboard/help/BasicActionsKeyboardHelpSection.js';
import KeyboardHelpIconFactory from '../keyboard/help/KeyboardHelpIconFactory.js';
import KeyboardHelpSection from '../keyboard/help/KeyboardHelpSection.js';
import SliderKeyboardHelpSection from '../keyboard/help/SliderKeyboardHelpSection.js';
import SliderControlsKeyboardHelpSection from '../keyboard/help/SliderControlsKeyboardHelpSection.js';
import LetterKeyNode from '../keyboard/LetterKeyNode.js';
import TextKeyNode from '../keyboard/TextKeyNode.js';
import Keypad from '../keypad/Keypad.js';
Expand Down Expand Up @@ -1506,7 +1506,7 @@ function demoKeyboardHelp( layoutBounds ) {
) ),

// Individual help content subtypes
new Panel( new SliderKeyboardHelpSection() ),
new Panel( new SliderControlsKeyboardHelpSection() ),
new VBox( {
children: [
new Panel( new BasicActionsKeyboardHelpSection() ),
Expand Down
8 changes: 4 additions & 4 deletions js/demo/SceneryPhetKeyboardHelpContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import merge from '../../../phet-core/js/merge.js';
import BasicActionsKeyboardHelpSection from '../keyboard/help/BasicActionsKeyboardHelpSection.js';
import KeyboardHelpSection from '../keyboard/help/KeyboardHelpSection.js';
import SliderKeyboardHelpSection from '../keyboard/help/SliderKeyboardHelpSection.js';
import SliderControlsKeyboardHelpSection from '../keyboard/help/SliderControlsKeyboardHelpSection.js';
import TwoColumnKeyboardHelpContent from '../keyboard/help/TwoColumnKeyboardHelpContent.js';
import sceneryPhet from '../sceneryPhet.js';

Expand All @@ -25,13 +25,13 @@ class SceneryPhetKeyboardHelpContent extends TwoColumnKeyboardHelpContent {
const basicActionsHelpContent = new BasicActionsKeyboardHelpSection( merge( helpContentOptions, {
withCheckboxContent: true
} ) );
const sliderKeyboardHelpSection = new SliderKeyboardHelpSection( helpContentOptions );
const sliderControlsKeyboardHelpSection = new SliderControlsKeyboardHelpSection( helpContentOptions );

const grabDragHelpContent = KeyboardHelpSection.getGrabReleaseHelpSection( 'Grabbable', 'grabbable', helpContentOptions );
const leftHelpContent = [ basicActionsHelpContent ];

KeyboardHelpSection.alignHelpSectionIcons( [ grabDragHelpContent, sliderKeyboardHelpSection ] );
const rightHelpContent = [ grabDragHelpContent, sliderKeyboardHelpSection ];
KeyboardHelpSection.alignHelpSectionIcons( [ grabDragHelpContent, sliderControlsKeyboardHelpSection ] );
const rightHelpContent = [ grabDragHelpContent, sliderControlsKeyboardHelpSection ];

super( leftHelpContent, rightHelpContent );
}
Expand Down
8 changes: 4 additions & 4 deletions js/keyboard/help/SliderAndGeneralKeyboardHelpContent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2019-2020, University of Colorado Boulder

/**
* Content for a KeyboardHelpDialog that contains a BasicActionsKeyboardHelpSection and a SliderKeyboardHelpSection.
* Content for a KeyboardHelpDialog that contains a BasicActionsKeyboardHelpSection and a SliderControlsKeyboardHelpSection.
* Often sim interaction only involves sliders and basic tab and button interaction. For those sims, this
* content will be usable for the Dialog.
*
Expand All @@ -11,7 +11,7 @@
import merge from '../../../../phet-core/js/merge.js';
import sceneryPhet from '../../sceneryPhet.js';
import BasicActionsKeyboardHelpSection from './BasicActionsKeyboardHelpSection.js';
import SliderKeyboardHelpSection from './SliderKeyboardHelpSection.js';
import SliderControlsKeyboardHelpSection from './SliderControlsKeyboardHelpSection.js';
import TwoColumnKeyboardHelpContent from './TwoColumnKeyboardHelpContent.js';

class SliderAndGeneralKeyboardHelpContent extends TwoColumnKeyboardHelpContent {
Expand All @@ -23,7 +23,7 @@ class SliderAndGeneralKeyboardHelpContent extends TwoColumnKeyboardHelpContent {

options = merge( {

// {null|*} - options passed to the SliderKeyboardHelpSection
// {null|*} - options passed to the SliderControlsKeyboardHelpSection
sliderSectionOptions: null,

// {null|*} - options passed to the BasicActionsKeyboardHelpSection
Expand All @@ -33,7 +33,7 @@ class SliderAndGeneralKeyboardHelpContent extends TwoColumnKeyboardHelpContent {
labelMaxWidth: 160
}, options );

const sliderHelpSection = new SliderKeyboardHelpSection( options.sliderSectionOptions );
const sliderHelpSection = new SliderControlsKeyboardHelpSection( options.sliderSectionOptions );
const basicActionsHelpSection = new BasicActionsKeyboardHelpSection( options.generalSectionOptions );

super( [ sliderHelpSection ], [ basicActionsHelpSection ], options );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import KeyboardHelpSection from './KeyboardHelpSection.js';

const ArrowKeyIconDisplay = Enumeration.byKeys( [ 'UP_DOWN', 'LEFT_RIGHT', 'BOTH' ] );

class SliderKeyboardHelpSection extends KeyboardHelpSection {
class SliderControlsKeyboardHelpSection extends KeyboardHelpSection {

/**
* @param {Object} [options]
Expand Down Expand Up @@ -152,7 +152,7 @@ class SliderKeyboardHelpSection extends KeyboardHelpSection {
}

// @public - for use in defining a component-specific option.
SliderKeyboardHelpSection.ArrowKeyIconDisplay = ArrowKeyIconDisplay;
SliderControlsKeyboardHelpSection.ArrowKeyIconDisplay = ArrowKeyIconDisplay;

sceneryPhet.register( 'SliderKeyboardHelpSection', SliderKeyboardHelpSection );
export default SliderKeyboardHelpSection;
sceneryPhet.register( 'SliderControlsKeyboardHelpSection', SliderControlsKeyboardHelpSection );
export default SliderControlsKeyboardHelpSection;

0 comments on commit f2f0fff

Please sign in to comment.