Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/e2e/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { waitFor } from "@testing-library/dom";
import * as fs from "fs";
import * as fsp from "fs/promises";
import * as path from "path";
import * as os from "os";
import "pptr-testing-library/extend";
import puppeteer, { Page } from "puppeteer";

Expand All @@ -22,7 +23,9 @@ export interface BrowserDownload {
*/
export class App {
private page: Promise<Page>;
private downloadPath = fs.mkdtempSync("puppeteer-downloads");
private downloadPath = fs.mkdtempSync(
path.join(os.tmpdir(), "puppeteer-downloads-")
);

constructor() {
this.page = (async () => {
Expand Down
12 changes: 2 additions & 10 deletions src/editor/EditorArea.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Box, Flex } from "@chakra-ui/react";
import { MAIN_FILE } from "../fs/fs";
import ZoomControls from "./ZoomControls";
import NonMainFileNotice from "./NonMainFileNotice";
import EditorContainer from "./EditorContainer";
import ProjectActionBar from "../project/ProjectActionBar";
import NonMainFileNotice from "./NonMainFileNotice";
import ZoomControls from "./ZoomControls";

interface EditorAreaProps {
filename: string;
Expand Down Expand Up @@ -37,13 +36,6 @@ const EditorArea = ({ filename, onSelectedFileChanged }: EditorAreaProps) => {
/>
<EditorContainer filename={filename} />
</Box>
<ProjectActionBar
pt={1}
pb={1}
pl={2}
pr={2}
borderTop="1px solid #d3d3d3"
/>
</Flex>
);
};
Expand Down
34 changes: 25 additions & 9 deletions src/workbench/Workbench.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { useState } from "react";
import { BottomResizable, Fill, LeftResizable, ViewPort } from "react-spaces";
import {
Bottom,
BottomResizable,
Fill,
LeftResizable,
ViewPort,
} from "react-spaces";
import { ConnectionStatus } from "../device/device";
import { useConnectionStatus } from "../device/device-hooks";
import EditorArea from "../editor/EditorArea";
import { MAIN_FILE } from "../fs/fs";
import ProjectActionBar from "../project/ProjectActionBar";
import SerialArea from "../serial/SerialArea";
import LeftPanel from "./LeftPanel";

Expand Down Expand Up @@ -31,15 +38,24 @@ const Workbench = () => {
filename={filename}
onSelectedFileChanged={setFilename}
/>
</Fill>
<BottomResizable
size={serialVisible ? "40%" : "0%"}
style={{ borderTop: "4px solid whitesmoke" }}
>
{/* For accessibility.
<BottomResizable
size={serialVisible ? "40%" : "0%"}
style={{ borderTop: "4px solid whitesmoke" }}
>
{/* For accessibility.
Using `display` breaks the terminal height adjustment */}
<SerialArea visibility={serialVisible ? "unset" : "hidden"} />
</BottomResizable>
<SerialArea visibility={serialVisible ? "unset" : "hidden"} />
</BottomResizable>
</Fill>
<Bottom size={58}>
<ProjectActionBar
pt={1}
pb={1}
pl={2}
pr={2}
borderTop="1px solid #d3d3d3"
/>
</Bottom>
</Fill>
</Fill>
</ViewPort>
Expand Down