diff --git a/src/renderer/containers/ExportScreen.js b/src/renderer/containers/ExportScreen.js index e77d947d8..174d8a910 100644 --- a/src/renderer/containers/ExportScreen.js +++ b/src/renderer/containers/ExportScreen.js @@ -26,7 +26,7 @@ class ExportScreen extends Component { constructor(props) { super(props); this.state = { - exportFormat: 'graphml', + exportFormat: 'csv', exportNetworkUnion: false, csvTypes: new Set([...Object.keys(availableCsvTypes), 'ego']), useDirectedEdges: true, @@ -182,48 +182,52 @@ class ExportScreen extends Component { }} /> +
+ + +
* Ego data not supported for this export format. See documentation.
+
+
-
- -
-
-

Include the following files:

- { - Object.entries(availableCsvTypes).map(([csvType, label]) => ( -
- -
- )) - } - -
+
+
+

Include the following files:

+ { + Object.entries(availableCsvTypes).map(([csvType, label]) => ( +
- -
+ )) + } + +
+ +
+
diff --git a/src/renderer/containers/__tests__/ExportScreen-test.js b/src/renderer/containers/__tests__/ExportScreen-test.js index fcdf7370e..8d53cea84 100644 --- a/src/renderer/containers/__tests__/ExportScreen-test.js +++ b/src/renderer/containers/__tests__/ExportScreen-test.js @@ -70,12 +70,26 @@ describe('', () => { expect(subject.state('exportFormat')).toEqual('csv'); }); + it('does not warn about ego data for csv export', () => { + const radioWrapper = subject.findWhere(n => n.name() === 'Radio' && n.prop('label') === 'CSV'); + radioWrapper.dive().find('input').simulate('change', { target: { value: 'csv' } }); + const toggleWrapper = subject.find('Toggle').at(0); + expect(toggleWrapper.dive().find('.form-field-toggle').at(0).hasClass('form-field-toggle--disabled')).toBe(false); + }); + it('selects graphml format', () => { const radioWrapper = subject.findWhere(n => n.name() === 'Radio' && n.prop('label') === 'GraphML'); radioWrapper.dive().find('input').simulate('change', { target: { value: 'graphml' } }); expect(subject.state('exportFormat')).toEqual('graphml'); }); + it('warns about ego data not downloading', () => { + const radioWrapper = subject.findWhere(n => n.name() === 'Radio' && n.prop('label') === 'GraphML'); + radioWrapper.dive().find('input').simulate('change', { target: { value: 'graphml' } }); + const toggleWrapper = subject.find('Toggle').at(0); + expect(toggleWrapper.dive().find('.form-field-toggle').at(0).hasClass('form-field-toggle--disabled')).toBe(true); + }); + it('selects a csv type', () => { const csvType = 'adjacencyMatrix'; const checkbox = subject.find('Checkbox').first().dive().find('input'); diff --git a/src/renderer/styles/containers/_export.scss b/src/renderer/styles/containers/_export.scss index 04302cb6a..139eb1595 100644 --- a/src/renderer/styles/containers/_export.scss +++ b/src/renderer/styles/containers/_export.scss @@ -37,4 +37,10 @@ justify-content: flex-end; padding: 0 spacing(large); } + + &__ego-info { + float: right; + font-style: italic; + font-size: small; + } } diff --git a/src/renderer/ui b/src/renderer/ui index e94b79173..b9f5d94df 160000 --- a/src/renderer/ui +++ b/src/renderer/ui @@ -1 +1 @@ -Subproject commit e94b791731170ba488cfca8a1e6991096ee187dd +Subproject commit b9f5d94df27708ab51d22cbdede9aeca9045a12b