Skip to content

Commit

Permalink
Merge branch 'release/0.13.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Apr 4, 2018
2 parents 54fc823 + e6d22dd commit 4ac9e92
Show file tree
Hide file tree
Showing 137 changed files with 2,723 additions and 1,356 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
"space-infix-ops": 0
}
}

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The best way to contribute financially to this project is to [join the ODI Austr

## Contribute Ideas and Feature Requests

Your idea for a feature addition may already exist on our [issues backlog](https://github.com/ODIQueensland/data-curator/issues) or [feature backlog](https://github.com/ODIQueensland/data-curator/tree/master/test/features/backlog). If a similar idea is in the backlog, please join the conversation.
Your idea for a feature addition may already exist on our [issues backlog](https://github.com/ODIQueensland/data-curator/issues) or [feature backlog](https://app.cucumber.pro/projects/data-curator/search/branch/develop?q=%40backlog). If a similar idea is in the backlog, please join the conversation.

If the gist of your idea isn't there:
- [request a feature](https://github.com/ODIQueensland/data-curator/issues/new?template=feature-request.md&labels=f:Feature-request&milestone=6&assignee=Stephen-Gates)
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
> Include details about the environment you experienced the problem - this will help us fix the bug quicker.
* Data Curator version: 0.Y.Z
* Operating System and version: e.g. macOS High Sierra 10.13.3
* Operating System and version: e.g. macOS High Sierra 10.13.4
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
### Your Environment

* Data Curator version: 0.Y.Z
* Operating System and version: macOS High Sierra 10.13.3, Windows 7 64bit
* Operating System and version: macOS High Sierra 10.13.4, Windows 7 64bit
9 changes: 5 additions & 4 deletions .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"lcov",
"text"
],
"include": [
"**/*.js"
],
"require": [
"babel-register"
],
"exclude" : [
"node_modules"
]
],
"check-coverage": true
}
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,14 @@ Using data from any of these sources, you can:

- automatically create a [schema](http://frictionlessdata.io/specs/table-schema/) that describes the data fields
- refine the schema to include extra [data validation rules](http://frictionlessdata.io/specs/table-schema/#constraints)
- validate the data against the schema
- describe the provenance of your data
- save data as a valid CSV file in various [CSV dialects](http://frictionlessdata.io/specs/csv-dialect/)

The schema enables you to:

- validate the whole table at once
- validate a column at a time (planned)

Once the data is described and validated, you can share the data and its description by exporting a [Data Package](http://frictionlessdata.io/data-packages/) to:

- [publish](http://okfnlabs.org/blog/2016/07/25/publish-data-packages-to-datahub-ckan.html) on your [open data portal](https://ckan.org)
- use as a template for others to make similar data
- publish the data on a CKAN open data portal
- use it as a template for others to make similar data

Open data consumers can use published Data Packages to:

Expand All @@ -60,7 +56,7 @@ Open data consumers can use published Data Packages to:

## Follow our progress

Interested in this project? Subscribe to [Data Curator News](https://github.com/ODIQueensland/data-curator/issues/15) to get occasional updates on our progress and hear about [each release](https://github.com/ODIQueensland/data-curator/releases).
Interested in this project? Subscribe to [Data Curator News](https://github.com/ODIQueensland/data-curator/issues/15) to get occasional updates on our progress and hear about [each release](https://github.com/ODIQueensland/data-curator/releases). [Ask a question](https://ask.theodi.org.au/c/projects/data-curator) on the forum.

## Contributions

Expand Down
52 changes: 25 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DataCurator",
"version": "0.13.1",
"version": "0.13.2",
"author": " <[email protected]>",
"description": "Data Curator is a simple desktop CSV editor to help describe, validate and share usable open data",
"license": "MIT",
Expand All @@ -15,9 +15,8 @@
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"dev": "node .electron-vue/dev-runner.js",
"lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src",
"lint:test": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter test",
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src",
"lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src test",
"lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test",
"pack": "yarn run pack:main && yarn run pack:renderer",
"release:predraft": "yarn run build && build --publish onTagOrDraft --prerelease true --draft true",
"release:pre": "yarn run build && build --publish always --prerelease true --draft false",
Expand Down Expand Up @@ -87,7 +86,7 @@
"etl": "^0.5.8",
"fs-extra": "~5.0.0",
"handsontable": "^0.35.1",
"imports-loader": "^0.7.1",
"imports-loader": "^0.8.0",
"lodash": "^4.17.4",
"markdown-it": "^8.4.1",
"moment": "^2.21.0",
Expand All @@ -100,13 +99,13 @@
"svgo": "^1.0.5",
"tableschema": "^1.7.0",
"temp": "^0.8.3",
"unzipper": "^0.8.11",
"unzipper": "^0.8.12",
"vee-validate": "^2.0.4",
"vue": "^2.5.2",
"vue-async-computed": "^3.3.1",
"vue-directive-tooltip": "^1.4.1",
"vue-directive-tooltip": "^1.4.5",
"vue-electron": "^1.0.6",
"vue-good-table": "^1.20.3",
"vue-good-table": "^1.21.0",
"vue-router": "^3.0.1",
"vue-rx": "^5.0.0",
"vue-template-compiler": "^2.5.2",
Expand All @@ -115,12 +114,11 @@
"zeroclipboard": "^2.3.0"
},
"devDependencies": {
"@vue/test-utils": "^1.0.0-beta.12",
"@vue/test-utils": "^1.0.0-beta.13",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.4",
"babel-plugin-istanbul": "^4.1.5",
"babel-plugin-rewire": "^1.1.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
Expand All @@ -134,7 +132,7 @@
"copy-webpack-plugin": "^4.2.0",
"cross-env": "^5.0.0",
"css-loader": "^0.28.10",
"cucumber": "^4.0.0",
"cucumber": "^4.1.0",
"cucumber-html-reporter": "^4.0.2",
"del": "^3.0.0",
"devtron": "^1.4.0",
Expand All @@ -143,49 +141,49 @@
"electron-debug": "^1.5.0",
"electron-devtools-installer": "^2.0.1",
"eslint": "^4.18.2",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.3.0",
"eslint-plugin-html": "^3.0.0",
"eslint-config-standard": "^11.0.0",
"eslint-friendly-formatter": "^4.0.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-html": "^4.0.2",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"exports-loader": "^0.7.0",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.11",
"flush-promises": "^1.0.0",
"html-webpack-include-assets-plugin": "^0.0.5",
"html-webpack-plugin": "^2.16.1",
"inject-loader": "^3.0.0",
"json-loader": "^0.5.4",
"karma": "^1.7.1",
"karma": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-electron": "^5.2.2",
"karma-electron": "^5.3.0",
"karma-mocha": "^1.2.0",
"karma-sinon-chai": "^1.3.3",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^2.0.13",
"mocha": "^3.0.2",
"karma-webpack": "^3.0.0",
"mocha": "^5.0.5",
"mocha-webpack": "^1.0.1",
"multispinner": "^0.2.1",
"node-gyp": "^3.6.2",
"node-loader": "^0.6.0",
"nyc": "^11.4.1",
"require-dir": "^0.3.0",
"sinon": "^4.4.9",
"sinon-chai": "^2.14.0",
"require-dir": "^1.0.0",
"sinon": "^4.4.10",
"sinon-chai": "^3.0.0",
"sinon-test": "^2.1.3",
"spectron": "^3.7.1",
"spectron-fake-menu": "^0.0.1",
"style-loader": "^0.18.1",
"style-loader": "^0.20.3",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"url-loader": "^0.6.2",
"url-loader": "^1.0.1",
"vue-html-loader": "^1.2.2",
"vue-loader": "^12.2.1",
"vue-server-renderer": "^2.5.14",
"vue-style-loader": "^3.0.1",
"vue-style-loader": "^4.1.0",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.9.3",
"webpack-fix-default-import-plugin": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/main/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ const template = [
type: 'separator'
}, {
label: 'Set Column Properties',
accelerator: 'Shift+CmdOrCtrl+C',
accelerator: process.env.NODE_ENV !== 'development' ? 'Shift+CmdOrCtrl+C' : 'Alt+CmdOrCtrl+C',
click() {
webContents().send('triggerMenuButton', 'Column')
}
Expand Down
1 change: 0 additions & 1 deletion src/renderer/components/Errors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ export default {
})
// Initial window open, we need to trigger errors call
this.$nextTick(function() {
console.log('getting error messages')
this.getErrorMessages()
})
},
Expand Down
63 changes: 54 additions & 9 deletions src/renderer/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</li>
</ul>
</li>
<li class="tab-add" @click="addTab" v-tooltip="tooltip('tooltip-add-tab')">
<li class="tab-add" @click="addTab" v-tooltip.right="tooltip('tooltip-add-tab')">
<a>&nbsp;<button type="button" class="btn btn-sm"><i class="fa fa-plus"></i></button></a>
</li>
<component is="tooltipAddTab" />
Expand Down Expand Up @@ -250,6 +250,7 @@ export default {
previousComments: [],
errorsWindowId: null,
activeSelected: [],
persistColorFn: this.highlightPersistedSelection,
toolbarMenus: [{
name: 'Guess',
id: 'guess-column-properties',
Expand Down Expand Up @@ -353,6 +354,12 @@ export default {
},
mainBottomPanelStatus() {
return `${this.messageStatus} ${this.sideNavPropertiesForMain}`
},
errorColor() {
return 'rgba(245, 186, 186, 0.3)'
},
highlightColor() {
return 'rgba(181, 209, 255, 0.3)'
}
},
methods: {
Expand Down Expand Up @@ -427,10 +434,12 @@ export default {
}, 500)
},
hoverToSelectErrorCell: function(row, column) {
this.persistColorFn = false
this.updateCellsFromCount(row, column, this.addErrorHoverStyle)
},
exitHoverToSelectErrorCell: function(row, column) {
this.updateCellsFromCount(row, column, this.removeErrorHoverStyle)
this.persistColorFn = this.highlightPersistedSelection
},
addErrorHoverStyle: function(element) {
element.style.border = 'solid 1px #ff3860'
Expand All @@ -443,11 +452,35 @@ export default {
element.style.boxShadow = ''
},
addErrorHighlightStyle: function(element) {
element.style.backgroundColor = 'rgb(245, 186, 186)'
element.style.backgroundColor = this.errorColor
},
removeErrorHighlightStyle: function(element) {
element.style.backgroundColor = ''
},
highlightPersistedSelection: function(hot) {
let element = this.getHotSelectionElement(hot)
// only highlight if no existing color
if (element) {
element.style.backgroundColor = this.highlightColor
}
},
unhighlightPersistedSelection: function(hot) {
let element = this.getHotSelectionElement(hot)
// only remove color if it is 'highlight'
if (element) {
if (element.style && element.style.backgroundColor === this.highlightColor) {
element.style.backgroundColor = ''
}
}
},
getHotSelectionElement: function(hot) {
let element
let selection = this.getHotSelection(hot.guid)
if (selection) {
element = hot.getCell(selection[0], selection[1])
}
return element
},
updateCellsFromCount: function(row, column, fn) {
let hot = HotRegister.getActiveInstance()
let range = this.getCellOrRowFromCount(hot, row, column)
Expand All @@ -459,12 +492,14 @@ export default {
this.updateCellsFromHotRange(hot, range, fn)
},
updateCellsFromHotRange: function(hot, range, fn) {
// before we select cell for errors, check if there is a current selection made
hot.selectCell(range.from.row, range.from.col, range.to.row, range.to.col)
let elements = this.getHighlightedAreaOrCellSelectors()
hot.deselectCell()
for (let element of elements) {
fn(element)
}
hot.deselectCell()
// hot.deselectCell()
},
getHighlightedAreaOrCellSelectors: function() {
let elements = document.querySelectorAll('.highlight')
Expand All @@ -476,13 +511,19 @@ export default {
let columnIndex = this.transformCountToIndex(column)
hot.selectCell(rowIndex, columnIndex)
},
deselectionListener: function() {
let hot = HotRegister.getActiveInstance()
if (this.persistColorFn) {
this.persistColorFn(hot)
}
},
selectionListener: function() {
// with deselectOutsideHot set to true, we need to track last selection.
let hot = HotRegister.getActiveInstance()
this.unhighlightPersistedSelection(hot)
let selected = hot.getSelected()
// with deselectOutsideHot set to true, we need to track last selection.
this.pushHotSelection({hotId: hot.guid, selected: selected})
this.updateActiveColumn(selected)
// this.resetSideNavArrows()
},
inferColumnProperties: async function() {
try {
Expand Down Expand Up @@ -609,6 +650,7 @@ export default {
loadFormattedDataIntoContainer: function(container, data, format) {
HotRegister.register(container, {
selectionListener: this.selectionListener,
deselectionListener: this.deselectionListener,
loadingStartListener: this.showLoadingScreen,
loadingFinishListener: this.closeLoadingScreen
})
Expand Down Expand Up @@ -786,14 +828,14 @@ export default {
this.closeMessages()
}
},
setHotComments: function() {
let hot = HotRegister.getActiveInstance()
let commentsPlugin = hot.getPlugin('comments')
removePreviousHotComments: function(commentsPlugin) {
for (const previousComment of this.previousComments) {
commentsPlugin.removeCommentAtCell(previousComment.row, previousComment.col)
this.updateCellsFromIndex(previousComment.row, previousComment.col, this.removeErrorHighlightStyle)
}
this.previousComments = []
},
setHotComments: function(commentsPlugin, hot) {
for (const errorMessage of this.messages) {
let range = this.getCellOrRowFromCount(hot, errorMessage.rowNumber, errorMessage.columnNumber)
commentsPlugin.setRange(range)
Expand Down Expand Up @@ -915,8 +957,11 @@ export default {
this.testBottomMain()
},
messages: function() {
let hot = HotRegister.getActiveInstance()
let commentsPlugin = hot.getPlugin('comments')
this.removePreviousHotComments(commentsPlugin)
if (this.messagesType === 'error') {
this.setHotComments()
this.setHotComments(commentsPlugin, hot)
}
if (this.messages) {
this.sendErrorsToErrorsWindow()
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ const HotRegister = {
listeners.selectionListener()
}
},
afterDeselect() {
if (typeof listeners.deselectionListener !== 'undefined') {
listeners.deselectionListener()
}
},
enterMoves({shiftKey}) {
if (!shiftKey) {
const selection = hot.getSelected()
Expand Down
Loading

0 comments on commit 4ac9e92

Please sign in to comment.