From b392e8fa984091aa932d0ab603993d75ada0564e Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 21 Sep 2023 13:00:32 +0800 Subject: [PATCH 1/3] Align documentation by allowing Graph export in JSON & CSV format --- src/browser/modules/Stream/CypherFrame/CypherFrame.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx b/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx index 8c3344b07fa..ea331d800dc 100644 --- a/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx +++ b/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx @@ -190,6 +190,8 @@ export class CypherFrame extends Component { { name: 'JSON', download: this.exportJSON } ] const downloadGraphics = [ + { name: 'CSV', download: this.exportCSV }, + { name: 'JSON', download: this.exportJSON }, { name: 'PNG', download: this.exportPNG }, { name: 'SVG', download: this.exportSVG } ] From 531ccfeff9c173326755622cd0a423a0d164ac6d Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 22 Sep 2023 09:48:49 +0800 Subject: [PATCH 2/3] Address @OskarDamkjaer's comment --- .../modules/Stream/CypherFrame/CypherFrame.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx b/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx index ea331d800dc..60dd8bdb196 100644 --- a/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx +++ b/src/browser/modules/Stream/CypherFrame/CypherFrame.tsx @@ -177,9 +177,12 @@ export class CypherFrame extends Component { const textDownloadEnabled = () => this.getRecords().length > 0 && this.state.openView && - [ViewTypes.TEXT, ViewTypes.TABLE, ViewTypes.CODE].includes( - this.state.openView - ) + [ + ViewTypes.TEXT, + ViewTypes.TABLE, + ViewTypes.CODE, + ViewTypes.VISUALIZATION + ].includes(this.state.openView) const graphicsDownloadEnabled = () => this.visElement && this.state.openView && @@ -190,8 +193,6 @@ export class CypherFrame extends Component { { name: 'JSON', download: this.exportJSON } ] const downloadGraphics = [ - { name: 'CSV', download: this.exportCSV }, - { name: 'JSON', download: this.exportJSON }, { name: 'PNG', download: this.exportPNG }, { name: 'SVG', download: this.exportSVG } ] From 17936358b4d56cfd36e43458d1dcc1393e5d38ab Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 22 Sep 2023 16:53:55 +0800 Subject: [PATCH 3/3] Update tests --- e2e_tests/integration/data-export.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_tests/integration/data-export.spec.ts b/e2e_tests/integration/data-export.spec.ts index a14ee7b7ac0..81d8615d64c 100644 --- a/e2e_tests/integration/data-export.spec.ts +++ b/e2e_tests/integration/data-export.spec.ts @@ -42,7 +42,7 @@ describe('Data export', () => { cy.executeCommand('MATCH (n:ExportTest) DETACH DELETE n') }) const tests = [ - { panel: 'Visualization', expected: ['PNG', 'SVG'] }, + { panel: 'Visualization', expected: ['CSV', 'JSON', 'PNG', 'SVG'] }, { panel: 'Plan', expected: [