Skip to content

Commit

Permalink
fix: reduce default height of terminal portion
Browse files Browse the repository at this point in the history
This also fixes a bug where we would force an unnecessary resize via the Allotment api on initial render.
  • Loading branch information
starpit committed Nov 18, 2022
1 parent 5bf3463 commit 33bd3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/plugin-codeflare/src/components/AskingTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class AskingTerminal extends React.PureComponent<Props, State> {
private readonly allotmentRef = React.createRef<AllotmentHandle>()

private readonly _sizes = {
qa: [73, 27],
qa: [80, 20],
noqa: [27, 73],
}

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

public componentDidUpdate(prevProps: Props, prevState: State) {
if (this.state && prevState && prevState.ask !== this.state.ask) {
if (this.state && prevState && prevState.ask && prevState.ask !== this.state.ask) {
setTimeout(() => this.allotmentRef.current?.resize(this.sizes))
}
}
Expand Down

0 comments on commit 33bd3da

Please sign in to comment.