Skip to content

Commit 4d885b3

Browse files
committed
feat: fix remarks
1 parent e73b7b8 commit 4d885b3

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed

src/components/Graphs/Graph.module.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
border: 1px solid var(--sapList_BorderColor, #ddd);
55
border-radius: 16px;
66
overflow: hidden;
7+
overflow-x: hidden !important;
78
background-color: var(--sapBackgroundColor, #fafafa);
89
font-family: var(--sapFontFamily);
9-
max-width: 1280px;
10-
margin: 0 auto;
10+
width: 100%;
11+
max-width: 100%;
12+
box-sizing: border-box;
1113
}
1214

1315
.graphColumn {
1416
flex: 1;
1517
display: flex;
1618
flex-direction: column;
19+
overflow-x: hidden !important;
20+
width: 100%;
21+
max-width: 100%;
1722
}
1823

1924
.graphHeader {
@@ -68,7 +73,19 @@
6873
:global([data-theme='dark'] .react-flow__controls-button) {
6974
background: transparent;
7075
color: #fff;
71-
border-color: rgba(255, 255, 255, 0.25);
76+
}
77+
78+
/* Force ReactFlow to not have horizontal scroll */
79+
:global(.react-flow) {
80+
overflow-x: hidden !important;
81+
}
82+
83+
:global(.react-flow__pane) {
84+
overflow-x: hidden !important;
85+
}
86+
87+
:global(.react-flow__viewport) {
88+
overflow-x: hidden !important;
7289
}
7390

7491
:global([data-theme='dark'] .react-flow__controls-button:hover) {

src/components/Graphs/Graph.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ const Graph: React.FC = () => {
9595
nodesConnectable={false}
9696
elementsSelectable={false}
9797
zoomOnScroll={true}
98-
panOnDrag={true}
98+
panOnDrag={false}
99+
preventScrolling={true}
99100
>
100101
<Controls showInteractive={false} />
101102
<Background />

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
max-width: 1280px;
33
margin: 0.1em auto -8px auto;
44
width: 100%;
5+
overflow-x: hidden;
56
}

src/spaces/mcp/pages/McpPage.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,15 @@ export default function McpPage() {
107107
titleText={t('McpPage.graphTitle')}
108108
hideTitleText
109109
>
110-
<Graph />
110+
<Panel
111+
className={styles.panel}
112+
headerLevel="H2"
113+
headerText="Panel"
114+
header={<Title level="H2">{t('McpPage.graphTitle')}</Title>}
115+
noAnimation
116+
>
117+
<Graph />
118+
</Panel>
111119
</ObjectPageSection>
112120
<ObjectPageSection
113121
className="cp-page-section-components"

0 commit comments

Comments
 (0)