Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font-color not changed in graph contextual popups when in dark mode #621 #699

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/chart/graph/GraphChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const NeoGraphChart = (props: ChartProps) => {

let icons = parseNodeIconConfig(settings.iconStyle);
const colorScheme = categoricalColorSchemes[settings.nodeColorScheme];
const {theme} = props;

const generateVisualizationDataGraph = (records, _) => {
let nodes: Record<string, any>[] = [];
Expand Down Expand Up @@ -159,6 +160,7 @@ const NeoGraphChart = (props: ChartProps) => {
defaultRelWidth: settings.defaultRelWidth,
relColorProp: settings.relColorProp,
defaultRelColor: settings.defaultRelColor,
theme: theme,
},
engine: {
layout: layouts[settings.layout],
Expand Down
1 change: 1 addition & 0 deletions src/chart/graph/GraphChartVisualization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export interface GraphChartVisualizationProps {
defaultRelWidth: number;
relColorProp: string;
defaultRelColor: string;
theme?: string;
};
/**
* The keys in 'engine' are related to the graph rendering engine (force-directed layout) or the NeoDash query engine.
Expand Down
2 changes: 1 addition & 1 deletion src/chart/graph/component/GraphChartInspectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
>
<Dialog.Header id='form-dialog-title'>
{props.interactivity.selectedEntity
? getEntityHeader(props.interactivity.selectedEntity, props?.engine?.selection)

Check warning on line 21 in src/chart/graph/component/GraphChartInspectModal.tsx

View check run for this annotation

Codecov / codecov/patch

src/chart/graph/component/GraphChartInspectModal.tsx#L21

Added line #L21 was not covered by tests
: ''}
</Dialog.Header>
<Dialog.Content>
<GraphEntityInspectionTable entity={props.interactivity.selectedEntity}></GraphEntityInspectionTable>
<GraphEntityInspectionTable entity={props.interactivity.selectedEntity} theme={props.style.theme}></GraphEntityInspectionTable>
</Dialog.Content>
</Dialog>
</div>
Expand Down
11 changes: 7 additions & 4 deletions src/chart/graph/component/GraphEntityInspectionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
*/
export const GraphEntityInspectionTable = ({
entity,
theme,
setSelectedParameters = (_value) => {
console.log('undefined function in GraphEntityInspectionTable');

Check warning on line 24 in src/chart/graph/component/GraphEntityInspectionTable.tsx

View workflow job for this annotation

GitHub Actions / build-test (18.x)

Unexpected console statement
},
checklistEnabled = false,
}) => {
Expand Down Expand Up @@ -51,14 +52,16 @@
}
}

const tableTextColor = theme === 'dark' ? 'var(--palette-dark-neutral-border-strong)' : 'rgba(0, 0, 0, 0.6)';

return (
<TableContainer>
<Table size='small'>
{hasPropertyToShow ? (
<TableHead>
<TableRow>
<TableCell align='left'>Property</TableCell>
<TableCell align='left'>Value</TableCell>
<TableCell align='left' style={{color:tableTextColor}}>Property</TableCell>
<TableCell align='left' style={{color:tableTextColor}}>Value</TableCell>
{checklistEnabled ? <TableCell align='center'>Select Property</TableCell> : <></>}
</TableRow>
</TableHead>
Expand All @@ -77,10 +80,10 @@
.sort()
.map((key) => (
<TableRow key={key}>
<TableCell component='th' scope='row'>
<TableCell component='th' scope='row' style={{color:tableTextColor}}>
{key}
</TableCell>
<TableCell align={'left'}>
<TableCell align={'left'} style={{color:tableTextColor}}>
<ShowMoreText lines={2}>{formatProperty(entity && entity.properties[key].toString())}</ShowMoreText>
</TableCell>
{checklistEnabled ? (
Expand Down
Loading