Skip to content

Commit 6c08ba0

Browse files
committed
Removed Replace All from Edit menu
1 parent ed128e5 commit 6c08ba0

File tree

4 files changed

+0
-41
lines changed

4 files changed

+0
-41
lines changed

client/components/Nav.jsx

-17
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class Nav extends React.PureComponent {
4242
this.handleRun = this.handleRun.bind(this);
4343
this.handleFindPrevious = this.handleFindPrevious.bind(this);
4444
this.handleReplace = this.handleReplace.bind(this);
45-
this.handleReplaceAll = this.handleReplaceAll.bind(this);
4645
this.handleStop = this.handleStop.bind(this);
4746
this.handleStartAccessible = this.handleStartAccessible.bind(this);
4847
this.handleStopAccessible = this.handleStopAccessible.bind(this);
@@ -140,11 +139,6 @@ class Nav extends React.PureComponent {
140139
this.setDropdown('none');
141140
}
142141

143-
handleReplaceAll() {
144-
this.props.cmController.showReplaceAll();
145-
this.setDropdown('none');
146-
}
147-
148142
handleAddFile() {
149143
this.props.newFile(this.props.rootFile.id);
150144
this.setDropdown('none');
@@ -441,16 +435,6 @@ class Nav extends React.PureComponent {
441435
<span className="nav__keyboard-shortcut">{metaKeyName}+R</span>
442436
</button>
443437
</li>
444-
<li className="nav__dropdown-item">
445-
<button
446-
onClick={this.handleReplaceAll}
447-
onFocus={this.handleFocusForEdit}
448-
onBlur={this.handleBlur}
449-
>
450-
{this.props.t('Nav.Edit.ReplaceAll')}
451-
<span className="nav__keyboard-shortcut">{'\u21E7'}+{metaKeyName}+R</span>
452-
</button>
453-
</li>
454438
</ul>
455439
</li>
456440
<li className={navDropdownState.sketch}>
@@ -823,7 +807,6 @@ Nav.propTypes = {
823807
findNext: PropTypes.func,
824808
findPrev: PropTypes.func,
825809
showReplace: PropTypes.func,
826-
showReplaceAll: PropTypes.func,
827810
getContent: PropTypes.func
828811
}),
829812
startSketch: PropTypes.func.isRequired,

client/components/__test__/__snapshots__/Nav.test.jsx.snap

-11
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,6 @@ exports[`Nav renders correctly 1`] = `
133133
</span>
134134
</button>
135135
</li>
136-
<li
137-
class="nav__dropdown-item"
138-
>
139-
<button>
140-
<span
141-
class="nav__keyboard-shortcut"
142-
>
143-
⇧+⌃+R
144-
</span>
145-
</button>
146-
</li>
147136
</ul>
148137
</li>
149138
<li

client/modules/IDE/components/Editor.jsx

-7
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class Editor extends React.Component {
8585
this.findNext = this.findNext.bind(this);
8686
this.findPrev = this.findPrev.bind(this);
8787
this.showReplace = this.showReplace.bind(this);
88-
this.showReplaceAll = this.showReplaceAll.bind(this);
8988
this.getContent = this.getContent.bind(this);
9089
}
9190

@@ -137,7 +136,6 @@ class Editor extends React.Component {
137136
[`${metaKey}-G`]: 'findNext',
138137
[`Shift-${metaKey}-G`]: 'findPrev',
139138
[`${metaKey}-R`]: 'replace',
140-
[`Shift-${metaKey}-R`]: 'replaceAll',
141139
});
142140

143141
this.initializeDocuments(this.props.files);
@@ -172,7 +170,6 @@ class Editor extends React.Component {
172170
findNext: this.findNext,
173171
findPrev: this.findPrev,
174172
showReplace: this.showReplace,
175-
showReplaceAll: this.showReplaceAll,
176173
getContent: this.getContent
177174
});
178175
}
@@ -286,10 +283,6 @@ class Editor extends React.Component {
286283
this._cm.execCommand('replace');
287284
}
288285

289-
showReplaceAll() {
290-
this._cm.execCommand('replaceAll');
291-
}
292-
293286
tidyCode() {
294287
const beautifyOptions = {
295288
indent_size: INDENTATION_AMOUNT,

client/modules/IDE/components/KeyboardShortcutModal.jsx

-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ function KeyboardShortcutModal() {
3939
</span>
4040
<span>{t('KeyboardShortcuts.CodeEditing.ReplaceTextMatch')}</span>
4141
</li>
42-
<li className="keyboard-shortcut-item">
43-
<span className="keyboard-shortcut__command">
44-
{metaKeyName} + {'\u21E7'} + R
45-
</span>
46-
<span>{t('KeyboardShortcuts.CodeEditing.ReplaceAllTextMatches')}</span>
47-
</li>
4842
<li className="keyboard-shortcut-item">
4943
<span className="keyboard-shortcut__command">
5044
{metaKeyName} + [

0 commit comments

Comments
 (0)