Skip to content

Commit

Permalink
Merge branch 'release/0.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Dec 13, 2017
2 parents babac3e + 2ee3d91 commit fae46de
Show file tree
Hide file tree
Showing 35 changed files with 555 additions and 408 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DataCurator",
"version": "0.7.0",
"version": "0.8.0",
"author": " <[email protected]>",
"description": "Data Curator is a simple desktop CSV editor to help describe, validate and share usable open data",
"license": "MIT",
Expand Down
112 changes: 36 additions & 76 deletions src/main/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const template = [
// enabled: false
}, {
label: 'Open Data Package...',
// turned off for Beta release
enabled: true,
click() {
importDataPackage()
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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: [
// {
Expand Down Expand Up @@ -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'
Expand All @@ -302,14 +278,6 @@ const template = [
}
}, {
type: 'separator'
}, {
label: 'Validate Table',
accelerator: 'Shift+CmdOrCtrl+V',
click() {
validateTable()
}
}, {
type: 'separator'
}, {
label: 'Set Column Properties',
click() {
Expand All @@ -321,27 +289,25 @@ 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')
}
}, {
type: 'separator'
}, {
label: 'Validate Table',
accelerator: 'Shift+CmdOrCtrl+V',
click() {
validateTable()
}
}, {
type: 'separator'
}, {
label: 'Export Data Package...',
accelerator: 'CmdOrCtrl+D',
Expand Down Expand Up @@ -376,18 +342,15 @@ const template = [
submenu: [
{
role: 'minimize'
}, {
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'
}, {
Expand Down Expand Up @@ -497,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'
}, {
Expand Down
14 changes: 7 additions & 7 deletions src/renderer/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,23 +242,23 @@ export default {
}
],
defaultTableProperties: [{
label: 'profile',
key: 'profile',
value: 'tabular-data-resource'
},
{
label: 'format',
key: 'format',
value: 'csv'
},
{
label: 'mediatype',
key: 'mediatype',
value: 'text/csv'
},
{
label: 'encoding',
key: 'encoding',
value: 'utf-8'
}],
defaultPackageProperties: [{
label: 'profile',
key: 'profile',
value: 'tabular-data-package'
}],
reportSiblingClasses: ['main-bottom-panel', 'main-middle-panel']
Expand Down Expand Up @@ -460,12 +460,12 @@ export default {
},
pushDefaultTableProperties: function(hotId) {
this.defaultTableProperties.forEach(x => {
this.pushTableProperty({hotId: hotId, key: x.label, value: x.value})
this.pushTableProperty({hotId: hotId, key: x.key, value: x.value})
})
},
pushDefaultPackageProperties: function() {
this.defaultPackageProperties.forEach(x => {
this.pushPackageProperty({key: x.label, value: x.value})
this.pushPackageProperty({key: x.key, value: x.value})
})
},
closeTab: async function(event) {
Expand Down
6 changes: 0 additions & 6 deletions src/renderer/frictionless.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ import {HotRegister} from '../renderer/hot.js'
import store from '../renderer/store/modules/hots.js'
import {includeHeadersInData, hasAllColumnNames} from '@/frictionlessUtilities.js'

// async function initDataAndInferTableSchema(data) {
// const table = await Table.load(data)
// await table.infer()
// return table
// }

async function initDataAndInferSchema(data) {
const schema = await Schema.load({})
await schema.infer(data)
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/headerRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {ipcRenderer as ipc} from 'electron'
import {allTablesAllColumnNames$} from '@/rxSubject.js'
import store from '@/store/modules/hots.js'
import {HotRegister} from '@/hot.js'
import {pushAllTabTitlesSubscription} from '@/store/modules/tabs.js'

export function toggleHeaderWithFeedback(hot, errorFunction, successFunction) {
if (hot.hasColHeaders()) {
Expand Down Expand Up @@ -62,4 +63,5 @@ function updateAllColumnsName(values) {
})
// do not allow getter to cache as does not seem to pick up change
allTablesAllColumnNames$.next(store.getters.getAllHotTablesColumnNames(store.state, store.getters)())
pushAllTabTitlesSubscription()
}
16 changes: 8 additions & 8 deletions src/renderer/mixins/ColumnTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@ export default {
externalLink,
'tooltipColumnName': {
components: {externalLink},
template: `<div id="tooltip-column-name">The
<externalLink text="Name" url="http://frictionlessdata.io/specs/table-schema/#name"/> Usually the value of the first row in the column.</div>`
template: `<div id="tooltip-column-name">
<externalLink text="Name" url="http://frictionlessdata.io/specs/table-schema/#name"/> is usually the value of the first row in the column</div>`
},
'tooltipColumnTitle': {
components: {externalLink},
template: `<div id="tooltip-column-title">A human readable
<externalLink text="Title" url="http://frictionlessdata.io/specs/table-schema/#title"/> for the column.</div>`
<externalLink text="Title" url="http://frictionlessdata.io/specs/table-schema/#title"/> for the column</div>`
},
'tooltipColumnDescription': {
components: {externalLink},
template: `<div id="tooltip-column-description">A
<externalLink text="Description" url="http://frictionlessdata.io/specs/table-schema/#description"/> of the column.</div>`
<externalLink text="Description" url="http://frictionlessdata.io/specs/table-schema/#description"/> of the column</div>`
},
'tooltipColumnType': {
components: {externalLink},
template: `<div id="tooltip-column-type">Choose a
<externalLink text="Type" url="http://frictionlessdata.io/specs/table-schema/#types-and-formats"/> for the data in the column.</div>`
<externalLink text="Type" url="http://frictionlessdata.io/specs/table-schema/#types-and-formats"/> for the data in the column</div>`
},
'tooltipColumnFormat': {
components: {externalLink},
template: `<div id="tooltip-column-format">Choose the
<externalLink text="Format" url="http://frictionlessdata.io/specs/table-schema/#types-and-formats"/> for the Type of data.</div>`
<externalLink text="Format" url="http://frictionlessdata.io/specs/table-schema/#types-and-formats"/> for the Type of data</div>`
},
'tooltipColumnConstraints': {
components: {externalLink},
template: `<div id="tooltip-column-constraints">Set a
<externalLink text="Constraint" url="http://frictionlessdata.io/specs/table-schema/#constraints"/> to limit valid values.</div>`
<externalLink text="Constraint" url="http://frictionlessdata.io/specs/table-schema/#constraints"/> to limit valid values</div>`
},
'tooltipColumnRdfType': {
components: {externalLink},
template: `<div id="tooltip-column-rdfType">Set a
<externalLink text="RDF Type" url="http://frictionlessdata.io/specs/table-schema/#rich-types"/> to provide extra meaning to the Type.</div>`
<externalLink text="RDF Type" url="http://frictionlessdata.io/specs/table-schema/#rich-types"/> to provide extra meaning to the data</div>`
}
}
}
Expand Down
23 changes: 23 additions & 0 deletions src/renderer/mixins/ForeignKeysTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script>
import Tooltip from '../mixins/Tooltip'
import externalLink from '../partials/ExternalLink'
export default {
extends: Tooltip,
components: {
externalLink,
'tooltipForeignkey': {
components: {externalLink},
template: `<div id="tooltip-foreignkey">A
<externalLink text="Foreign Key" url="http://frictionlessdata.io/specs/table-schema/#foreign-keys"/> must exist in the referenced table and column(s)</div>`
},
'tooltipForeignkeyTable': {
components: {externalLink},
template: `<div id="tooltip-foreignkey-table">The table used to reference the foreign key(s).</div>`
},
'tooltipForeignkeyTablekey': {
components: {externalLink},
template: `<div id="tooltip-foreignkey-tablekey">The table columnn header(s) used to reference the foreign key(s).</div>`
}
}
}
</script>
22 changes: 8 additions & 14 deletions src/renderer/mixins/PackageTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,31 @@ export default {
'tooltipPackageName': {
components: {externalLink},
template: `<div id="tooltip-package-name">The
<externalLink text="Name" url="http://frictionlessdata.io/specs/data-package/#name/> of the Package. Lower case, numbers, ".", "_", "-" characters only.</div>`
<externalLink text="Name" url="http://frictionlessdata.io/specs/data-package/#name"/> of this data package. Lower case, numbers, ".", "_", "-" characters only</div>`
},
'tooltipPackageId': {
components: {externalLink},
template: `<div id="tooltip-package-id">A globally unique identifier (
<externalLink text="Id" url="http://frictionlessdata.io/specs/data-package/#id"/>)</div>`
template: `<div id="tooltip-package-id">A globally unique (<externalLink text="identifier" url="http://frictionlessdata.io/specs/data-package/#id"/>) for this data package</div>`
},
'tooltipPackageTitle': {
components: {externalLink},
template: `<div id="tooltip-package-title">The
<externalLink text="Title" url="http://frictionlessdata.io/specs/data-package/#title"/> or one sentence description for this Package.</div>`
template: `<div id="tooltip-package-title">The <externalLink text="Title" url="http://frictionlessdata.io/specs/data-package/#title"/> a one sentence description for this data package</div>`
},
'tooltipPackageDescription': {
components: {externalLink},
template: `<div id="tooltip-package-description">A
<externalLink text="Description" url="http://frictionlessdata.io/specs/data-package/#description"/> for the Package.</div>`
template: `<div id="tooltip-package-description">A <externalLink text="Description" url="http://frictionlessdata.io/specs/data-package/#description"/> for this data package</div>`
},
'tooltipPackageVersion': {
components: {externalLink},
template: `<div id="tooltip-package-version">A
<externalLink text="Data Package Version" url="http://frictionlessdata.io/specs/patterns/#data-package-version> follows the Semantic Versioning specification format.</div>`
template: `<div id="tooltip-package-version">A <externalLink text="Version" url="http://frictionlessdata.io/specs/patterns/#data-package-version"/> number e.g. 1.0.0</div>`
},
'tooltipPackageSources': {
components: {externalLink},
template: `<div id="tooltip-package-sources">Each
<externalLink text="Source" url="http://frictionlessdata.io/specs/data-package/#sources"/> MUST have a title and MAY have path and/or email address.</div>`
template: `<div id="tooltip-package-sources">Each <externalLink text="Source" url="http://frictionlessdata.io/specs/data-package/#sources"/> must have a title and may have path and/or email</div>`
},
'tooltipPackageLicences': {
'tooltipPackageLicenses': {
components: {externalLink},
template: `<div id="tooltip-package-licences">The Open
<externalLink text="License" url="http://frictionlessdata.io/specs/data-package/#licenses"/> under which the Package is provided.</div>`
template: `<div id="tooltip-package-licenses">The <externalLink text="Open License" url="http://frictionlessdata.io/specs/data-package/#licenses"/> under which this data package is provided</div>`
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/mixins/ProvenanceTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
'tooltipProvenanceDescription': {
components: {externalLink},
template: `<div id="tooltip-provenance-description">Use text or markdown to provide provenance information in a
<externalLink text="Readme" url="http://frictionlessdata.io/guides/publish/faq/#readme"/> file in the Data Package.</div>`
<externalLink text="Readme" url="https://frictionlessdata.io/guides/publish-faq/#readme"/> file in the data package</div>`
}
}
}
Expand Down
Loading

0 comments on commit fae46de

Please sign in to comment.