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

Java IDE: minor improvements #39000

Merged
merged 3 commits into from
Feb 11, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ describe('entry tests', () => {
'build/package/css/foorm_editor.css',
'style/code-studio/foorm_editor.scss'
],
['build/package/css/javaIde.css', 'style/javaide/style.scss']
['build/package/css/javaIde.css', 'style/javaIde/style.scss']
].concat(
appsToBuild.map(function(app) {
return [
Expand Down
33 changes: 19 additions & 14 deletions apps/src/javaide/JavaConsole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import {appendInputLog} from './javaIdeRedux';
import CommandHistory from '@cdo/apps/lib/tools/jsdebugger/CommandHistory';
import {KeyCodes} from '@cdo/apps/constants';
import color from '@cdo/apps/util/color';
import PaneHeader, {PaneSection} from '@cdo/apps/templates/PaneHeader';

const style = {
consoleStyle: {
backgroundColor: color.black,
color: color.white,
height: '200px',
overflowY: 'auto',
border: '1px solid #e7e8ea',
borderRadius: 15,
padding: 5
},
consoleLogs: {
Expand Down Expand Up @@ -127,18 +126,24 @@ class JavaConsole extends React.Component {

render() {
return (
<div style={style.consoleStyle} ref={el => (this._consoleLogs = el)}>
<div style={style.consoleLogs}>{this.displayConsoleLogs()}</div>
<div style={style.consoleInputWrapper}>
<span style={style.consoleInputPrompt} onClick={this.focus}>
&gt;
</span>
<input
type="text"
spellCheck="false"
style={style.consoleInput}
onKeyDown={this.onInputKeyDown}
/>
<div>
<PaneHeader hasFocus={true}>
<PaneSection>Console</PaneSection>
</PaneHeader>
<div style={style.consoleStyle} ref={el => (this._consoleLogs = el)}>
<div style={style.consoleLogs}>{this.displayConsoleLogs()}</div>
<div style={style.consoleInputWrapper}>
<span style={style.consoleInputPrompt} onClick={this.focus}>
&gt;
</span>
<input
type="text"
spellCheck="false"
style={style.consoleInput}
onKeyDown={this.onInputKeyDown}
aria-label="console input"
/>
</div>
</div>
</div>
);
Expand Down
9 changes: 9 additions & 0 deletions apps/src/javaide/JavaEditor.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import $ from 'jquery';
import AceEditor from 'react-ace';
import {connect} from 'react-redux';
import {setEditorText} from './javaIdeRedux';
Expand Down Expand Up @@ -26,6 +27,14 @@ class JavaEditor extends React.Component {
this.props.setEditorText(newValue);
};

componentDidMount() {
let textInput = $('.ace_text-input');
if (textInput) {
let textInputElement = textInput.first();
textInputElement.attr('aria-label', 'java editor panel');
}
}

render() {
return (
<div style={this.props.style}>
Expand Down
2 changes: 0 additions & 2 deletions apps/src/javaide/JavaIdeView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class JavaIdeView extends React.Component {
type="button"
style={style.singleButton}
onClick={this.compile}
className="hover-pointer"
>
<FontAwesome icon="cubes" className="fa-2x" />
<br />
Expand All @@ -113,7 +112,6 @@ class JavaIdeView extends React.Component {
type="button"
style={style.singleButton}
onClick={this.run}
className="hover-pointer"
>
<FontAwesome icon="play" className="fa-2x" />
<br />
Expand Down
2 changes: 1 addition & 1 deletion apps/src/sites/studio/pages/java_ide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Provider} from 'react-redux';
import JavaIdeView from '@cdo/apps/javaide/JavaIdeView';
import {getStore} from '@cdo/apps/code-studio/redux';
import javaIde from '@cdo/apps/javaide/javaIdeRedux';
import {registerReducers} from '@cdo/apps//redux';
import {registerReducers} from '@cdo/apps/redux';

$(document).ready(function() {
registerReducers({javaIde});
Expand Down
4 changes: 0 additions & 4 deletions apps/style/javaIde/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ body {

.main {
padding: 0;
}

.hover-pointer:hover {
cursor: pointer;
}