Skip to content

Commit cff178f

Browse files
authored
Deprecate autocomplete. (#25)
* Added more default imports for Python. * Deprecate autocomplete feature.
1 parent 05699fb commit cff178f

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

src/components/CoderpadWrapper.js

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const LOAD_CODE_GET_URL = LOAD_CODE_PROD_GET_URL
2626
// Default settings on page loadup.
2727
const SUPPORTED_LANGUAGES = ['java', 'python', 'c_cpp']
2828
const DEFAULT_LANGUAGE = 'python'
29-
const DEFAULT_AUTOCOMPLETE = false
3029
const DEFAULT_PRACTICE = false
3130
const DEFAULT_SETTINGS = {
3231
language: DEFAULT_LANGUAGE,
@@ -35,7 +34,6 @@ const DEFAULT_SETTINGS = {
3534
disabled: false,
3635
uploading: false,
3736
practice: DEFAULT_PRACTICE,
38-
autocomplete: DEFAULT_AUTOCOMPLETE
3937
};
4038

4139
// Notification messages.
@@ -117,16 +115,6 @@ class CoderpadWrapper extends Component {
117115
});
118116
}
119117

120-
/**
121-
* Enables/disables autocomplete.
122-
*/
123-
onChangeAutocomplete = () => {
124-
this.setState({
125-
...this.state,
126-
autocomplete: !this.state.autocomplete
127-
});
128-
}
129-
130118
/**
131119
* Adds code executing message and disables run button.
132120
*/
@@ -292,7 +280,7 @@ class CoderpadWrapper extends Component {
292280
<Grid container style={{ marginBottom: '1.5%' }}>
293281
<Grid item xs={6}>
294282
<CodeEditor
295-
autocomplete={this.state.autocomplete}
283+
autocomplete={false}
296284
language={this.state.practice === true ? 'plain_text' : this.state.language}
297285
source={this.state.source[this.state.language]}
298286
onChange={this.onChangeCode} />
@@ -317,18 +305,6 @@ class CoderpadWrapper extends Component {
317305
<MenuItem value='c_cpp'>{languages['c_cpp']}</MenuItem>
318306
</Select>
319307
</FormControl>
320-
<FormControlLabel
321-
control={
322-
<Checkbox
323-
checked={this.state.autocomplete}
324-
onChange={this.onChangeAutocomplete}
325-
value='autocomplete'
326-
style={{ color: '#0269a4' }}
327-
/>
328-
}
329-
label='Code Autocomplete'
330-
style={{ marginRight: '2.5%' }}
331-
/>
332308
<FormControlLabel
333309
control={
334310
<Checkbox

0 commit comments

Comments
 (0)