Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit d86ae2f

Browse files
committed
Merge branch 'users/t-xunguy/typescript' into users/t-xunguy/slider-refactor
2 parents c165972 + 416c63c commit d86ae2f

File tree

7 files changed

+6
-20
lines changed

7 files changed

+6
-20
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export async function activate(context: vscode.ExtensionContext) {
595595
// base_64 strings on UNIX systems.
596596

597597
// added any incomplete data to beginning
598-
let processedData = pythonProcessDataBuffer
598+
const processedData = pythonProcessDataBuffer
599599
.join("")
600600
.concat(dataFromTheProcess);
601601
pythonProcessDataBuffer = [];

src/view/components/clue/ClueImage.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export class ClueImage extends React.Component<IProps, {}> {
4949
this.svgRef.current.getButtons()
5050
);
5151
}
52-
5352
}
5453
componentWillUnmount() {
5554
window.document.removeEventListener("keydown", this.handleKeyDown);
@@ -87,7 +86,6 @@ export class ClueImage extends React.Component<IProps, {}> {
8786
);
8887
}
8988
public updateButtonAttributes(key: BUTTONS_KEYS, isActive: boolean) {
90-
9189
const button = this.svgRef.current?.getButtons()[key].current;
9290
if (button) {
9391
button.focus();
@@ -105,7 +103,6 @@ export class ClueImage extends React.Component<IProps, {}> {
105103
button.setAttribute("pressed", `${isActive}`);
106104
button.setAttribute("aria-pressed", `${isActive}`);
107105
}
108-
109106
}
110107
}
111108

src/view/components/clue/ClueSimulator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
VIEW_STATE,
88
WEBVIEW_MESSAGES,
99
} from "../../constants";
10+
import { ViewStateContext } from "../../context";
11+
import "../../styles/Simulator.css";
1012
import "../../styles/Simulator.css";
1113
import PlayLogo from "../../svgs/play_svg";
1214
import StopLogo from "../../svgs/stop_svg";
1315
import { sendMessage } from "../../utils/MessageUtils";
1416
import ActionBar from "../simulator/ActionBar";
1517
import { BUTTONS_KEYS, ClueImage } from "./ClueImage";
16-
import "../../styles/Simulator.css";
17-
import { ViewStateContext } from "../../context";
1818

1919
export const DEFAULT_CLUE_STATE: IClueState = {
2020
buttons: { button_a: false, button_b: false },

src/view/components/clue/Clue_svg.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Licensed under the MIT license.
33

44
import * as React from "react";
5+
import { CLUE_LEDS_COLORS, CONSTANTS } from "../../constants";
56
import "../../styles/SimulatorSvg.css";
6-
import { DEFAULT_CLUE_STATE } from "./ClueSimulator";
7-
import { CONSTANTS, CLUE_LEDS_COLORS } from "../../constants";
87
import svg from "../cpx/Svg_utils";
8+
import { DEFAULT_CLUE_STATE } from "./ClueSimulator";
99
export interface IRefObject {
1010
[key: string]: React.RefObject<SVGRectElement>;
1111
}
@@ -1157,7 +1157,6 @@ export class ClueSvg extends React.Component<IProps, {}> {
11571157
"stop-color",
11581158
rgbColor
11591159
);
1160-
11611160
}
11621161
private updateLeds() {
11631162
// update white led
@@ -1172,7 +1171,6 @@ export class ClueSvg extends React.Component<IProps, {}> {
11721171
ledRef.current,
11731172
this.gradientRefs.whiteLed.current
11741173
);
1175-
11761174
}
11771175
);
11781176
svg.setLed(
@@ -1182,6 +1180,5 @@ export class ClueSvg extends React.Component<IProps, {}> {
11821180
this.ledsRefs.redLed.current,
11831181
this.gradientRefs.redLed.current
11841182
);
1185-
11861183
}
11871184
}

src/view/components/microbit/MicrobitImage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export class MicrobitImage extends React.Component<IProps, {}> {
9696
button.setAttribute("pressed", `${isActive}`);
9797
button.setAttribute("aria-pressed", `${isActive}`);
9898
}
99-
10099
}
101100
}
102101

src/view/components/microbit/MicrobitSimulator.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ export class MicrobitSimulator extends React.Component<any, IState> {
218218
BUTTONS_KEYS.BTN_AB,
219219
active
220220
);
221-
222221
}
223222
} else if (
224223
[event.code, event.key].includes(CONSTANTS.KEYBOARD_KEYS.A) &&
@@ -230,7 +229,6 @@ export class MicrobitSimulator extends React.Component<any, IState> {
230229
BUTTONS_KEYS.BTN_A,
231230
active
232231
);
233-
234232
} else if (
235233
[event.code, event.key].includes(CONSTANTS.KEYBOARD_KEYS.B) &&
236234
this.context === VIEW_STATE.RUNNING
@@ -241,7 +239,6 @@ export class MicrobitSimulator extends React.Component<any, IState> {
241239
BUTTONS_KEYS.BTN_B,
242240
active
243241
);
244-
245242
} else if (
246243
[event.code, event.key].includes(CONSTANTS.KEYBOARD_KEYS.C) &&
247244
this.context === VIEW_STATE.RUNNING
@@ -252,7 +249,6 @@ export class MicrobitSimulator extends React.Component<any, IState> {
252249
BUTTONS_KEYS.BTN_AB,
253250
active
254251
);
255-
256252
} else if (event.key === CONSTANTS.KEYBOARD_KEYS.CAPITAL_F) {
257253
this.togglePlayClick();
258254
} else if (event.key === CONSTANTS.KEYBOARD_KEYS.CAPITAL_R) {

src/view/pages/gettingStarted.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export class GettingStartedPage extends React.Component {
66

77
componentDidMount() {
88
this.selectRef.current?.addEventListener("change", (event: any) => {
9-
const visibleElement = document.querySelector(
10-
".visibleElement"
11-
);
9+
const visibleElement = document.querySelector(".visibleElement");
1210
const target = document.getElementById(event!.target!.value);
1311
if (visibleElement !== null) {
1412
visibleElement.className = "inv";
@@ -17,7 +15,6 @@ export class GettingStartedPage extends React.Component {
1715
target.className = "visibleElement";
1816
}
1917
});
20-
2118
}
2219

2320
render() {

0 commit comments

Comments
 (0)