Skip to content

Commit 393aaad

Browse files
Release 2.3.4 (#580)
* Improved contrast for light and dark theme interfaces * Improve styling for actions model. Improved robustness of card settings content * First draft * Fix editing * Clean console * Clean drawer * Fixed issue where users cannot return to edit mode after turning off editing. Make extensions a seperate FAB. Improved styling for rule-based styling creation modal * circular dependencies * circular dependencies 2 * circular dependencies 3 * circular dependencies 4 * circular dependencies 5 * Last clean * Deleting Sidebar and Workflow * Final touch * Icons migration 1 * Icons material free * Reducing duplication * Smells * uuid migration * Added user agent to driver object * Bumped version * Added better version format * Moving circular to dev dep * Smells * Adding release notes * Updated Github runners * Fixed IT test for advanced settings * remove luma + markers pin * Selector options * Fixed double scroll bar * Tooltips nivo contrast * Runs on non drafts * Color picker selection * Version bump and release notes * Fix on Nivo Canvas * Fixing unused import * Fix version 2.3.4 (#581) * Hotfix for outdated version config on some components --------- Co-authored-by: Niels de Jong <[email protected]>
1 parent 693bfb2 commit 393aaad

19 files changed

+109
-49
lines changed

.github/workflows/develop-deployment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
build-test:
9+
if: github.event.pull_request.draft == false
910
runs-on: neodash-runners
1011
strategy:
1112
matrix:

.github/workflows/develop-test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
build-test:
9+
if: github.event.pull_request.draft == false
910
runs-on: neodash-runners
1011
strategy:
1112
matrix:

.github/workflows/master-deployment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
context: .
8080
file: ./Dockerfile
8181
push: true
82-
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.3.3
82+
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.3.4
8383
build-docker-legacy:
8484
needs: build-test
8585
runs-on: neodash-runners
@@ -103,7 +103,7 @@ jobs:
103103
context: .
104104
file: ./Dockerfile
105105
push: true
106-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.3.3
106+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.3.4
107107
deploy-gallery:
108108
runs-on: neodash-runners
109109
strategy:

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ USER nginx
4343
EXPOSE $NGINX_PORT
4444

4545
HEALTHCHECK cmd curl --fail "http://localhost:$NGINX_PORT" || exit 1
46-
LABEL version="2.3.3"
46+
LABEL version="2.3.4"

changelog.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## NeoDash 2.3.3
1+
## NeoDash 2.3.3 & 2.3.4
22
This is a bugfix / stability release directly following 2.3.2.
33

44
Improvements:
@@ -7,6 +7,7 @@ Improvements:
77
- Improved contrast for light and dark theme. ([@nielsdejong](https://github.com/nielsdejong), [#545](https://github.com/neo4j-labs/neodash/pull/566))
88
- Fixed issue where dashboards were locked in read-only mode, after toggling in the dashboard settings. ([@nielsdejong](https://github.com/nielsdejong), [#545](https://github.com/neo4j-labs/neodash/pull/566))
99
- Fixed issue where editing the name of a non-selected page changed the wrong page data. ([@BennuFire](https://github.com/BennuFire), [#545](https://github.com/neo4j-labs/neodash/pull/571))
10+
- Fixed issue where color picker was only working on popup selections. ([@BennuFire](https://github.com/BennuFire), [#579](https://github.com/neo4j-labs/neodash/pull/579))
1011
- Add user agent to driver session for better logging of NeoDash queries. ([@nielsdejong](https://github.com/nielsdejong), [#545](https://github.com/neo4j-labs/neodash/pull/574))
1112

1213

docs/modules/ROOT/pages/developer-guide/deploy-a-build.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Depending on the webserver type and version, this could be different directory.
3737
As an example - to copy the files to an nginx webserver using `scp`:
3838

3939
```bash
40-
scp neodash-2.3.3 username@host:/usr/share/nginx/html
40+
scp neodash-2.3.4 username@host:/usr/share/nginx/html
4141
```
4242

4343
NeoDash should now be visible by visiting your (sub)domain in the browser.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.3.3",
3+
"version": "2.3.4",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"

release-notes.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## NeoDash 2.3.3
1+
## NeoDash 2.3.3 & 2.3.4
22
This is a bugfix / stability release directly following 2.3.2.
33

44
Improvements:
@@ -7,4 +7,5 @@ Improvements:
77
- Improved contrast for light and dark theme. ([@nielsdejong](https://github.com/nielsdejong), [#545](https://github.com/neo4j-labs/neodash/pull/566))
88
- Fixed issue where dashboards were locked in read-only mode, after toggling in the dashboard settings. ([@nielsdejong](https://github.com/nielsdejong), [#545](https://github.com/neo4j-labs/neodash/pull/566))
99
- Fixed issue where editing the name of a non-selected page changed the wrong page data. ([@BennuFire](https://github.com/BennuFire), [#545](https://github.com/neo4j-labs/neodash/pull/571))
10+
- Fixed issue where color picker was only working on popup selections. ([@BennuFire](https://github.com/BennuFire), [#579](https://github.com/neo4j-labs/neodash/pull/579))
1011
- Add user agent to driver session for better logging of NeoDash queries. ([@nielsdejong](https://github.com/nielsdejong), [#545](https://github.com/neo4j-labs/neodash/pull/574))

src/card/view/CardView.tsx

+16-27
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ import NeoCardViewHeader from './CardViewHeader';
44
import NeoCardViewFooter from './CardViewFooter';
55
import { CardContent } from '@mui/material';
66
import NeoCodeEditorComponent from '../../component/editor/CodeEditorComponent';
7-
87
import { CARD_FOOTER_HEIGHT, CARD_HEADER_HEIGHT } from '../../config/CardConfig';
98
import { getReportTypes } from '../../extensions/ExtensionUtils';
109
import NeoCodeViewerComponent from '../../component/editor/CodeViewerComponent';
1110
import { NeoReportWrapper } from '../../report/ReportWrapper';
1211
import { identifyStyleRuleParameters } from '../../extensions/styling/StyleRuleEvaluator';
13-
import { ThemeProvider } from '@mui/material/styles';
14-
import { lightTheme, darkHeaderTheme, luma } from '../../component/theme/Themes';
1512
import { IconButton } from '@neo4j-ndl/react';
1613
import { PlayCircleIconSolid } from '@neo4j-ndl/react/icons';
1714
import { extensionEnabled } from '../../utils/ReportUtils';
@@ -79,30 +76,22 @@ const NeoCardView = ({
7976

8077
// @ts-ignore
8178
const reportHeader = (
82-
<ThemeProvider
83-
theme={
84-
settings.backgroundColor && luma(settings.backgroundColor) < (dashboardSettings.darkLuma || 40)
85-
? darkHeaderTheme
86-
: lightTheme
87-
}
88-
>
89-
<NeoCardViewHeader
90-
title={title}
91-
editable={editable}
92-
description={settings.description}
93-
fullscreenEnabled={settings.fullscreenEnabled}
94-
downloadImageEnabled={settings.downloadImageEnabled}
95-
refreshButtonEnabled={settings.refreshButtonEnabled}
96-
onTitleUpdate={onTitleUpdate}
97-
onToggleCardSettings={onToggleCardSettings}
98-
onManualRefreshCard={() => setLastRunTimestamp(Date.now())}
99-
settings={settings}
100-
onDownloadImage={onDownloadImage}
101-
onToggleCardExpand={onToggleCardExpand}
102-
expanded={expanded}
103-
parameters={getLocalParameters(title)}
104-
></NeoCardViewHeader>
105-
</ThemeProvider>
79+
<NeoCardViewHeader
80+
title={title}
81+
editable={editable}
82+
description={settings.description}
83+
fullscreenEnabled={settings.fullscreenEnabled}
84+
downloadImageEnabled={settings.downloadImageEnabled}
85+
refreshButtonEnabled={settings.refreshButtonEnabled}
86+
onTitleUpdate={onTitleUpdate}
87+
onToggleCardSettings={onToggleCardSettings}
88+
onManualRefreshCard={() => setLastRunTimestamp(Date.now())}
89+
settings={settings}
90+
onDownloadImage={onDownloadImage}
91+
onToggleCardExpand={onToggleCardExpand}
92+
expanded={expanded}
93+
parameters={getLocalParameters(title)}
94+
></NeoCardViewHeader>
10695
);
10796

10897
// @ts-ignore

src/chart/Chart.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface ChartProps {
1919
updateReportSetting?: (name, value) => void; // Callback to update a setting for this report.
2020
fields: (fields) => string[]; // List of fields (return values) available for the report.
2121
setFields?: (fields) => void; // Update the list of fields for this report.
22+
theme?: string; // Dashboard theme value.
2223
}
2324

2425
/**

src/chart/Utils.ts

+46-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { tokens } from '@neo4j-ndl/base';
12
import { QueryResult, Record as Neo4jRecord } from 'neo4j-driver';
2-
33
export function recordToNative(input: any): any {
44
if (!input && input !== false) {
55
return null;
@@ -118,11 +118,11 @@ export enum EntityType {
118118
}
119119

120120
export const themeNivo = {
121-
textColor: 'rgb(var(--palette-neutral-text-weak))',
122-
text: { fill: 'rgb(var(--palette-neutral-text-weak))' },
121+
textColor: 'rgb(var(--palette-neutral-text-default))',
122+
text: { fill: 'rgb(var(--palette-neutral-text-default))' },
123123
axis: {
124-
ticks: { text: { fill: 'rgb(var(--palette-neutral-text-weak))' } },
125-
legend: { text: { fill: 'rgb(var(--palette-neutral-text-weak))' } },
124+
ticks: { text: { fill: 'rgb(var(--palette-light-neutral-text-default))' } },
125+
legend: { text: { fill: 'rgb(var(--palette-neutral-text-default))' } },
126126
},
127127
legends: {
128128
text: { fill: 'rgb(var(--palette-neutral-text-weak))' },
@@ -139,4 +139,45 @@ export const themeNivo = {
139139
annotations: {
140140
text: { fill: 'rgb(var(--palette-neutral-text-default))' },
141141
},
142+
tooltip: {
143+
container: {
144+
fill: 'rgb(var(--palette-neutral-text-default))',
145+
background: 'rgb(var(--palette-neutral-bg-strong))',
146+
},
147+
},
148+
};
149+
150+
export const themeNivoCanvas = (theme) => {
151+
let baseDefault =
152+
theme === 'light' ? tokens.palette.light.neutral.text.default : tokens.palette.dark.neutral.text.default;
153+
let baseWeak = theme === 'light' ? tokens.palette.light.neutral.text.weak : tokens.palette.dark.neutral.text.weak;
154+
return {
155+
// textColor: 'rgb(var(--palette-neutral-text-default))',
156+
text: { fill: baseDefault },
157+
axis: {
158+
ticks: { text: { fill: baseDefault } },
159+
legend: { text: { fill: baseDefault } },
160+
},
161+
legends: {
162+
text: { fill: baseWeak },
163+
title: { text: { fill: baseWeak } },
164+
ticks: { text: { fill: baseWeak } },
165+
hidden: { text: { fill: baseWeak } },
166+
},
167+
markers: {
168+
text: { fill: baseDefault },
169+
},
170+
labels: {
171+
text: { fill: baseDefault },
172+
},
173+
annotations: {
174+
text: { fill: baseDefault },
175+
},
176+
tooltip: {
177+
container: {
178+
fill: 'rgb(var(--palette-neutral-text-default))',
179+
background: 'rgb(var(--palette-neutral-bg-strong))',
180+
},
181+
},
182+
};
142183
};

src/chart/bar/BarChart.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getD3ColorsByScheme } from '../../config/ColorConfig';
55
import { evaluateRulesOnDict, useStyleRules } from '../../extensions/styling/StyleRuleEvaluator';
66
import { ChartProps } from '../Chart';
77
import { convertRecordObjectToString, recordToNative } from '../ChartUtils';
8-
import { themeNivo } from '../Utils';
8+
import { themeNivo, themeNivoCanvas } from '../Utils';
99
import { extensionEnabled } from '../../utils/ReportUtils';
1010

1111
/**
@@ -208,10 +208,11 @@ const NeoBarChart = (props: ChartProps) => {
208208
};
209209

210210
const extraProperties = positionLabel == 'off' ? {} : { barComponent: BarComponent };
211-
const BarChartComponent = data.length > 30 ? ResponsiveBarCanvas : ResponsiveBar;
211+
const canvas = data.length > 30;
212+
const BarChartComponent = canvas ? ResponsiveBarCanvas : ResponsiveBar;
212213
const chart = (
213214
<BarChartComponent
214-
theme={themeNivo}
215+
theme={canvas ? themeNivoCanvas(props.theme) : themeNivo}
215216
data={data}
216217
key={`${selection.index}___${selection.value}`}
217218
layout={layout}

src/chart/map/layers/MarkerLayer.tsx

+13-3
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,24 @@ export function createMarkers(data, props) {
2323
: [];
2424

2525
let markerMarginTop;
26+
let markerIconClass;
27+
let markerMarginLeft;
2628
// Render a node label tooltip
2729
switch (defaultNodeSize) {
2830
case 'large':
2931
markerMarginTop = '-20px';
32+
markerMarginLeft = '0px';
33+
markerIconClass = '';
3034
break;
3135
case 'medium':
32-
markerMarginTop = '3px';
36+
markerMarginTop = '-5px';
37+
markerMarginLeft = '2px';
38+
markerIconClass = 'btn-icon-lg-r';
3339
break;
3440
default:
3541
markerMarginTop = '6px';
42+
markerMarginLeft = '10px';
43+
markerIconClass = 'btn-icon-base-r';
3644
break;
3745
}
3846

@@ -127,8 +135,10 @@ export function createMarkers(data, props) {
127135
position={node.pos}
128136
key={i}
129137
icon={
130-
<div style={{ color: node.color, textAlign: 'center', marginTop: markerMarginTop }}>
131-
<MapPinIconSolid fontSize={node.size} />
138+
<div
139+
style={{ color: node.color, textAlign: 'center', marginTop: markerMarginTop, marginLeft: markerMarginLeft }}
140+
>
141+
<MapPinIconSolid className={markerIconClass} />
132142
</div>
133143
}
134144
>

src/chart/parameter/ParameterSelectionChart.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export const NeoParameterSelectionChart = (props: ChartProps) => {
4646
text: {
4747
primary: 'rgb(var(--palette-neutral-text))',
4848
},
49+
background: {
50+
paper: 'rgb(var(--palette-neutral-bg-weak))',
51+
},
4952
},
5053
});
5154

src/component/field/ColorPicker.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ const NeoColorPicker = ({ value, onChange, defaultValue, label, style }) => {
1111
key={label}
1212
defaultValue={defaultValue}
1313
value={value}
14-
onChange={(e) => onChange(e?.css?.backgroundColor ?? null)}
14+
onChange={(e) => {
15+
if (e?.css?.backgroundColor) {
16+
onChange(e?.css?.backgroundColor);
17+
}
18+
if (typeof e === 'string' || e instanceof String) {
19+
onChange(e);
20+
}
21+
}}
1522
/>
1623
</div>
1724
<div className='ndl-form-item-wrapper'>

src/dashboard/Dashboard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Dashboard = ({
5555
{/* Main Page */}
5656
<div className='n-w-full n-h-full n-overflow-y-scroll n-flex n-flex-row'>
5757
{/* Main Content */}
58-
<main className='n-flex-1 n-relative n-z-0 n-overflow-y-auto n-scroll-smooth n-w-full'>
58+
<main className='n-flex-1 n-relative n-z-0 n-scroll-smooth n-w-full'>
5959
<div className='n-absolute n-inset-0 page-spacing'>
6060
<div className='page-spacing-overflow'>
6161
{/* The main content of the page */}

src/dashboard/placeholder/DashboardPlaceholder.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const NeoDashboardPlaceholder = () => {
2020
</div>
2121
</div>
2222
<div className='n-w-full n-h-full n-overflow-y-scroll n-flex n-flex-row'>
23-
<div className='n-flex-1 n-relative n-z-0 n-overflow-y-auto n-scroll-smooth n-w-full'>
23+
<div className='n-flex-1 n-relative n-z-0 n-scroll-smooth n-w-full'>
2424
<div className='n-absolute n-inset-0 page-spacing'>
2525
<div className='page-spacing-overflow'>
2626
<div className='n-absolute n-w-full n-h-full'>

src/modal/AboutModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Button, Dialog, TextLink } from '@neo4j-ndl/react';
33
import { BookOpenIconOutline, BeakerIconOutline } from '@neo4j-ndl/react/icons';
44
import { Section, SectionTitle, SectionContent } from './ModalUtils';
55

6-
export const version = '2.3.3';
6+
export const version = '2.3.4';
77

88
export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
99
const downloadDebugFile = () => {

src/report/Report.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { getPageNumber } from '../settings/SettingsSelectors';
1919
import { getPrepopulateReportExtension } from '../extensions/state/ExtensionSelectors';
2020
import { deleteSessionStoragePrepopulationReportFunction } from '../extensions/state/ExtensionActions';
2121
import { updateFieldsThunk } from '../card/CardThunks';
22+
import { getDashboardTheme } from '../dashboard/DashboardSelectors';
2223

2324
const DEFAULT_LOADING_ICON = <LoadingSpinner size='large' className='centered' style={{ marginTop: '-30px' }} />;
2425

@@ -54,6 +55,7 @@ export const NeoReport = ({
5455
ChartType = NeoTableChart, // The report component to render with the query results.
5556
prepopulateExtensionName,
5657
deletePrepopulationReportFunction,
58+
theme,
5759
}) => {
5860
const [records, setRecords] = useState(null);
5961
const [timer, setTimer] = useState(null);
@@ -276,6 +278,7 @@ export const NeoReport = ({
276278
updateReportSetting={updateReportSetting}
277279
fields={fields}
278280
setFields={setFields}
281+
theme={theme}
279282
/>
280283
</div>
281284
);
@@ -341,6 +344,7 @@ export const NeoReport = ({
341344
const mapStateToProps = (state, ownProps) => ({
342345
pagenumber: getPageNumber(state),
343346
prepopulateExtensionName: getPrepopulateReportExtension(state, ownProps.id),
347+
theme: getDashboardTheme(state),
344348
});
345349

346350
const mapDispatchToProps = (dispatch) => ({

0 commit comments

Comments
 (0)