Skip to content

Commit

Permalink
Merge branch 'master' into tests/is-graph-acyclic
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencanterot authored Dec 10, 2017
2 parents e54a878 + 8facb2c commit 729961b
Show file tree
Hide file tree
Showing 31 changed files with 1,061 additions and 290 deletions.
5 changes: 0 additions & 5 deletions app/config/secret/app.json

This file was deleted.

128 changes: 75 additions & 53 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
},
"dependencies": {
"@blueprintjs/core": "^1.25.0",
"@types/chart.js": "^2.6.2",
"@types/csv-parse": "^1.1.11",
"@types/d3": "^4.10.0",
"@types/lodash": "^4.14.71",
Expand All @@ -24,7 +23,6 @@
"@types/redux-logger": "^3.0.0",
"@types/webpack-env": "^1.13.2",
"awesome-typescript-loader": "^3.2.2",
"chart.js": "^2.6.0",
"classnames": "^2.2.5",
"css-loader": "^0.28.4",
"csv-parse": "^2.0.0",
Expand All @@ -39,7 +37,6 @@
"morgan": "^1.8.2",
"react": "^15.6.1",
"react-addons-css-transition-group": "^15.6.0",
"react-chartjs-2": "^2.6.2",
"react-d3-graph": "^0.2.1",
"react-dom": "^15.6.1",
"react-graph-vis": "^1.0.1",
Expand All @@ -55,7 +52,11 @@
"typescript": "^2.4.2",
"uglifyjs-webpack-plugin": "^1.0.0-beta.3",
"webpack": "^3.4.1",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-dev-server": "^2.6.1",
"whatwg-fetch": "^2.0.3"
},
"devDependencies": {

}
}
20 changes: 17 additions & 3 deletions app/src/application/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@ import {
import config from './config'
const serverUrl = config('app').serverURL

export function changeSelectedConceptNav(conceptNode: any): action {
export function changeSelectedRootNav(node: any): action {
return {
type: 'CHANGE_SELECTED_CONCEPT_NAV',
value: conceptNode,
type: 'CHANGE_SELECTED_ROOT_NAV',
value: node,
}
}

export function changeSelectedNodeNav(node: any): action {
return {
type: 'CHANGE_SELECTED_NODE_NAV',
value: node,
}
}

export function changeDisplayedConceptNav(node: any): action {
return {
type: 'CHANGE_DISPLAYED_CONCEPT_NAV',
value: node,
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/application/components/d3Blocks/conceptGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class ConceptGraph extends React.Component<Props, State> {
customDoubleClick(d: d3GraphNode) {
// It is important that this action is dispatched first as it erases
// the list of displayed slugs from the Redux state.
this.props.dispatch(actions.changeSelectedConceptNav(d))
this.props.dispatch(actions.changeDisplayedConceptNav(d))
// TODO: associate correct container instead of default cp1
this.props.dispatch(actions.fetchConcept('concepts/' + d.slug, 'cp1'))
this.props.dispatch(actions.toggleNavPanel())
Expand Down
81 changes: 81 additions & 0 deletions app/src/application/components/d3Blocks/conceptHierarchy.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
@import '~@blueprintjs/core/dist/variables.less';

svg#conceptHierarchy {
background-color: @dark-gray2;
}

#container {
vertical-align: baseline;
}

rect {
stroke-width: 0;
}

.breadcrumbs {
margin: 20px 10px 10px 20px;

li {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}

.hierarchy-rect {
fill: @gray3;
}

.hierarchy-rect:hover {
fill: @gray2;
}

.ancestor-rect {
stroke: @green2;
stroke-width: 4;
}

.ancestor-rect:hover {
stroke: @green1;
}

.selected-rect {
fill: @green2;
}

.selected-rect:hover {
fill: @green1;
}

.dot-line {
stroke: @gray2;
stroke-width: 1;
stroke-dasharray: 3, 2;
}

#tooltip {
pointer-events: none;

text {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}

#tooltip_content {
fill: @light-gray1;
font-size: 15px;
text-anchor: middle;

tspan {
alignment-baseline: hanging;
}
}

#tooltip_background, #tooltip_pointer {
fill: black;
opacity: 0.85;
}
Loading

0 comments on commit 729961b

Please sign in to comment.