Skip to content

Commit 47d8feb

Browse files
authored
Merge pull request #187 from MetaCell/development
Development to master
2 parents e66ce74 + a324e70 commit 47d8feb

8 files changed

Lines changed: 57 additions & 825 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"axios": "^0.21.1",
2525
"fs": "^0.0.1-security",
2626
"gh-pages": "^3.2.3",
27-
"jest": "27.5.1",
27+
"jest": "26.6.0",
2828
"jest-image-snapshot": "4.5.1",
2929
"jest-puppeteer": "6.1.0",
3030
"material-ui-dropzone": "^3.5.0",

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
3939
rel="stylesheet"
4040
/>
41-
<title>SDS Viewer</title>
41+
<title>SPARC Dataset (SDS) Viewer</title>
4242
</head>
4343
<body>
4444
<noscript>You need to enable JavaScript to run this app.</noscript>

public/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"short_name": "SDS Viewer",
3-
"name": "SDS Viewer",
2+
"short_name": "SPARC Dataset (SDS) Viewer",
3+
"name": "SPARC Dataset (SDS) Viewer",
44
"icons": [
55
{
66
"src": "favicon.ico",

src/components/Sidebar/Footer.js

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
import Plus from '../../images/plus.svg';
22
import { ADD_DATASET } from '../../constants';
3-
import { Box, Button } from '@material-ui/core';
3+
import { Box, Button, Typography, Link } from '@material-ui/core';
44
import config from "./../../config/app.json";
55

66
const SidebarFooter = (props) => {
77
return (
8-
<Box display="flex" justifyContent="space-between">
9-
<Button
10-
variant='contained'
11-
disableElevation
12-
color='primary'
13-
style={{ "width" : "45%","minWidth" : "45%" }}
14-
onClick={() => props.setOpenUploadDialog(true)}
15-
>
16-
<img src={Plus} alt='Plus' />
17-
{ADD_DATASET}
18-
</Button>
19-
<Button
20-
variant='contained'
21-
disableElevation
22-
color='primary'
23-
style={{ "width" : "45%", "minWidth" : "45%" }}
24-
onClick={() => props.setOpenDatasetsListDialog(true)}
25-
>
26-
{config.text.datasetsButtonText}
27-
</Button>
8+
<Box>
9+
<Box display="flex" justifyContent="space-between">
10+
<Button
11+
variant='contained'
12+
disableElevation
13+
color='primary'
14+
style={{ "width" : "45%","minWidth" : "45%" }}
15+
onClick={() => props.setOpenUploadDialog(true)}
16+
>
17+
<img src={Plus} alt='Plus' />
18+
{ADD_DATASET}
19+
</Button>
20+
<Button
21+
variant='contained'
22+
disableElevation
23+
color='primary'
24+
style={{ "width" : "45%", "minWidth" : "45%" }}
25+
onClick={() => props.setOpenDatasetsListDialog(true)}
26+
>
27+
{config.text.datasetsButtonText}
28+
</Button>
29+
</Box>
30+
<Box display="flex" justifyContent="center">
31+
<Typography variant='body1'><Link href={config.docs_url}>User manual</Link></Typography>
32+
</Box>
33+
<Box display="flex" justifyContent="center">
34+
<Typography variant='caption'>Powered by MetaCell</Typography>
35+
</Box>
2836
</Box>
2937
);
3038
};

src/config/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"datasets_url": "https://cassava.ucsd.edu/sparc/datasets/",
33
"repository_url": "https://cassava.ucsd.edu/sparc/preview/exports/",
4+
"docs_url": "https://github.com/MetaCell/sds-viewer/blob/development/README.md",
45
"available_datasets": "curation-export-published.ttl",
56
"groups" : {
67
"order" :

src/utils/Splinter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class Splinter {
220220
if ( !existingLing ) {
221221
const a = this.nodes.get( link.source );
222222
const b = this.nodes.get( link.target );
223-
if ( a && b && ( a?.type !== rdfTypes.Award.key && b?.type !== rdfTypes.Award.key )) {
223+
if ( a && b && ( a?.type !== rdfTypes.Award.key && b?.type !== rdfTypes.Award.key ) && !((a?.type === rdfTypes.Collection.key && a.children_counter < 1 ) || ( b?.type === rdfTypes.Collection.key && b.children_counter < 1))) {
224224
!a.neighbors && (a.neighbors = []);
225225
!b.neighbors && (b.neighbors = []);
226226
if ( !a.neighbors.find( n => n.id === b.id )){

src/utils/nodesFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function createImage(node) {
77
img.src = "./images/graph/files/" + extension + ".svg"
88
} else {
99
if ( node.type !== "Group" ) {
10-
img.src = (rdfTypes[String(node.type)]?.image !== "") ? rdfTypes[String(node.type)].image : rdfTypes.Unknown.image
10+
img.src = (rdfTypes[String(node.type)]?.image !== "") ? rdfTypes[String(node.type)]?.image : rdfTypes.Unknown?.image
1111
}
1212
}
1313
return img;

0 commit comments

Comments
 (0)