Skip to content

Commit 33bd3da

Browse files
committed
fix: reduce default height of terminal portion
This also fixes a bug where we would force an unnecessary resize via the Allotment api on initial render.
1 parent 5bf3463 commit 33bd3da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/plugin-codeflare/src/components/AskingTerminal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default class AskingTerminal extends React.PureComponent<Props, State> {
8181
private readonly allotmentRef = React.createRef<AllotmentHandle>()
8282

8383
private readonly _sizes = {
84-
qa: [73, 27],
84+
qa: [80, 20],
8585
noqa: [27, 73],
8686
}
8787

@@ -97,7 +97,7 @@ export default class AskingTerminal extends React.PureComponent<Props, State> {
9797
}
9898

9999
public componentDidUpdate(prevProps: Props, prevState: State) {
100-
if (this.state && prevState && prevState.ask !== this.state.ask) {
100+
if (this.state && prevState && prevState.ask && prevState.ask !== this.state.ask) {
101101
setTimeout(() => this.allotmentRef.current?.resize(this.sizes))
102102
}
103103
}

0 commit comments

Comments
 (0)