Skip to content

Commit bb1745a

Browse files
committed
fix(modals): address pr feedback — comment clarity and document panel assumption
1 parent 6c80532 commit bb1745a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/sim/app/_styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @see stores/constants.ts for the source of truth
1111
*/
1212
:root {
13-
--sidebar-width: 0px; /* 0 outside workspace; blocking script sets actual value on workspace pages */
13+
--sidebar-width: 0px; /* 0 outside workspace; blocking script always sets actual value on workspace pages */
1414
--panel-width: 320px; /* PANEL_WIDTH.DEFAULT */
1515
--toolbar-triggers-height: 300px; /* TOOLBAR_TRIGGERS_HEIGHT.DEFAULT */
1616
--editor-connections-height: 172px; /* EDITOR_CONNECTIONS_HEIGHT.DEFAULT */

apps/sim/components/emcn/components/modal/modal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ const ModalContent = React.forwardRef<
168168
)}
169169
style={{
170170
left: isWorkflowPage
171-
? 'calc(50% + (var(--sidebar-width) - var(--panel-width)) / 2)'
171+
? // --panel-width is always the rendered panel width on /w/ routes (panel is never hidden/collapsed)
172+
'calc(50% + (var(--sidebar-width) - var(--panel-width)) / 2)'
172173
: 'calc(var(--sidebar-width) / 2 + 50%)',
173174
...style,
174175
}}

0 commit comments

Comments
 (0)