Skip to content

Commit 5ef4cfb

Browse files
committed
Rename stopEditingInstructions to cancelEditing...
1 parent 9136733 commit 5ef4cfb

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

src/actions/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
toggleTopBarMenu,
3434
closeTopBarMenu,
3535
startEditingInstructions,
36-
stopEditingInstructions,
36+
cancelEditingInstructions,
3737
} from './ui';
3838

3939
import {
@@ -97,7 +97,7 @@ export {
9797
toggleTopBarMenu,
9898
closeTopBarMenu,
9999
startEditingInstructions,
100-
stopEditingInstructions,
100+
cancelEditingInstructions,
101101
logIn,
102102
logOut,
103103
evaluateConsoleEntry,

src/actions/ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ export const startEditingInstructions = createAction(
6363
'START_EDITING_INSTRUCTIONS',
6464
);
6565

66-
export const stopEditingInstructions = createAction(
67-
'STOP_EDITING_INSTRUCTIONS',
66+
export const cancelEditingInstructions = createAction(
67+
'CANCEL_EDITING_INSTRUCTIONS',
6868
);

src/containers/Instructions.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import {
66
getHiddenUIComponents,
77
isEditingInstructions,
88
} from '../selectors';
9-
import {stopEditingInstructions, updateProjectInstructions} from '../actions';
9+
import {
10+
cancelEditingInstructions,
11+
updateProjectInstructions,
12+
} from '../actions';
1013

1114
function mapStateToProps(state) {
1215
return {
@@ -20,7 +23,7 @@ function mapStateToProps(state) {
2023
function mapDispatchToProps(dispatch) {
2124
return {
2225
onCancelEditing() {
23-
dispatch(stopEditingInstructions());
26+
dispatch(cancelEditingInstructions());
2427
},
2528
onSaveChanges(projectKey, newValue) {
2629
dispatch(updateProjectInstructions(projectKey, newValue));

src/reducers/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default function ui(stateIn, action) {
224224
case 'START_EDITING_INSTRUCTIONS':
225225
return state.setIn(['workspace', 'isEditingInstructions'], true);
226226

227-
case 'STOP_EDITING_INSTRUCTIONS':
227+
case 'CANCEL_EDITING_INSTRUCTIONS':
228228
case 'UPDATE_PROJECT_INSTRUCTIONS':
229229
return state.setIn(['workspace', 'isEditingInstructions'], false);
230230

test/unit/reducers/ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
userDismissedNotification,
2121
toggleTopBarMenu,
2222
startEditingInstructions,
23-
stopEditingInstructions,
23+
cancelEditingInstructions,
2424
} from '../../../src/actions/ui';
2525
import {
2626
snapshotCreated,
@@ -137,7 +137,7 @@ test('startEditingInstructions', reducerTest(
137137
test('startEditingInstructions', reducerTest(
138138
reducer,
139139
initialState.setIn(['workspace', 'isEditingInstructions'], true),
140-
stopEditingInstructions,
140+
cancelEditingInstructions,
141141
initialState,
142142
));
143143

0 commit comments

Comments
 (0)