Skip to content

Commit 49480c6

Browse files
committed
fix: pixel-perfect IDE editor layout to match Figma design
Audit against Figma node 1156:23692 (IDE Editor full, file 4hKtI49khKHjribAGpFUkW). Layout composition: - Window border-radius: 24px → 16px (Figma exact) - Remove outer window border and box-shadow (not in Figma) - Main area padding: 0 8px with 8px gap between sidebar and editor - Editor container: remove margins, bg #1C1C1D, border-radius 12px - Sidebar: remove vertical margins, full height - Activity bar: align-self flex-start (HUG height per Figma) - Inner layout gap: 8px between sidebar and code panel Title bar & status bar: - Title bar height: 56px → 48px (Figma exact) - Status bar padding: 8px 24px → 8px 8px, height 48px - Token --cortex-height-titlebar: 56px → 48px Editor area: - Tab bar height: 36px → 40px, bg matches code panel (#1C1C1D) - Tab bar padding: 4px 8px 4px 4px (Figma exact) - Code font size: 13px → 14px (JetBrains Mono per Figma) - Line height multiplier: 1.5 → 1.15 (~16px per Figma) - CortexCodeEditor border-radius: 16px → 12px Resize dividers: - Sidebar splitter width: 6px → 4px, solid accent on hover - Bottom panel splitter: fix width→height (horizontal divider) - Container radius token: 24px → 16px
1 parent 2a046a1 commit 49480c6

13 files changed

+50
-15
lines changed

src/components/cortex/CortexActivityBar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ export const CortexActivityBar: Component<CortexActivityBarProps> = (props) => {
6565
display: "flex",
6666
"flex-direction": "column",
6767
width: "var(--cortex-space-10)",
68+
<<<<<<< HEAD
6869
height: "100%",
70+
=======
71+
"align-self": "flex-start",
72+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
6973
background: "var(--cortex-sidebar-bg)",
7074
"border-radius": "var(--cortex-sidebar-radius)",
7175
border: "1px solid var(--cortex-border-default)",

src/components/cortex/CortexCodeEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const CortexCodeEditor: Component<CortexCodeEditorProps> = (props) => {
9090
height: "100%",
9191
background: "var(--cortex-bg-secondary)",
9292
border: "1px solid var(--cortex-border-default)",
93-
"border-radius": "16px",
93+
"border-radius": "12px",
9494
overflow: "hidden",
9595
...local.style,
9696
});

src/components/cortex/CortexDesktopLayout.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,14 @@ export function CortexDesktopLayout(props: ParentProps) {
289289
return (
290290
<div style={{
291291
display: "flex", "flex-direction": "column", width: "100vw", height: "100vh",
292+
<<<<<<< HEAD
292293
background: "var(--cortex-bg-primary)", border: "1px solid var(--cortex-border-default)",
293294
"border-radius": "var(--cortex-panel-radius, 16px)",
294295
"box-shadow": "0px 4px 26px 15px rgba(38,36,37,0.38), inset 0px 0px 13.1px 6px rgba(26,24,25,0.2)",
296+
=======
297+
background: "var(--cortex-bg-primary)",
298+
"border-radius": "16px",
299+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
295300
overflow: "hidden", "font-family": "var(--cortex-font-sans)", color: "var(--cortex-text-primary)",
296301
}}>
297302
<FileEditHandlers />
@@ -311,7 +316,11 @@ export function CortexDesktopLayout(props: ParentProps) {
311316
onProjectDropdownClick={() => window.dispatchEvent(new CustomEvent("folder:open"))}
312317
/>
313318

319+
<<<<<<< HEAD
314320
<main style={{ display: "flex", flex: "1", overflow: "hidden", position: "relative", padding: "0 8px" }}>
321+
=======
322+
<main style={{ display: "flex", flex: "1", overflow: "hidden", position: "relative", padding: "0 8px", gap: "8px" }}>
323+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
315324
<CortexModeCarousel
316325
mode={mode()}
317326
vibeContent={() =>

src/components/cortex/CortexStatusBar.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,13 @@ export const CortexStatusBar: Component<CortexStatusBarProps> = (props) => {
7272
"align-items": "center",
7373
"justify-content": "space-between",
7474
gap: "40px",
75+
<<<<<<< HEAD
7576
height: "var(--cortex-height-statusbar, 24px)",
7677
padding: "0 24px",
78+
=======
79+
padding: "8px 8px",
80+
height: "48px",
81+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
7782
"flex-shrink": "0",
7883
"font-family": "var(--cortex-font-sans)",
7984
"font-size": "12px",

src/components/cortex/CortexTitleBar.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,12 @@ export const CortexTitleBar: Component<CortexTitleBarProps> = (props) => {
187187
width: "100%",
188188
height: "48px",
189189
"min-height": "48px",
190+
<<<<<<< HEAD
190191
background: "var(--cortex-bg-primary)",
192+
=======
193+
padding: "0 0 0 8px",
194+
background: "transparent",
195+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
191196
position: "relative",
192197
"-webkit-app-region": "drag",
193198
"user-select": "none",

src/components/cortex/EditorTabBar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ export const EditorTabBar: Component<EditorTabBarProps> = (props) => {
5353
display: "flex",
5454
"align-items": "center",
5555
"align-self": "stretch",
56-
height: "36px",
57-
background: "var(--cortex-bg-primary)",
56+
height: "40px",
57+
background: "var(--cortex-bg-secondary)",
58+
padding: "4px 8px 4px 4px",
5859
"border-bottom": "1px solid var(--cortex-border-default)",
5960
overflow: "hidden",
6061
"flex-shrink": "0",

src/components/cortex/layout/CortexBottomPanelContainer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ export function CortexBottomPanelContainer(props: CortexBottomPanelContainerProp
3232
<div
3333
style={{
3434
height: "4px",
35+
<<<<<<< HEAD
3536
width: "100%",
37+
=======
38+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
3639
cursor: "row-resize",
3740
background: "transparent",
3841
transition: "background 200ms ease-out",

src/components/cortex/layout/CortexIDELayout.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ export function CortexIDELayout(props: CortexIDELayoutProps) {
4848
"flex-direction": "column",
4949
overflow: "hidden",
5050
"min-width": "0",
51+
<<<<<<< HEAD
5152
background: "var(--cortex-bg-secondary, #1C1C1D)",
53+
=======
54+
background: "var(--cortex-bg-secondary)",
55+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
5256
"border-radius": "12px",
5357
border: "1px solid var(--cortex-border-default)",
5458
});
@@ -62,7 +66,11 @@ export function CortexIDELayout(props: CortexIDELayoutProps) {
6266
/>
6367

6468
<div style={{ display: "flex", flex: "1", overflow: "hidden", "flex-direction": "column" }}>
69+
<<<<<<< HEAD
6570
<div style={{ display: "flex", flex: "1", overflow: "hidden", gap: "8px", padding: "0 8px" }}>
71+
=======
72+
<div style={{ display: "flex", flex: "1", overflow: "hidden", gap: "8px" }}>
73+
>>>>>>> 99dade2 (fix: pixel-perfect IDE editor layout to match Figma design)
6674
<CortexSidebarContainer
6775
sidebarTab={props.sidebarTab}
6876
sidebarCollapsed={props.sidebarCollapsed}

src/components/cortex/layout/CortexSidebarContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export function CortexSidebarContainer(props: CortexSidebarContainerProps) {
165165

166166
<div
167167
style={{
168-
width: "6px",
168+
width: "4px",
169169
cursor: "col-resize",
170170
background: "transparent",
171171
transition: "background 150ms",
@@ -193,7 +193,7 @@ export function CortexSidebarContainer(props: CortexSidebarContainerProps) {
193193
}}
194194
onMouseEnter={(e) => {
195195
const el = e.currentTarget as HTMLElement;
196-
el.style.background = "linear-gradient(to right, transparent 2px, var(--cortex-accent-primary) 2px, var(--cortex-accent-primary) 4px, transparent 4px)";
196+
el.style.background = "var(--cortex-accent-primary)";
197197
}}
198198
onMouseLeave={(e) => {
199199
(e.currentTarget as HTMLElement).style.background = "transparent";

src/components/editor/CodeEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,12 +560,12 @@ export function CodeEditor(props: CodeEditorProps) {
560560
});
561561
const editorFontSize = createMemo(() => {
562562
const langSettings = getEffectiveEditorSettings(currentLanguage());
563-
return langSettings.fontSize ?? 13;
563+
return langSettings.fontSize ?? 14;
564564
});
565565
const editorLineHeight = createMemo(() => {
566566
const langSettings = getEffectiveEditorSettings(currentLanguage());
567-
const fontSize = langSettings.fontSize ?? 13;
568-
const lineHeightMultiplier = langSettings.lineHeight ?? 1.5;
567+
const fontSize = langSettings.fontSize ?? 14;
568+
const lineHeightMultiplier = langSettings.lineHeight ?? 1.15;
569569
return Math.round(fontSize * lineHeightMultiplier);
570570
});
571571

0 commit comments

Comments
 (0)