Skip to content

Commit

Permalink
Update accessible names and pattern string properties for better clar…
Browse files Browse the repository at this point in the history
…ity, see: #78
  • Loading branch information
marlitas committed Feb 11, 2025
1 parent 7e96f22 commit 064fdc2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
14 changes: 12 additions & 2 deletions js/common/view/NumberPairsScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,21 @@ export default class NumberPairsScreenView extends ScreenView {
// we have access to the countingAreaBounds which are defined during construction.
const sumTenFrameBounds = COUNTING_AREA_BOUNDS.erodedX( COUNTING_AREA_BOUNDS.width / 3.5 );
const tenFrameBounds = options.sumScreen ? [ sumTenFrameBounds ] : NumberPairsUtils.splitBoundsInHalf( COUNTING_AREA_BOUNDS );
const representationTypeAccessibleNameProperty = new DerivedProperty( [ model.representationTypeProperty ],
representationType => representationType.accessibleName );
const organizeObjectsPatternStringProperty = new PatternStringProperty( NumberPairsStrings.organizeObjectsPatternStringProperty, {
representation: model.representationTypeProperty.value.accessibleName
representation: representationTypeAccessibleNameProperty
}, {
maps: {
representation: stringProperty => stringProperty.value
}
} );
const organizeObjectsHelpTextPatternStringProperty = new PatternStringProperty( NumberPairsStrings.organizeObjectsHelpTextPatternStringProperty, {
representation: model.representationTypeProperty.value.accessibleName
representation: representationTypeAccessibleNameProperty
}, {
maps: {
representation: stringProperty => stringProperty.value
}
} );
const tenFrameButton = new TenFrameButton( {
accessibleName: organizeObjectsPatternStringProperty,
Expand Down
6 changes: 5 additions & 1 deletion js/common/view/SceneSelectionRadioButtonGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export default class SceneSelectionRadioButtonGroup extends RectangularRadioButt

public constructor( selectedSceneModelProperty: PhetioProperty<NumberPairsScene>, sceneModels: NumberPairsScene[], providedOptions: SceneSelectionRadioButtonGroupOptions ) {
const totalNumberPatternStringProperty = new PatternStringProperty( NumberPairsStrings.totalNumberPatternStringProperty, {
value: selectedSceneModelProperty.value.total
value: selectedSceneModelProperty
}, {
maps: {
value: sceneModel => sceneModel.total
}
} );
const options = optionize<SceneSelectionRadioButtonGroupOptions, SelfOptions, RectangularRadioButtonGroupOptions>()( {
accessibleName: totalNumberPatternStringProperty,
Expand Down
2 changes: 1 addition & 1 deletion number-pairs-strings_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"value": "Hear the phrase update automatically as you interact."
},
"hearNumberPhrase": {
"value": "Hear Number Sentence"
"value": "Hear Number Phrase"
},
"organizeObjectsPattern": {
"value": "Organize {{representation}}"
Expand Down

0 comments on commit 064fdc2

Please sign in to comment.