Skip to content

Commit b71b651

Browse files
committed
Remove padding in viz details pane in arc
To allow custom padding when overriding content. Removed PaneContainer since not used.
1 parent e381cb3 commit b71b651

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/DetailsPane.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { ClipboardCopier, PropertiesTable, upperFirst } from 'neo4j-arc/common'
2323

2424
import { StyleableNodeLabel } from './StyleableNodeLabel'
2525
import { StyleableRelType } from './StyleableRelType'
26-
import { PaneBody, PaneHeader, PaneTitle } from './styled'
26+
import { PaneBody, PaneHeader, PaneTitle, PaneWrapper } from './styled'
2727
import { DetailsPaneProps } from 'neo4j-arc'
2828

2929
export const DETAILS_PANE_STEP_SIZE = 1000
@@ -51,7 +51,7 @@ export function DetailsPane({
5151
}
5252

5353
return (
54-
<>
54+
<PaneWrapper>
5555
<PaneHeader>
5656
<PaneTitle>
5757
<span>{`${upperFirst(vizItem.type)} properties`}</span>
@@ -95,6 +95,6 @@ export function DetailsPane({
9595
nodeInspectorWidth={nodeInspectorWidth}
9696
/>
9797
</PaneBody>
98-
</>
98+
</PaneWrapper>
9999
)
100100
}

src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/OverviewPane.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
PaneBodySectionSmallText,
3535
PaneBodySectionTitle,
3636
PaneHeader,
37+
PaneWrapper,
3738
StyledLegendInlineList
3839
} from './styled'
3940

@@ -92,7 +93,7 @@ export default function OverviewPane({
9293
const totalNumOfRelTypes = relTypes ? Object.keys(relTypes).length : 0
9394

9495
return (
95-
<>
96+
<PaneWrapper>
9697
<PaneHeader>{'Overview'}</PaneHeader>
9798
<PaneBody>
9899
{labels && visibleLabelKeys.length !== 0 && (
@@ -172,6 +173,6 @@ export default function OverviewPane({
172173
)} nodes, ${numberToUSLocale(relationshipCount)} relationships.`}
173174
</div>
174175
</PaneBody>
175-
</>
176+
</PaneWrapper>
176177
)
177178
}

src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/styled.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,8 @@ export const StyledNodeInspectorContainer = styled.div<{
138138
box-shadow: ${props => props.theme.standardShadow};
139139
`
140140

141-
export const PaneContainer = styled.div`
141+
export const PaneWrapper = styled.div`
142142
padding: 0 14px;
143-
height: 100%;
144-
display: flex;
145-
flex-direction: column;
146143
`
147144

148145
export const PaneHeader = styled.div`

src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/DefaultDetailsPane.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import React, { useState } from 'react'
2222
import { ClipboardCopier, PropertiesTable, upperFirst } from 'neo4j-arc/common'
2323
import { NodeItem, RelationshipItem } from '../../types'
2424

25-
import { PaneBody, PaneHeader, PaneTitle } from './styled'
25+
import { PaneBody, PaneHeader, PaneTitle, PaneWrapper } from './styled'
2626
import { NodeLabel } from './NodeLabel'
2727
import { RelType } from './RelType'
2828
import { GraphStyleModel } from '../../models/GraphStyle'
@@ -57,7 +57,7 @@ export function DefaultDetailsPane({
5757
}
5858

5959
return (
60-
<>
60+
<PaneWrapper>
6161
<PaneHeader>
6262
<PaneTitle>
6363
<span>{`${upperFirst(vizItem.type)} properties`}</span>
@@ -101,6 +101,6 @@ export function DefaultDetailsPane({
101101
nodeInspectorWidth={nodeInspectorWidth}
102102
/>
103103
</PaneBody>
104-
</>
104+
</PaneWrapper>
105105
)
106106
}

src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/DefaultOverviewPane.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
PaneBodySectionHeaderWrapper,
3434
PaneBodySectionSmallText,
3535
PaneBodySectionTitle,
36-
StyledLegendInlineList
36+
StyledLegendInlineList,
37+
PaneWrapper
3738
} from './styled'
3839

3940
import { NodeLabel } from './NodeLabel'
@@ -103,7 +104,7 @@ function DefaultOverviewPane({
103104
const totalNumOfRelTypes = relTypes ? Object.keys(relTypes).length : 0
104105

105106
return (
106-
<>
107+
<PaneWrapper>
107108
<PaneHeader>{'Overview'}</PaneHeader>
108109
<PaneBody>
109110
{labels && visibleLabelKeys.length !== 0 && (
@@ -183,7 +184,7 @@ function DefaultOverviewPane({
183184
)} nodes, ${numberToUSLocale(relationshipCount)} relationships.`}
184185
</div>
185186
</PaneBody>
186-
</>
187+
</PaneWrapper>
187188
)
188189
}
189190

src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/styled.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ export const NonClickableRelTypeChip = styled(StyledRelationshipChip)`
4444
cursor: default;
4545
`
4646

47+
export const PaneWrapper = styled.div`
48+
padding: 0 14px;
49+
`
50+
4751
export const PaneHeader = styled.div`
4852
font-size: 16px;
4953
margin-top: 10px;

src/neo4j-arc/graph-visualization/GraphVisualizer/styled.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const PaneContainer = styled.div<{
6868
paneWidth: number
6969
}>`
7070
width: ${props => props.paneWidth}px;
71-
padding: 0 14px;
7271
height: 100%;
7372
display: flex;
7473
flex-direction: column;

src/neo4j-arc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neo4j-devtools/arc",
3-
"version": "0.0.34",
3+
"version": "0.0.35",
44
"main": "dist/neo4j-arc.js",
55
"author": "Neo4j Inc.",
66
"license": "GPL-3.0",

0 commit comments

Comments
 (0)