Skip to content

Commit

Permalink
Added release notes for 2.4 + bonus feature (keyboard shortcut to run…
Browse files Browse the repository at this point in the history
… query from the editor) (#694)

* Release notes for 2.4

* Updated release notes. Added quick feature to run reports with keyboard shortcuts

* Finalized release notes

* Hotfix for not clearing disabled parameters in forms

* Finalized release notes

* Removed old gantt chart dependency

* Bump docs version to 2.4

* Fixed issue with CodeMirror editor not capturing keys in Cypress test

* Hotfix for automigrated tree layouts
  • Loading branch information
nielsdejong authored Nov 16, 2023
1 parent 85ff8fd commit 9732c09
Show file tree
Hide file tree
Showing 14 changed files with 115 additions and 32 deletions.
33 changes: 33 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
## NeoDash 2.4.0
NeoDash 2.4 is out! 🎂 This release packs a ton of new features, as well as improvements to the existing visualizations.

Key new features:
- A new sidebar with support for managing, save and load multiple dashboards directly from the UI.
[#657](https://github.com/neo4j-labs/neodash/pull/657)
- Added **Forms** as a new extension. Forms let you combine multiple parameter selectors in one card and have users edit/submit data to Neo4j. [#568](https://github.com/neo4j-labs/neodash/pull/568)
- Added a new advanced visualization type: Gantt charts. [#684](https://github.com/neo4j-labs/neodash/pull/684)
- Doubled the grid resolution for dashboards, giving you more freedom to arrange visualizations. [#682](https://github.com/neo4j-labs/neodash/pull/682)
- Several improvements for the natural language queries extension - including customizable prompting, and faster schema retrieval. [#600](https://github.com/neo4j-labs/neodash/pull/600)

Other improvements:
- Support for multiselect checkboxes as a report action for tables. [#688](https://github.com/neo4j-labs/neodash/pull/688/commits)
- Added keyboard shortcuts (CMD/CTRL+Enter) for running Cypher queries from the editor. [#694](https://github.com/neo4j-labs/neodash/pull/694/)
- Added new experimental graph layouts (trees in various directions), with customizable level distance. [#690](https://github.com/neo4j-labs/neodash/pull/690)
- Increased customizability for the Pie chart's styling. [#638](https://github.com/neo4j-labs/neodash/pull/638/)
- Fixed issues with parameter selector: Better handling of integer / long parameters and processing external updates. [#641](https://github.com/neo4j-labs/neodash/pull/641/)
- Improvements on text readability for the experimental dark mode. [#668](https://github.com/neo4j-labs/neodash/pull/668/)
- UX improvements on database connection interface. [#675](https://github.com/neo4j-labs/neodash/pull/675/)
- Added option to provide a custom message when no data is returned by a report. [#683](https://github.com/neo4j-labs/neodash/pull/683/)
- Fixed issue where column names were not hidden correctly. [#685](https://github.com/neo4j-labs/neodash/pull/685/commits)

Thanks to all the contributors for this release:
[alfredorubin96](https://github.com/alfredorubin96),
[AleSim94](https://github.com/AleSim94),
[BennuFire](https://github.com/BennuFire),
[jacobbleakley-neo4j](https://github.com/jacobbleakley-neo4j),
[hugorplobo](https://github.com/hugorplobo),
[brahmprakashMishra](https://github.com/brahmprakashMishra),
[m-o-n-i-s-h](https://github.com/m-o-n-i-s-h),
[JonanOribe](https://github.com/JonanOribe),
[nielsdejong](https://github.com/nielsdejong)

## NeoDash 2.3.5
This is a bugfix / stability release directly following 2.3.4.

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ An external workflow picks up this directory, embeds it into the Neo4j docs, and
```
https://neo4j.com/labs/neodash/{version}
```
For example: https://neo4j.com/labs/neodash/2.3
For example: https://neo4j.com/labs/neodash/2.4

## Local Build
To compile and view the documentation locally, navigate to this (`./docs`) folder and run:
Expand Down
4 changes: 2 additions & 2 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: neodash
version: 2.3
version: 2.4
title: NeoDash
start_page: ROOT:index.adoc
nav:
- modules/ROOT/nav.adoc

asciidoc:
attributes:
docs-version: 2.3
docs-version: 2.4
page-product: NeoDash
page-type: NeoDash Manual
page-canonical-root: /labs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Depending on the webserver type and version, this could be different directory.
As an example - to copy the files to an nginx webserver using `scp`:

```bash
scp neodash-2.3.5 username@host:/usr/share/nginx/html
scp neodash-2.4.0 username@host:/usr/share/nginx/html
```

NeoDash should now be visible by visiting your (sub)domain in the browser.
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/developer-guide/state-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ structure:
{
"dashboard": {
"title": "My Dashboard Name",
"version": "2.3",
"version": "2.4",
"settings": {
"pagenumber": 0,
"editable": true,
Expand Down Expand Up @@ -56,7 +56,7 @@ dashboard. Take the following simple dashboard as an example.
{
"dashboard": {
"title": "A Simple Dashboard",
"version": "2.3",
"version": "2.4",
"settings": {
"pagenumber": 0,
"editable": true,
Expand Down
2 changes: 1 addition & 1 deletion docs/server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const express = require('express')

const app = express()
const version = "2.3"
const version = "2.4"
app.use(express.static('./build/site'))
app.get('/', (req, res) => res.redirect('neodash/' + version))
app.listen(8000, () => console.log('📘 http://localhost:8000'))
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"d3-scale-chromatic": "^3.0.0",
"dayjs": "^1.11.7",
"dom-to-image": "^2.6.0",
"gantt-task-react": "^0.3.9",
"leaflet": "^1.7.1",
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
Expand Down
43 changes: 31 additions & 12 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
## NeoDash 2.3.5
This is a bugfix / stability release directly following 2.3.4.
## NeoDash 2.4.0
NeoDash 2.4 is out! 🎂 This release packs a ton of new features, as well as improvements to the existing visualizations.

Improvements:
- Fixed issue where orphan relationships prevented graph charts from working ([@BennuFire](https://github.com/BennuFire), [#586](https://github.com/neo4j-labs/neodash/pull/586))
- Fix issue where only one style rule was used a time on tables. ([@BennuFire](https://github.com/BennuFire), [#632](https://github.com/neo4j-labs/neodash/pull/632))
- Added information about source and target on Graph Chart information modal . ([@BennuFire](https://github.com/BennuFire), [#627](https://github.com/neo4j-labs/neodash/pull/627)) Based on [@brahmprakashMishra](https://github.com/brahmprakashMishra) PR
- Fixed issue where bar charts where displaying black bars instead of scheme colors. ([@BennuFire](https://github.com/BennuFire), [#626](https://github.com/neo4j-labs/neodash/pull/626))
- Added right subpath replacement on shared links redirection while in self deployments. ([@m-o-n-i-s-h](https://github.com/m-o-n-i-s-h), [#618](https://github.com/neo4j-labs/neodash/pull/618))
- Dark theme tweaks. ([@BennuFire](https://github.com/BennuFire), [#585](https://github.com/neo4j-labs/neodash/pull/585))
- Fixed parameter selector search where numbers were not found and sporadically displayed with decimal points. ([@BennuFire](https://github.com/BennuFire), [#633](https://github.com/neo4j-labs/neodash/pull/633))
- Added a configuration in order to list sso providers to be used whenever a database has more than one configured. ([@BennuFire](https://github.com/BennuFire), [#624](https://github.com/neo4j-labs/neodash/pull/624))
- Added 'Ignore undefined parameters' advanced setting support for optional parameters on a query. Now queries will assume a null value instead of returning the error 'Parameter not defined'. ([@BennuFire](https://github.com/BennuFire), [#625](https://github.com/neo4j-labs/neodash/pull/625))
Key new features:
- A new sidebar with support for managing, save and load multiple dashboards directly from the UI.
[#657](https://github.com/neo4j-labs/neodash/pull/657)
- Added **Forms** as a new extension. Forms let you combine multiple parameter selectors in one card and have users edit/submit data to Neo4j. [#568](https://github.com/neo4j-labs/neodash/pull/568)
- Added a new advanced visualization type: Gantt charts. [#684](https://github.com/neo4j-labs/neodash/pull/684)
- Doubled the grid resolution for dashboards, giving you more freedom to arrange visualizations. [#682](https://github.com/neo4j-labs/neodash/pull/682)
- Several improvements for the natural language queries extension - including customizable prompting, and faster schema retrieval. [#600](https://github.com/neo4j-labs/neodash/pull/600)

Other improvements:
- Support for multiselect checkboxes as a report action for tables. [#688](https://github.com/neo4j-labs/neodash/pull/688/commits)
- Added keyboard shortcuts (CMD/CTRL+Enter) for running Cypher queries from the editor. [#694](https://github.com/neo4j-labs/neodash/pull/694/)
- Added new experimental graph layouts (trees in various directions), with customizable level distance. [#690](https://github.com/neo4j-labs/neodash/pull/690)
- Increased customizability for the Pie chart's styling. [#638](https://github.com/neo4j-labs/neodash/pull/638/)
- Fixed issues with parameter selector: Better handling of integer / long parameters and processing external updates. [#641](https://github.com/neo4j-labs/neodash/pull/641/)
- Improvements on text readability for the experimental dark mode. [#668](https://github.com/neo4j-labs/neodash/pull/668/)
- UX improvements on database connection interface. [#675](https://github.com/neo4j-labs/neodash/pull/675/)
- Added option to provide a custom message when no data is returned by a report. [#683](https://github.com/neo4j-labs/neodash/pull/683/)
- Fixed issue where column names were not hidden correctly. [#685](https://github.com/neo4j-labs/neodash/pull/685/commits)

Thanks to all the contributors for this release:
[alfredorubin96](https://github.com/alfredorubin96),
[AleSim94](https://github.com/AleSim94),
[BennuFire](https://github.com/BennuFire),
[jacobbleakley-neo4j](https://github.com/jacobbleakley-neo4j),
[hugorplobo](https://github.com/hugorplobo),
[brahmprakashMishra](https://github.com/brahmprakashMishra),
[m-o-n-i-s-h](https://github.com/m-o-n-i-s-h),
[JonanOribe](https://github.com/JonanOribe),
[nielsdejong](https://github.com/nielsdejong)
1 change: 1 addition & 0 deletions src/card/settings/CardSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const NeoCardSettings = ({
onQueryUpdate={onQueryUpdate}
onReportSettingUpdate={onReportSettingUpdate}
onTypeUpdate={onTypeUpdate}
forceRunQuery={onToggleCardSettings}
></NeoCardSettingsContent>
) : (
<CardContent className='n-py-2' />
Expand Down
18 changes: 15 additions & 3 deletions src/card/settings/CardSettingsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ const NeoCardSettingsContent = ({
onQueryUpdate,
onReportSettingUpdate,
onTypeUpdate,
forceRunQuery, // Callback to force close the card settings.
onDatabaseChanged, // When the database related to a report is changed it must be stored in the report state
}) => {
// Ensure that we only trigger a text update event after the user has stopped typing.
const [queryText, setQueryText] = React.useState(query);
const debouncedQueryUpdate = useCallback(debounce(onQueryUpdate, 250), []);

const debouncedQueryUpdate = useCallback(debounce(onQueryUpdate, 200), []);
// State to manage the current database entry inside the form
const [databaseText, setDatabaseText] = React.useState(database);
const debouncedDatabaseUpdate = useCallback(debounce(onDatabaseChanged, 250), []);
const debouncedDatabaseUpdate = useCallback(debounce(onDatabaseChanged, 200), []);

useEffect(() => {
// Reset text to the dashboard state when the page gets reorganized.
Expand Down Expand Up @@ -67,6 +67,10 @@ const NeoCardSettingsContent = ({
reportId={reportId}
reportType={type}
extensions={extensions}
onExecute={() => {
onQueryUpdate(queryText);
forceRunQuery();
}}
cypherQuery={queryText}
updateCypherQuery={updateCypherQuery}
/>
Expand All @@ -85,6 +89,10 @@ const NeoCardSettingsContent = ({
value={queryText}
editable={true}
language={report?.inputMode || 'cypher'}
onExecute={() => {
onQueryUpdate(queryText);
forceRunQuery();
}}
onChange={(value) => {
updateCypherQuery(value);
}}
Expand Down Expand Up @@ -152,6 +160,10 @@ const NeoCardSettingsContent = ({
database={database}
query={query}
onQueryUpdate={onQueryUpdate}
onExecute={() => {
onQueryUpdate(queryText);
forceRunQuery();
}}
/>
) : (
<div>{hasExtensionComponents() ? renderExtensionsComponents() : defaultQueryBoxComponent}</div>
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 @@ -8,6 +8,7 @@ export const layouts = {
'tree-left-right': 'lr',
'tree-right-left': 'rl',
radial: 'radialout',
tree: 'td',
};

type Layout = 'td' | 'bu' | 'lr' | 'rl' | 'radialout' | 'radialin';
Expand Down
21 changes: 21 additions & 0 deletions src/component/editor/CodeEditorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,35 @@ const NeoCodeEditorComponent = ({
placeholder,
editable = true,
language = 'cypher',
onExecute = () => {},
style = { border: '1px solid lightgray' },
}) => {
const [keys, setKeys] = React.useState({});

const editorProps: CypherEditorProps = {
cypherLanguage: language === 'cypher',
readOnly: !editable,
placeholder: placeholder,
preExtensions: language === 'markdown' ? markdownExtensions : [],
value: value,

// This is a check to discover whether a user wants to run the report with a shortcut (CTRL/CMD + Enter)
onKeyDown: (e) => {
const newKeys = keys;
newKeys[e.key] = true;
setKeys(newKeys);
if ((newKeys.Control && newKeys.Enter) || (newKeys.Meta && newKeys.Enter)) {
onExecute();
setKeys({});
}
return undefined;
},
onKeyUp: (e) => {
const newKeys = keys;
delete newKeys[e.key];
setKeys(newKeys);
return undefined;
},
onValueChanged: (val) => {
if (editable && onChange) {
onChange(val);
Expand Down
10 changes: 6 additions & 4 deletions src/extensions/forms/chart/NeoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ const NeoForm = (props: ChartProps) => {
if (formFields) {
const entries = formFields.map((f) => f.settings);
entries.forEach((entry) => {
if (entry.multiSelector) {
props.setGlobalParameter && props.setGlobalParameter(entry.parameterName, []);
} else {
props.setGlobalParameter && props.setGlobalParameter(entry.parameterName, '');
if (entry.disabled !== true) {
if (entry.multiSelector) {
props.setGlobalParameter && props.setGlobalParameter(entry.parameterName, []);
} else {
props.setGlobalParameter && props.setGlobalParameter(entry.parameterName, '');
}
}
});
}
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8062,11 +8062,6 @@ fuse.js@^6.6.2:
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-6.6.2.tgz#fe463fed4b98c0226ac3da2856a415576dc9a111"
integrity sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==

gantt-task-react@^0.3.9:
version "0.3.9"
resolved "https://registry.yarnpkg.com/gantt-task-react/-/gantt-task-react-0.3.9.tgz#f538c1a92f617af929b93cb5cd28237bf5f60ce1"
integrity sha512-ged2OGrAJJ+ATrfVVkd4/8cUu4jOu1mXi0NaBeKx4uoGP6YhyryL+Snr2OY48AXdFelUAg7BbqylSej9X6PCCQ==

gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
Expand Down

0 comments on commit 9732c09

Please sign in to comment.