Skip to content

Commit d3faf46

Browse files
committed
layout fix
1 parent 625d9a3 commit d3faf46

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

apps/remix-ide/src/app/panels/layout.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { QueryParams } from '@remix-project/remix-lib'
66
const profile: Profile = {
77
name: 'layout',
88
description: 'layout',
9-
methods: ['minimize', 'minimizeSidePanel', 'maximiseSidePanel', 'resetSidePanel', 'maximizeTerminal', 'maximiseRightSidePanel', 'resetRightSidePanel']
9+
methods: ['minimize', 'minimizeSidePanel', 'maximiseSidePanel', 'resetSidePanel', 'maximizeTerminal', 'maximiseRightSidePanel', 'resetRightSidePanel', 'triggerChange']
1010
}
1111

1212
interface panelState {
@@ -194,4 +194,9 @@ export class Layout extends Plugin {
194194
this.enhanced[current] = false
195195
this.event.emit('resetRightSidePanel')
196196
}
197+
198+
triggerChange () {
199+
this.event.emit('change', this.panels)
200+
this.emit('change', this.panels)
201+
}
197202
}

apps/remix-ide/src/app/panels/terminal.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,16 @@ export default class Terminal extends Plugin {
127127
this.on('debugger', 'debuggingStarted', (data: any) => {
128128
this.isDebugging = true
129129
this.renderComponent()
130+
// Trigger layout change to update terminal height
131+
this.call('layout', 'triggerChange')
130132
})
131133

132134
this.on('debugger', 'debuggingStopped', () => {
133135
this.isDebugging = false
134136
this.debuggerCallStack = []
135137
this.renderComponent()
138+
// Trigger layout change to reset terminal height
139+
this.call('layout', 'triggerChange')
136140
})
137141

138142
// Listen for file changes - auto-restore terminal panel if maximized when main panel is used

libs/remix-ui/debugger-ui/src/lib/debug-layout/debug-layout.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
.debug-section-trace {
2020
flex-shrink: 0;
2121
max-height: 33.33%;
22-
min-height: 200px;
22+
min-height: 300px;
2323
overflow: hidden;
2424
display: flex;
2525
flex-direction: column;
2626
}
2727

2828
.debug-section-object {
2929
flex: 1;
30-
min-height: 400px;
30+
min-height: 300px;
3131
display: flex;
3232
flex-direction: column;
3333
overflow: hidden;

libs/remix-ui/panel/src/lib/main/main-panel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ const RemixUIMainPanel = (props: RemixUIMainPanelProps) => {
2727
if (layout.panels) {
2828
const pluginPanels: PluginRecord[] = []
2929
Object.values(layout.panels).map((panel: any) => {
30+
// Check if terminal is debugging by accessing the plugin's isDebugging property
31+
const isTerminalDebugging = panel.plugin.profile.name === 'terminal' && panel.plugin.isDebugging
3032
pluginPanels.push({
3133
profile: panel.plugin.profile,
3234
active: panel.active,
3335
view: panel.plugin.profile.name === 'tabs' ? panel.plugin.renderTabsbar() : panel.plugin.render(),
34-
class: panel.plugin.profile.name + '-wrap ' + (panel.minimized ? 'minimized ' : ' ') + ((platform === appPlatformTypes.desktop)? 'desktop' : ''),
36+
class: panel.plugin.profile.name + '-wrap ' + (panel.minimized ? 'minimized ' : ' ') + ((platform === appPlatformTypes.desktop)? 'desktop' : '') + (isTerminalDebugging ? ' debugging' : ''),
3537
minimized: panel.minimized,
3638
pinned: panel.pinned
3739
})

libs/remix-ui/panel/src/lib/plugins/panel.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ iframe {
131131
height: 20%;
132132
}
133133

134+
.terminal-wrap.debugging {
135+
height: 31%;
136+
}
137+
134138
.terminal-wrap.maximized {
135139
height: 100% !important;
136140
flex: 1;

0 commit comments

Comments
 (0)