From 0683580a3aa1d32e703d5a77cba8f5a85dd00e33 Mon Sep 17 00:00:00 2001 From: Stephen-Gates Date: Mon, 4 Dec 2017 18:01:04 +1000 Subject: [PATCH 01/35] refine fetures --- test/features/file/new.feature | 5 ++--- .../file/open-comma-separated-file.feature | 9 +++------ test/features/file/open-excel-sheet.feature | 18 ++++++++---------- .../open-semi-colon-separated-file.feature | 15 +++++++-------- .../file/open-tab-separated-file.feature | 13 +++++++------ 5 files changed, 27 insertions(+), 33 deletions(-) diff --git a/test/features/file/new.feature b/test/features/file/new.feature index 17195134c..927f10635 100644 --- a/test/features/file/new.feature +++ b/test/features/file/new.feature @@ -5,9 +5,9 @@ Feature: New The "New" command can be invoked using a menu item or the add tab button - Rules (desirable but not mandatory for v1 release): + Rules: - Tab names must be unique - - Name a new tab, "untitled-" with a sequential number appended to the end to enable uniqueness + - Name a new tab, "untitled" with a sequential number appended to the end to enable uniqueness Scenario: Add Tab Given I have opened Data Curator @@ -16,4 +16,3 @@ Feature: New And show it the right-most position And set a unique Tab name And place the cursor in row 1, column 1 - And "Freeze Header Row" diff --git a/test/features/file/open-comma-separated-file.feature b/test/features/file/open-comma-separated-file.feature index f827aa81c..c3b18aeb1 100644 --- a/test/features/file/open-comma-separated-file.feature +++ b/test/features/file/open-comma-separated-file.feature @@ -11,11 +11,9 @@ Feature: Open a Comma separated value file The Open Comma Separated command can be invoked using the menu or a keyboard shortcut - (A desirable feature would be, If the active tab is empty, when the file is opened, insert the file contents into the empty table.) - - If the CSV has an inconsistent number of columns, [fix ragged rows] (https://relishapp.com/odi-australia/data-curator/docs/other/fix-ragged-rows) - - When the file is opened, invoke [Guess Column Properties](https://relishapp.com/odi-australia/data-curator/docs/tools/guess-column-properties) + Desirable features include: + - If the active tab is empty, when the file is opened, insert the file contents into the empty table + - "Guess Column Properties" on open Scenario: Open an existing comma separated value file Given I have opened Data Curator @@ -26,5 +24,4 @@ Feature: Open a Comma separated value file And set the Tab name to the 'filename' And set the CSV Dialect in the Table Properties to "Comma Separated" And "Fix Ragged Rows" - And "Guess Column Properties" And "Freeze Header Row" diff --git a/test/features/file/open-excel-sheet.feature b/test/features/file/open-excel-sheet.feature index 5354f9c96..0ff4bdad4 100644 --- a/test/features/file/open-excel-sheet.feature +++ b/test/features/file/open-excel-sheet.feature @@ -3,26 +3,24 @@ Feature: Open an Excel Sheet I want to open an Excel Sheet So that can describe, validate and package the data - Excel sheets may contain non-tabular data in a sheet, e.g. charts + The Open Excel Sheet command can be invoked using the menu command The data may be stored in a ".xlsx" or ".xls" file - If the active tab is empty, when the file is opened, insert the file contents into the empty table. + Excel sheets may contain non-tabular data in a sheet, e.g. charts. Only tabular data will be opened. - If the CSV has an inconsistent number of columns, [fix ragged rows] (https://relishapp.com/odi-australia/data-curator/docs/other/fix-ragged-rows) + Desirable features include: + - If the active tab is empty, when the file is opened, insert the file contents into the empty table + - "Guess Column Properties" on open - When the file is opened, invoke [Guess Column Properties](https://relishapp.com/odi-australia/data-curator/docs/tools/guess-column-properties) - - Scenario: Use the menu to open an Excel Sheet + Scenario: Open an Excel Sheet Given I have opened Data Curator - When I select Open, Excel Sheet from the menu + When I invoke the "Open Excel Sheet" command Then a prompt, requesting the file name and location is shown - But only files ending with a '.xls' or '.xlsx' can be selected + And only files ending with a '.xls' or '.xlsx' can be selected And a prompt, requesting the sheet to open is shown And the selected 'sheet-name' is opened in a new data tab to the right of any other open data tabs And set the Tab name to the 'sheet-name' And assign 'sheet-name' to the 'name' Table Property - And set the CSV Dialect in the Table Properties to "Comma Separated" And "Fix Ragged Rows" - And "Guess Column Properties" And "Freeze Header Row" diff --git a/test/features/file/open-semi-colon-separated-file.feature b/test/features/file/open-semi-colon-separated-file.feature index 7825f37c4..ca11a4e40 100644 --- a/test/features/file/open-semi-colon-separated-file.feature +++ b/test/features/file/open-semi-colon-separated-file.feature @@ -3,24 +3,23 @@ Feature: Open a Semi-colon separated value file I want to open a semi-colon separated value file So that I can describe, validate and package the data + The Open Semi-colon separated value file command can be invoked using the menu command + The data may be stored in a ".csv" file Use the default values in the [CSV Dialect specification](http://frictionlessdata.io/specs/csv-dialect/#specification) but with 'delimiter' = ';' to open the file and separate the values into the correct columns. - (A desirable feature would be, If the active tab is empty, when the file is opened, insert the file contents into the empty table.) - - If the CSV has an inconsistent number of columns, [fix ragged rows] (https://relishapp.com/odi-australia/data-curator/docs/other/fix-ragged-rows) - - When the file is opened, invoke [Guess Column Properties](https://relishapp.com/odi-australia/data-curator/docs/tools/guess-column-properties) + Desirable features include: + - If the active tab is empty, when the file is opened, insert the file contents into the empty table + - "Guess Column Properties" on open - Scenario: Use the menu to open an existing semi-colon separated value file + Scenario: Open an existing semi-colon separated value file Given I have opened Data Curator - When I select "Open Semi-colon Separated" from the menu + When I invoke the "Open semi-colon Separated" command Then a prompt, requesting the 'filename' and location is shown And only files ending with a ".csv" can be selected And the selected 'filename' is opened in a new data tab to the right of any other open data tabs And set the Tab name to the 'filename' And set the CSV Dialect in the Table Properties to "Semi-colon Separated" And "Fix Ragged Rows" - And "Guess Column Properties" And "Freeze Header Row" diff --git a/test/features/file/open-tab-separated-file.feature b/test/features/file/open-tab-separated-file.feature index b8ddc8c04..38ebb490d 100644 --- a/test/features/file/open-tab-separated-file.feature +++ b/test/features/file/open-tab-separated-file.feature @@ -3,24 +3,25 @@ Feature: Open a Tab separated value file I want to open a tab separated value (TSV) file So that I can describe, validate and package the data + The Open Tab separated value file command can be invoked using the menu command + The data may be stored in a ".tsv" file Use the default values in the [CSV Dialect specification](http://frictionlessdata.io/specs/csv-dialect/#specification) but with 'delimiter' = '\t' to open the file and separate the values into the correct columns. - (A desirable feature would be, If the active tab is empty, when the file is opened, insert the file contents into the empty table.) + Desirable features include: + - If the active tab is empty, when the file is opened, insert the file contents into the empty table + - "Guess Column Properties" on open If the CSV has an inconsistent number of columns, [fix ragged rows] (https://relishapp.com/odi-australia/data-curator/docs/other/fix-ragged-rows) - When the file is opened, invoke [Guess Column Properties](https://relishapp.com/odi-australia/data-curator/docs/tools/guess-column-properties) - - Scenario: Use the menu to open an existing Tab Separated Value file + Scenario: Open an existing Tab Separated Value file Given I have opened Data Curator - When I select "Open Tab Separated" from the menu + When I invoke the "Open Tab Separated" command Then a prompt, requesting the 'filename' and location is shown And only files ending with ".tsv" can be selected And the selected 'filename' is opened in a new data tab to the right of any other open data tabs And set the Tab name to the 'filename' And set the CSV Dialect in the Table Properties to "Tab Separated" And "Fix Ragged Rows" - And "Guess Column Properties" And "Freeze Header Row" From 97515608841c3e43f26ed8ac9b62bb15c47f3c0c Mon Sep 17 00:00:00 2001 From: Stephen-Gates Date: Thu, 7 Dec 2017 19:46:50 +1000 Subject: [PATCH 02/35] hide close, next, previous tab until implemented these menu items should be implemented via #273, #67 --- src/main/menu.js | 75 ++++++++++++------------------------------------ 1 file changed, 19 insertions(+), 56 deletions(-) diff --git a/src/main/menu.js b/src/main/menu.js index 2668d034c..877853dfe 100644 --- a/src/main/menu.js +++ b/src/main/menu.js @@ -81,7 +81,6 @@ const template = [ // enabled: false }, { label: 'Open Data Package...', - // turned off for Beta release enabled: true, click() { importDataPackage() @@ -114,22 +113,16 @@ const template = [ }, { label: 'Save As', submenu: save_submenu - }, { - type: 'separator' - }, { - label: 'Close Tab', - accelerator: 'CmdOrCtrl+W', - // turned off for Beta release - enabled: false } - // Placeholder for future features - //, { - // type: 'separator' - // }, { - // label: 'Print', - // accelerator: 'CmdOrCtrl+P', - // enabled: false - // } + // hide until needed + //, { + // type: 'separator' + // } + // hide until implemened + //, { + // label: 'Close Tab', + // accelerator: 'CmdOrCtrl+W' + // } ] }, { label: 'Edit', @@ -220,23 +213,6 @@ const template = [ ] }, { // Placeholder for future features - // label: 'View', - // submenu: [ - // { - // label: 'Read Only', - // type: 'checkbox', - // checked: true, - // enabled: false - // }, { - // TO DO: hide toggledevtools in production release and make a application shortcut - // role: 'toggledevtools' - // }, { - // type: 'separator' - // }, { - // role: 'togglefullscreen' - // } - // ] - // }, { // label: 'Find', // submenu: [ // { @@ -291,7 +267,7 @@ const template = [ // label: 'Create Constraint from Column', // enabled: false // }, { - // label: 'Create Look-up Table from Column', + // label: 'Create Reference Table from Column', // enabled: false // }, { // type: 'separator' @@ -321,21 +297,11 @@ const template = [ triggerMenuButton('Table') } }, { - // Placeholder for future features - // label: 'Set View Properties', - // enabled: false - // , icon: '/static/img/locked.svg' - // }, { label: 'Set Provenance Information', click() { triggerMenuButton('Provenance') } }, { - // Placeholder for future features - // label: 'Generate Data Quality Information', - // enabled: false - // , icon: '/static/img/locked.svg' - // }, { label: 'Set Data Package Properties', click() { triggerMenuButton('Package') @@ -379,18 +345,15 @@ const template = [ }, { type: 'separator' }, { - label: 'Next Tab', - accelerator: 'CmdOrCtrl+Right', - // turned off for Beta release - enabled: false - }, { - label: 'Previous Tab', - accelerator: 'CmdOrCtrl+Left', - // turned off for Beta release - enabled: false - }, { - type: 'separator' - }, { + // hide until implemented + // label: 'Next Tab', + // accelerator: 'CmdOrCtrl+Right', + // }, { + // label: 'Previous Tab', + // accelerator: 'CmdOrCtrl+Left', + // }, { + // type: 'separator' + // }, { role: 'quit' } ] From 04b5caee7297bd399c2c6162923012c173802fb4 Mon Sep 17 00:00:00 2001 From: Stephen-Gates Date: Thu, 7 Dec 2017 20:14:36 +1000 Subject: [PATCH 03/35] and for mac forgot there were two menus --- src/main/menu.js | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/main/menu.js b/src/main/menu.js index 877853dfe..3e368f3d7 100644 --- a/src/main/menu.js +++ b/src/main/menu.js @@ -342,18 +342,18 @@ const template = [ submenu: [ { role: 'minimize' - }, { - type: 'separator' - }, { // hide until implemented - // label: 'Next Tab', - // accelerator: 'CmdOrCtrl+Right', // }, { - // label: 'Previous Tab', - // accelerator: 'CmdOrCtrl+Left', + // type: 'separator' // }, { - // type: 'separator' + // label: 'Next Tab', + // accelerator: 'CmdOrCtrl+Right' // }, { + // label: 'Previous Tab', + // accelerator: 'CmdOrCtrl+Left' + }, { + type: 'separator' + }, { role: 'quit' } ] @@ -460,18 +460,15 @@ if (process.platform === 'darwin') { role: 'minimize' }, { role: 'zoom' - }, { - type: 'separator' - }, { - label: 'Next Tab', - accelerator: 'CmdOrCtrl+Right', - // turned off for Beta release - enabled: false - }, { - label: 'Previous Tab', - accelerator: 'CmdOrCtrl+Left', - // turned off for Beta release - enabled: false + // hide until implemented + // }, { + // type: 'separator' + // }, { + // label: 'Next Tab', + // accelerator: 'CmdOrCtrl+Right' + // }, { + // label: 'Previous Tab', + // accelerator: 'CmdOrCtrl+Left' }, { type: 'separator' }, { From 4c594de550cb883bfa3519fb1aa9389f3cd199d2 Mon Sep 17 00:00:00 2001 From: Stephen-Gates Date: Fri, 8 Dec 2017 20:06:50 +1000 Subject: [PATCH 04/35] fix about close button colour --- static/css/panel.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/panel.styl b/static/css/panel.styl index 80665d5f4..c324c27ea 100644 --- a/static/css/panel.styl +++ b/static/css/panel.styl @@ -170,7 +170,7 @@ sideNavHeaderHeight = 55px background-color inherit !important &.left .btn-default - color #000 !important + color #fff !important form clear both From e37c9464e6be43818d03383357cf7baedb9dff75 Mon Sep 17 00:00:00 2001 From: Stephen-Gates Date: Fri, 8 Dec 2017 20:14:31 +1000 Subject: [PATCH 05/35] UI restyling - remove colon after label - Capitalise labels - Place labels above property entry (fixes #303) - Make all data entry take 100% of panel width - refine tooltips (replace #309, fixes #307) - fix tooltip broken link - relocate PK and FK data entry (fixes #286) --- src/renderer/mixins/ColumnTooltip.vue | 16 ++++---- src/renderer/mixins/PackageTooltip.vue | 22 ++++------ src/renderer/mixins/ProvenanceTooltip.vue | 2 +- src/renderer/mixins/TableTooltip.vue | 23 ++++++----- src/renderer/partials/ColumnProperties.vue | 26 ++++++------ src/renderer/partials/ForeignKeys.vue | 2 +- src/renderer/partials/PackageProperties.vue | 21 +++++----- .../partials/ProvenanceProperties.vue | 2 +- src/renderer/partials/SideNav.vue | 2 +- src/renderer/partials/TableProperties.vue | 40 ++++++++++--------- static/css/columnprops.styl | 1 + static/css/foreignkeys.styl | 2 +- static/css/panels.css | 6 ++- static/css/sources.styl | 2 +- 14 files changed, 88 insertions(+), 79 deletions(-) diff --git a/src/renderer/mixins/ColumnTooltip.vue b/src/renderer/mixins/ColumnTooltip.vue index ade17e6a4..6362334dc 100644 --- a/src/renderer/mixins/ColumnTooltip.vue +++ b/src/renderer/mixins/ColumnTooltip.vue @@ -7,38 +7,38 @@ export default { externalLink, 'tooltipColumnName': { components: {externalLink}, - template: `
The - Usually the value of the first row in the column.
` + template: `
+ is usually the value of the first row in the column
` }, 'tooltipColumnTitle': { components: {externalLink}, template: `
A human readable - for the column.
` + for the column` }, 'tooltipColumnDescription': { components: {externalLink}, template: `
A - of the column.
` + of the column` }, 'tooltipColumnType': { components: {externalLink}, template: `
Choose a - for the data in the column.
` + for the data in the column` }, 'tooltipColumnFormat': { components: {externalLink}, template: `
Choose the - for the Type of data.
` + for the Type of data` }, 'tooltipColumnConstraints': { components: {externalLink}, template: `
Set a - to limit valid values.
` + to limit valid values` }, 'tooltipColumnRdfType': { components: {externalLink}, template: `
Set a - to provide extra meaning to the Type.
` + to provide extra meaning to the data` } } } diff --git a/src/renderer/mixins/PackageTooltip.vue b/src/renderer/mixins/PackageTooltip.vue index a73699446..bb458f488 100644 --- a/src/renderer/mixins/PackageTooltip.vue +++ b/src/renderer/mixins/PackageTooltip.vue @@ -8,37 +8,31 @@ export default { 'tooltipPackageName': { components: {externalLink}, template: `
The - ` + of this data package. Lower case, numbers, ".", "_", "-" characters only
` }, 'tooltipPackageId': { components: {externalLink}, - template: `
A globally unique identifier ( - )
` + template: `
A globally unique () for this data package
` }, 'tooltipPackageTitle': { components: {externalLink}, - template: `
The - or one sentence description for this Package.
` + template: `
The a one sentence description for this data package
` }, 'tooltipPackageDescription': { components: {externalLink}, - template: `
A - for the Package.
` + template: `
A for this data package
` }, 'tooltipPackageVersion': { components: {externalLink}, - template: `
A - A number e.g. 1.0.0
` }, 'tooltipPackageSources': { components: {externalLink}, - template: `
Each - MUST have a title and MAY have path and/or email address.
` + template: `
Each must have a title and may have path and/or email
` }, - 'tooltipPackageLicences': { + 'tooltipPackageLicenses': { components: {externalLink}, - template: `
The Open - under which the Package is provided.
` + template: `
The under which this data package is provided
` } } } diff --git a/src/renderer/mixins/ProvenanceTooltip.vue b/src/renderer/mixins/ProvenanceTooltip.vue index 57f2ffe76..6464b30d7 100644 --- a/src/renderer/mixins/ProvenanceTooltip.vue +++ b/src/renderer/mixins/ProvenanceTooltip.vue @@ -8,7 +8,7 @@ export default { 'tooltipProvenanceDescription': { components: {externalLink}, template: `
Use text or markdown to provide provenance information in a - file in the Data Package.
` + file in the data package` } } } diff --git a/src/renderer/mixins/TableTooltip.vue b/src/renderer/mixins/TableTooltip.vue index 63c58b417..098b03fa0 100644 --- a/src/renderer/mixins/TableTooltip.vue +++ b/src/renderer/mixins/TableTooltip.vue @@ -8,37 +8,42 @@ export default { 'tooltipTableName': { components: {externalLink}, template: `
The - of the Table. Lower case, numbers, ".", "_", "-" characters only.
` + of the table. Lower case, numbers, ".", "_", "-" characters only` }, 'tooltipTableTitle': { components: {externalLink}, template: `
The - or one sentence description for this Table.
` + or one sentence description for this table` }, 'tooltipTableDescription': { components: {externalLink}, template: `
A - for the Table.
` + for the table` }, 'tooltipTableSources': { components: {externalLink}, - template: `
Each - MUST have a title and MAY have path and/or email address.
` + template: `
Each + MUST have a title and MAY have path and/or email address
` }, 'tooltipTableLicences': { components: {externalLink}, - template: `
The Open - under which the Table is provided.
` + template: `
The + under which the data in the table is provided
` }, 'tooltipTablePrimaryKeys': { components: {externalLink}, template: `
The - is the field(s) that uniquely identifies each row in the table. Separate values with a comma.
` + is the field(s) that uniquely identifies each row in the table.` + }, + 'tooltipTableForeignKeys': { + components: {externalLink}, + template: `
A + must exist in the referenced table and column(s)
` }, 'tooltipTableMissingValues': { components: {externalLink}, template: `
Value(s) that indicate a - . Separate values with a comma.
` + . Separate values with a comma` } } } diff --git a/src/renderer/partials/ColumnProperties.vue b/src/renderer/partials/ColumnProperties.vue index 19cf0271b..111eca6cc 100644 --- a/src/renderer/partials/ColumnProperties.vue +++ b/src/renderer/partials/ColumnProperties.vue @@ -3,22 +3,22 @@
-
+

@@ -30,7 +30,7 @@
- +
@@ -72,48 +72,48 @@ export default { typeProperty: '', constraintInputKeyValues: {}, allTablesAllColumnsNames: {}, - // TODO: setup args so clear for constaints only + // TODO: setup args so clear for constraints only debounceSetConstraints: _.debounce(this.pushColumnProperty, 300, { 'leading': true, 'trailing': false }), formprops: [{ - label: 'name', + label: 'Name', tooltipId: 'tooltip-column-name', tooltipView: 'tooltipColumnName', isDisabled: true, isMandatory: true }, { - label: 'title', + label: 'Title', tooltipId: 'tooltip-column-title', tooltipView: 'tooltipColumnTitle' }, { - label: 'description', + label: 'Description', tooltipId: 'tooltip-column-description', tooltipView: 'tooltipColumnDescription' }, { - label: 'type', + label: 'Type', tooltipId: 'tooltip-column-type', tooltipView: 'tooltipColumnType', type: 'dropdown' }, { - label: 'format', + label: 'Format', tooltipId: 'tooltip-column-format', tooltipView: 'tooltipColumnFormat', type: 'dropdown' }, { - label: 'constraints', + label: 'Constraints', tooltipId: 'tooltip-column-constraints', tooltipView: 'tooltipColumnConstraints', type: 'checkbox' }, { - label: 'rdfType', + label: 'RDF Type', tooltipId: 'tooltip-column-rdfType', tooltipView: 'tooltipColumnRdfType', type: 'url' diff --git a/src/renderer/partials/ForeignKeys.vue b/src/renderer/partials/ForeignKeys.vue index e02626896..972d82eb4 100644 --- a/src/renderer/partials/ForeignKeys.vue +++ b/src/renderer/partials/ForeignKeys.vue @@ -12,7 +12,7 @@
diff --git a/src/renderer/partials/PackageProperties.vue b/src/renderer/partials/PackageProperties.vue index 4c5030891..b575a5446 100644 --- a/src/renderer/partials/PackageProperties.vue +++ b/src/renderer/partials/PackageProperties.vue @@ -2,8 +2,9 @@