Skip to content

Commit 821bbc5

Browse files
committed
use a vertical orientation for Run page
Signed-off-by: Nick Mitchell <[email protected]>
1 parent ace9a85 commit 821bbc5

File tree

2 files changed

+44
-55
lines changed

2 files changed

+44
-55
lines changed

pdl-live-react/src/page/Run.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
11
@import "../view/term/RunTerminal.css";
2-
3-
.pdl-run-page-section {
4-
.pdl-run-split-item-card-header,
5-
.pdl-run-split-item-card-body {
6-
padding-inline-start: 0;
7-
padding-right: 0;
8-
}
9-
}

pdl-live-react/src/page/Run.tsx

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {
1111
CardHeader,
1212
CardTitle,
1313
PageSection,
14-
Flex,
15-
FlexItem,
1614
Toolbar,
1715
ToolbarContent,
1816
ToolbarItem,
@@ -88,51 +86,7 @@ export default function Run() {
8886

8987
return (
9088
<Page breadcrumb1="Run">
91-
<PageSection className="pdl-run-page-section">
92-
<Flex>
93-
<FlexItem flex={{ default: "flex_1" }}>
94-
<Card isPlain>
95-
<CardHeader className="pdl-run-split-item-card-header">
96-
<CardTitle>Program</CardTitle>
97-
</CardHeader>
98-
<CardBody className="pdl-run-split-item-card-body">
99-
<div style={{ height: "600px" }}>
100-
<CodeEditor
101-
onEditorDidMount={(editor, _monaco) => {
102-
editor.layout()
103-
}}
104-
options={{ fontSize: 16 }}
105-
aria-label="text area to provide PDL program source"
106-
code={initialInput}
107-
isDarkTheme
108-
isFullHeight
109-
language={Language.yaml}
110-
onChange={(value) => {
111-
setError(false)
112-
setInput(value)
113-
}}
114-
/>
115-
</div>
116-
</CardBody>
117-
</Card>
118-
</FlexItem>
119-
120-
<FlexItem flex={{ default: "flex_1" }}>
121-
<Card isPlain>
122-
<CardHeader className="pdl-run-split-item-card-header">
123-
<CardTitle>Output</CardTitle>
124-
</CardHeader>
125-
<CardBody className="pdl-run-split-item-card-body">
126-
<div
127-
className="pdl-run-terminal"
128-
ref={xtermRef}
129-
style={{ height: "600px" }}
130-
/>
131-
</CardBody>
132-
</Card>
133-
</FlexItem>
134-
</Flex>
135-
89+
<PageSection type="subnav">
13690
<Toolbar>
13791
<ToolbarContent>
13892
<ToolbarItem>
@@ -143,6 +97,49 @@ export default function Run() {
14397
</ToolbarContent>
14498
</Toolbar>
14599
</PageSection>
100+
101+
<PageSection
102+
className="pdl-run-page-section"
103+
padding={{ default: "noPadding" }}
104+
>
105+
<Card isCompact isPlain>
106+
<CardHeader className="pdl-run-split-item-card-header">
107+
<CardTitle>Program</CardTitle>
108+
</CardHeader>
109+
<CardBody className="pdl-run-split-item-card-body">
110+
<div style={{ height: "300px" }}>
111+
<CodeEditor
112+
onEditorDidMount={(editor, _monaco) => {
113+
editor.layout()
114+
}}
115+
options={{ fontSize: 16 }}
116+
aria-label="text area to provide PDL program source"
117+
code={initialInput}
118+
isDarkTheme
119+
isFullHeight
120+
language={Language.yaml}
121+
onChange={(value) => {
122+
setError(false)
123+
setInput(value)
124+
}}
125+
/>
126+
</div>
127+
</CardBody>
128+
</Card>
129+
130+
<Card isCompact isPlain>
131+
<CardHeader className="pdl-run-split-item-card-header">
132+
<CardTitle>Output</CardTitle>
133+
</CardHeader>
134+
<CardBody className="pdl-run-split-item-card-body">
135+
<div
136+
className="pdl-run-terminal"
137+
ref={xtermRef}
138+
style={{ height: "400px" }}
139+
/>
140+
</CardBody>
141+
</Card>
142+
</PageSection>
146143
</Page>
147144
)
148145
}

0 commit comments

Comments
 (0)