Skip to content
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

#1671 Implement Quiet Builder mode #1672

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/App/App.reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const initialState = {
quickUnlockActive: false,
removeOutputActive: false,
vocalizeFolders: false,
quietBuilderMode: false,
liveMode: false,
improvePhraseActive: false
},
Expand Down
2 changes: 2 additions & 0 deletions src/components/App/__tests__/App.reducer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('reducer', () => {
quickUnlockActive: false,
removeOutputActive: false,
vocalizeFolders: false,
quietBuilderMode: false,
improvePhraseActive: false
},
symbolsSettings: {
Expand Down Expand Up @@ -77,6 +78,7 @@ describe('reducer', () => {
quickUnlockActive: false,
removeOutputActive: false,
vocalizeFolders: false,
quietBuilderMode: false,
improvePhraseActive: false
},
userData: uData
Expand Down
4 changes: 3 additions & 1 deletion src/components/Board/Board.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,9 @@ export class BoardContainer extends Component {
}
} else {
clickSymbol(tile.label);
say();
if (!navigationSettings.quietBuilderMode) {
say();
}
if (isLiveMode) {
const liveTile = {
backgroundColor: 'rgb(255, 241, 118)',
Expand Down
24 changes: 24 additions & 0 deletions src/components/Settings/Navigation/Navigation.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ class Navigation extends React.Component {
});
};

toggleQuietBuilderMode = () => {
this.setState({
quietBuilderMode: !this.state.quietBuilderMode
});
};

toggleLiveMode = () => {
this.setState({
liveMode: !this.state.liveMode
Expand Down Expand Up @@ -277,6 +283,24 @@ class Navigation extends React.Component {
</ListItemSecondaryAction>
</ListItem>
<Divider />
<ListItem>
<ListItemText
className="Navigation__ListItemText"
primary={<FormattedMessage {...messages.quietBuilderMode} />}
secondary={
<FormattedMessage {...messages.quietBuilderModeSecondary} />
}
/>
<ListItemSecondaryAction>
<Switch
checked={this.state.enableQuietBuilderMode}
onChange={this.toggleQuietBuilderMode}
value="active"
color="secondary"
/>
</ListItemSecondaryAction>
</ListItem>
<Divider />
<ResetToursItem />
<Divider />
<ListItem>
Expand Down
9 changes: 9 additions & 0 deletions src/components/Settings/Navigation/Navigation.messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ export default defineMessages({
id: 'cboard.components.Settings.Navigation.vocalizeFoldersSecondary',
defaultMessage: "Reads a folder's name out loud when clicked"
},
quietBuilderMode: {
id: 'cboard.components.Settings.Navigation.quietBuilderMode',
defaultMessage: 'Enable Quiet Builder mode'
},
quietBuilderModeSecondary: {
id: 'cboard.components.Settings.Navigation.quietBuilderModeSecondary',
defaultMessage:
'Disables vocalization of tiles when they are clicked as you build a sentence. Click output bar to hear the constructed sentence.'
},
showLiveMode: {
id: 'cboard.components.Settings.Navigation.showLiveMode',
defaultMessage: 'Use the Live Mode'
Expand Down
3 changes: 2 additions & 1 deletion src/components/Settings/Navigation/Navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const INITIAL_NAVIGATION_SETTINGS = {
navigationButtonsStyle: NAVIGATION_BUTTONS_STYLE_SIDES,
quickUnlockActive: false,
removeOutputActive: false,
vocalizeFolders: false
vocalizeFolders: false,
quietBuilderMode: false
};

let navigationSettings = INITIAL_NAVIGATION_SETTINGS;
Expand Down
4 changes: 3 additions & 1 deletion src/translations/src/cboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@
"cboard.components.Settings.Navigation.outputRemoveSecondary": "Shows a \"x\" buttton on each symbol in order to remove it",
"cboard.components.Settings.Navigation.vocalizeFolders": "Enable folder vocalization",
"cboard.components.Settings.Navigation.vocalizeFoldersSecondary": "Reads folders name out loud when clicked",
"cboard.components.Settings.Navigation.quietBuilderMode": "Enable Quiet Builder mode",
"cboard.components.Settings.Navigation.quietBuilderModeSecondary": "Disables vocalization of tiles when they are clicked as you build a sentence. Click output bar to hear the constructed sentence.",
"cboard.components.Settings.Navigation.showLiveMode": "Use the Live Mode",
"cboard.components.Settings.Navigation.showLiveModeSecondary": "Live mode allows you to write text directly into the output bar and quickly play the sound. It is intended for users that can write.",
"cboard.components.Settings.Navigation.activeImprovePhrase": "Use Improve Phrase",
Expand Down Expand Up @@ -3874,4 +3876,4 @@
"symbol.descriptiveQuantity.different": "different",
"symbol.buildingContents.bathroom": "bathroom",
"symbol.descriptiveQuantity.categories": "categories"
}
}
Loading