Skip to content

Commit 4bc3bec

Browse files
committed
fix: panning
1 parent f5cee53 commit 4bc3bec

File tree

2 files changed

+58
-21
lines changed

2 files changed

+58
-21
lines changed

src/spaces/mcp/pages/McpPage.module.css

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,46 @@
1212

1313
.expandedCard {
1414
transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
15-
transform: scale(1.02);
16-
box-shadow: var(--sapContent_Shadow3) !important;
17-
border: 2px solid var(--sapButton_Selected_BorderColor) !important;
15+
/* Reduced highlighting for component cards */
16+
border: 1px solid var(--sapObjectHeader_BorderColor) !important;
17+
}
18+
19+
.expandedCard:hover {
20+
transform: none !important; /* Remove hover transform */
21+
box-shadow: var(--sapContent_Shadow1) !important; /* Keep normal shadow */
22+
}
23+
24+
/* Non-interactive expanded card - no hover effects */
25+
.expandedCardNonInteractive {
26+
transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
27+
pointer-events: none; /* Disable all interaction */
28+
}
29+
30+
.expandedCardNonInteractive:hover {
31+
transform: none !important; /* Override base card hover transform */
32+
box-shadow: var(--sapContent_Shadow1) !important; /* Keep normal shadow */
33+
}
34+
35+
/* Disabled/non-interactive card - no hover effects */
36+
.disabledCard {
37+
pointer-events: none; /* Disable all interaction */
38+
opacity: 0.6; /* Visual indication that it's disabled */
39+
}
40+
41+
.disabledCard:hover {
42+
transform: none !important; /* Override base card hover transform */
43+
box-shadow: var(--sapContent_Shadow1) !important; /* Keep normal shadow */
44+
}
45+
46+
/* Non-interactive card (like graph) - no hover effects but allows internal interaction */
47+
.nonInteractiveCard {
48+
/* Allow internal interaction but disable card-level hover effects */
49+
cursor: default;
50+
}
51+
52+
.nonInteractiveCard:hover {
53+
transform: none !important; /* Override base card hover transform */
54+
box-shadow: var(--sapContent_Shadow1) !important; /* Keep normal shadow */
1855
}
1956

2057
.hidingCard {

src/spaces/mcp/pages/McpPage.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,12 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName:
172172
>
173173
<div style={{ maxWidth: '1280px', margin: '0 auto', width: '100%', paddingTop: '16px', paddingBottom: '12px' }}>
174174
<BentoGrid className={expandedCard ? styles.expandedGrid : ''}>
175-
{/* Left side: Graph in extra-large (top) - expands to full width when any component is expanded */}
176-
<BentoCard
177-
size="extra-large"
178-
gridColumn={expandedCard ? "1 / 13" : "1 / 9"}
179-
gridRow="1 / 5"
180-
className={expandedCard ? styles.expandedCard : ''}
181-
>
182-
<GraphCard
183-
title="Resource Dependencies"
184-
colorBy={expandedCard === 'gitops' ? 'flux' : 'source'}
185-
/>
186-
</BentoCard>
187-
188-
{/* Crossplane component - shows in default view or when expanded */}
175+
{/* Left side: Crossplane component in large (top) - expands to full width when expanded */}
189176
{(!expandedCard || expandedCard === 'crossplane') && (
190177
<BentoCard
191178
size="large"
192179
gridColumn={expandedCard === 'crossplane' ? "1 / 13" : "1 / 9"}
193-
gridRow="5 / 7"
180+
gridRow="1 / 3"
194181
className={expandedCard === 'crossplane' ? styles.expandedCard : ''}
195182
>
196183
<div style={{ position: 'relative', height: '100%' }}>
@@ -227,7 +214,7 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName:
227214
<BentoCard
228215
size="large"
229216
gridColumn="1 / 13"
230-
gridRow="5 / 7"
217+
gridRow="1 / 3"
231218
className={styles.expandedCard}
232219
>
233220
<div style={{ position: 'relative', height: '100%' }}>
@@ -257,6 +244,19 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName:
257244
</BentoCard>
258245
)}
259246

247+
{/* Left side: Graph in extra-large (bottom) - expands to full width when any component is expanded */}
248+
<BentoCard
249+
size="extra-large"
250+
gridColumn={expandedCard ? "1 / 13" : "1 / 9"}
251+
gridRow="3 / 7"
252+
className={expandedCard ? styles.expandedCardNonInteractive : styles.nonInteractiveCard}
253+
>
254+
<GraphCard
255+
title="Resource Dependencies"
256+
colorBy={expandedCard === 'gitops' ? 'flux' : 'source'}
257+
/>
258+
</BentoCard>
259+
260260
{/* Right side cards - hide when any component is expanded */}
261261
{!expandedCard && (
262262
<>
@@ -303,7 +303,7 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName:
303303
size="small"
304304
gridColumn="9 / 11"
305305
gridRow="5 / 7"
306-
className={isExpanding ? styles.hidingCard : ''}
306+
className={isExpanding ? styles.hidingCard : styles.disabledCard}
307307
>
308308
<ComponentCard
309309
enabled={false}
@@ -321,7 +321,7 @@ function McpPageContent({ mcp, controlPlaneName }: { mcp: any; controlPlaneName:
321321
size="small"
322322
gridColumn="11 / 13"
323323
gridRow="5 / 7"
324-
className={isExpanding ? styles.hidingCard : ''}
324+
className={isExpanding ? styles.hidingCard : styles.disabledCard}
325325
>
326326
<ComponentCard
327327
enabled={false}

0 commit comments

Comments
 (0)