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
2 changes: 1 addition & 1 deletion apps/sim/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--panel-width: 244px;
--toolbar-triggers-height: 300px;
--editor-connections-height: 200px;
--terminal-height: 30px;
--terminal-height: 100px;
}

.sidebar-container {
Expand Down
8 changes: 4 additions & 4 deletions apps/sim/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
var toolbarParsed = JSON.parse(toolbarStored);
var toolbarState = toolbarParsed?.state;
var toolbarTriggersHeight = toolbarState?.toolbarTriggersHeight;
if (toolbarTriggersHeight !== undefined && toolbarTriggersHeight >= 100 && toolbarTriggersHeight <= 800) {
if (toolbarTriggersHeight !== undefined && toolbarTriggersHeight >= 30 && toolbarTriggersHeight <= 800) {
document.documentElement.style.setProperty('--toolbar-triggers-height', toolbarTriggersHeight + 'px');
}
}
Expand Down Expand Up @@ -144,13 +144,13 @@ export default function RootLayout({ children }: { children: React.ReactNode })
var terminalParsed = JSON.parse(terminalStored);
var terminalState = terminalParsed?.state;
var terminalHeight = terminalState?.terminalHeight;
var maxTerminalHeight = window.innerHeight * 0.5;
var maxTerminalHeight = window.innerHeight * 0.7;

// Cap stored height at 50% of viewport
// Cap stored height at 70% of viewport
if (terminalHeight >= 30 && terminalHeight <= maxTerminalHeight) {
document.documentElement.style.setProperty('--terminal-height', terminalHeight + 'px');
} else if (terminalHeight > maxTerminalHeight) {
// If stored height exceeds 50%, cap it
// If stored height exceeds 70%, cap it
document.documentElement.style.setProperty('--terminal-height', maxTerminalHeight + 'px');
}
}
Expand Down
Loading
Loading