Skip to content

Deprecate autocomplete. #25

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

Merged
5 commits merged into from
Mar 15, 2020
Merged
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
26 changes: 1 addition & 25 deletions src/components/CoderpadWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const LOAD_CODE_GET_URL = LOAD_CODE_PROD_GET_URL
// Default settings on page loadup.
const SUPPORTED_LANGUAGES = ['java', 'python', 'c_cpp']
const DEFAULT_LANGUAGE = 'python'
const DEFAULT_AUTOCOMPLETE = false
const DEFAULT_PRACTICE = false
const DEFAULT_SETTINGS = {
language: DEFAULT_LANGUAGE,
Expand All @@ -35,7 +34,6 @@ const DEFAULT_SETTINGS = {
disabled: false,
uploading: false,
practice: DEFAULT_PRACTICE,
autocomplete: DEFAULT_AUTOCOMPLETE
};

// Notification messages.
Expand Down Expand Up @@ -117,16 +115,6 @@ class CoderpadWrapper extends Component {
});
}

/**
* Enables/disables autocomplete.
*/
onChangeAutocomplete = () => {
this.setState({
...this.state,
autocomplete: !this.state.autocomplete
});
}

/**
* Adds code executing message and disables run button.
*/
Expand Down Expand Up @@ -292,7 +280,7 @@ class CoderpadWrapper extends Component {
<Grid container style={{ marginBottom: '1.5%' }}>
<Grid item xs={6}>
<CodeEditor
autocomplete={this.state.autocomplete}
autocomplete={false}
language={this.state.practice === true ? 'plain_text' : this.state.language}
source={this.state.source[this.state.language]}
onChange={this.onChangeCode} />
Expand All @@ -317,18 +305,6 @@ class CoderpadWrapper extends Component {
<MenuItem value='c_cpp'>{languages['c_cpp']}</MenuItem>
</Select>
</FormControl>
<FormControlLabel
control={
<Checkbox
checked={this.state.autocomplete}
onChange={this.onChangeAutocomplete}
value='autocomplete'
style={{ color: '#0269a4' }}
/>
}
label='Code Autocomplete'
style={{ marginRight: '2.5%' }}
/>
<FormControlLabel
control={
<Checkbox
Expand Down