Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign dataset gallery as publication gallery #3653

Merged
merged 25 commits into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1db5ab1
redesign spotlight view
philippotto Dec 19, 2018
ae67f22
add publication to dataset
fm3 Jan 14, 2019
4a67f06
Merge branch 'master' into publications
fm3 Jan 14, 2019
8b010c6
update migration guide, schema number
fm3 Jan 14, 2019
04ed774
new snapshots + test db
fm3 Jan 14, 2019
d806c70
scalafmt
fm3 Jan 14, 2019
e7c608d
Merge branch 'master' of github.com:scalableminds/webknossos into red…
daniel-wer Jan 15, 2019
95ebe82
minor cleanup
daniel-wer Jan 15, 2019
53b6551
Merge branch 'publications' of github.com:scalableminds/webknossos in…
daniel-wer Jan 15, 2019
25de7c3
first version of spotlight redesign with grouped publications
daniel-wer Jan 16, 2019
5a84592
Merge branch 'master' of github.com:scalableminds/webknossos into red…
daniel-wer Jan 16, 2019
3f8de31
make dataset gallery publication gallery
daniel-wer Jan 21, 2019
7a6488d
add type for datasetDetails
daniel-wer Jan 21, 2019
a6040ad
refresh snapshots
daniel-wer Jan 21, 2019
08e4178
Merge branch 'master' into redesign-spotlight
philippotto Jan 23, 2019
c8887c8
Merge branch 'master' of github.com:scalableminds/webknossos into red…
daniel-wer Jan 23, 2019
b1d31d8
Merge branch 'redesign-spotlight' of github.com:scalableminds/webknos…
daniel-wer Jan 23, 2019
83d4bf7
apply PR feedback, enlarge thumbnails, click on mini-thumbnail opens …
daniel-wer Jan 23, 2019
1e0a890
refresh snapshots
daniel-wer Jan 23, 2019
e903c1d
Merge branch 'master' of github.com:scalableminds/webknossos into red…
daniel-wer Jan 24, 2019
613d428
also show segmentation in mini thumbnail, update changelog
daniel-wer Jan 24, 2019
f8007a5
Merge branch 'master' of github.com:scalableminds/webknossos into red…
daniel-wer Jan 24, 2019
993bd67
update migrations.md
daniel-wer Jan 24, 2019
1e48564
fix empty text if there are not featured publications
daniel-wer Jan 24, 2019
85fde22
refresh snapshots
daniel-wer Jan 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).

### Changed

- The Dataset Gallery was redesigned to be a Publication Gallery instead. It will feature scientific publications together with their published datasets and information such as the species, brain region or acquisition method of such datasets. [#3653](https://github.com/scalableminds/webknossos/pull/3653)
- Annotations for non-public datasets can now be shared using the "Share" functionality without making the dataset public. [#3664](https://github.com/scalableminds/webknossos/pull/3664)
- Statistics are now separated by organization, rather than showing the webKnossos instance’s totals. [#3663](https://github.com/scalableminds/webknossos/pull/3663)

Expand Down
8 changes: 7 additions & 1 deletion MIGRATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ This project adheres to [Calendar Versioning](http://calver.org/) `0Y.0M.MICRO`.
User-facing changes are documented in the [changelog](CHANGELOG.md).

## Unreleased
-
- WebKnossos has a publication gallery now. There is no public interface to create publications yet, but instead those need to be inserted into the database directly.
Publications and additional dataset properties that are displayed in the gallery as well, can be inserted as follows:
```
insert into webknossos.publications(_id, publicationDate, imageUrl, title, description) values('5c3c9ec895010095014759fd', NOW(), '<LINK_TO_IMAGE>', '<TITLE>', '<DESCRIPTION>');

update webknossos.datasets set _publication = '5c3c9ec895010095014759fd', details='{"species":"<e.g. Mouse>", "brain-region":"<e.g. cortex>", "acquisition":"<e.g. Raw CLSM data>"}' where _id = '<DATASET_ID>' ;
```

### Postgres Evolutions:
- [037-add-publications.sql](conf/evolutions/037-add-publications.sql)
Expand Down
17 changes: 17 additions & 0 deletions app/assets/javascripts/admin/api_flow_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,40 @@ export type APITeam = {
+organization: string,
};

type APIPublication = {
+created: number,
+description: string,
+id: string,
+imageUrl: string,
+publicationDate: number,
+title: string,
};

export type APIDatasetId = {
+owningOrganization: string,
+name: string,
};

export type APIDatasetDetails = {
+species?: string,
+brainRegion?: string,
+acquisition?: string,
};

type APIDatasetBase = APIDatasetId & {
+allowedTeams: Array<APITeam>,
+created: number,
+dataStore: APIDataStore,
+description: ?string,
+details: ?APIDatasetDetails,
+isEditable: boolean,
+isPublic: boolean,
+displayName: ?string,
+logoUrl: ?string,
+lastUsedByUser: number,
+isForeign: boolean,
+sortingKey: number,
+publication: ?APIPublication,
};

export type APIMaybeUnimportedDataset = APIDatasetBase & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ class DatasetActionView extends React.PureComponent<Props, State> {
) : null}
</React.Fragment>
) : null}
<a
href={`/datasets/${dataset.owningOrganization}/${dataset.name}/view`}
<Link
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/view`}
title="View Dataset"
>
<Icon type="eye-o" />View
</a>
</Link>
{!dataset.isForeign ? (
<React.Fragment>
<a
Expand Down
10 changes: 5 additions & 5 deletions app/assets/javascripts/dashboard/dashboard_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Request from "libs/request";

const TabPane = Tabs.TabPane;

const validTabKeys = ["datasets", "advanced-datasets", "tasks", "explorativeAnnotations"];
const validTabKeys = ["publications", "advanced-datasets", "tasks", "explorativeAnnotations"];

type OwnProps = {
userId: ?string,
Expand Down Expand Up @@ -57,7 +57,7 @@ export const datasetCache = {
};

export const urlTokenToTabKeyMap = {
gallery: "datasets",
gallery: "publications",
datasets: "advanced-datasets",
tasks: "tasks",
annotations: "explorativeAnnotations",
Expand All @@ -69,7 +69,7 @@ class DashboardView extends React.PureComponent<Props, State> {

const lastUsedTabKey = localStorage.getItem("lastUsedDashboardTab");
const isValid = lastUsedTabKey && validTabKeys.indexOf(lastUsedTabKey) > -1;
const defaultTab = this.props.isAdminView ? "tasks" : "datasets";
const defaultTab = this.props.isAdminView ? "tasks" : "publications";

const cachedDatasets = datasetCache.get();

Expand Down Expand Up @@ -151,7 +151,7 @@ class DashboardView extends React.PureComponent<Props, State> {

getTabs(user: APIUser) {
if (this.props.activeUser) {
const isAdminView = this.props.isAdminView;
const { isAdminView } = this.props;

const datasetViewProps = {
user,
Expand All @@ -162,7 +162,7 @@ class DashboardView extends React.PureComponent<Props, State> {

return [
!isAdminView ? (
<TabPane tab="Dataset Gallery" key="datasets">
<TabPane tab="Publications" key="publications">
<DatasetView {...datasetViewProps} dataViewType="gallery" />
</TabPane>
) : null,
Expand Down
216 changes: 0 additions & 216 deletions app/assets/javascripts/dashboard/dataset_panel.js

This file was deleted.

8 changes: 3 additions & 5 deletions app/assets/javascripts/dashboard/dataset_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as React from "react";

import type { APIUser, APIMaybeUnimportedDataset } from "admin/api_flow_types";
import AdvancedDatasetView from "dashboard/advanced_dataset/advanced_dataset_view";
import GalleryDatasetView from "dashboard/gallery_dataset_view";
import PublicationView from "dashboard/publication_view";
import Persistence from "libs/persistence";
import * as Utils from "libs/utils";

Expand Down Expand Up @@ -86,9 +86,7 @@ class DatasetView extends React.PureComponent<Props, State> {
}

renderGallery() {
return (
<GalleryDatasetView datasets={this.props.datasets} searchQuery={this.state.searchQuery} />
);
return <PublicationView datasets={this.props.datasets} searchQuery={this.state.searchQuery} />;
}

renderAdvanced() {
Expand Down Expand Up @@ -144,7 +142,7 @@ class DatasetView extends React.PureComponent<Props, State> {
return (
<div>
{adminHeader}
<h3 className="TestDatasetHeadline">Datasets</h3>
<h3 className="TestDatasetHeadline">{isGallery ? "Publications" : "Datasets"}</h3>
<div className="clearfix" style={{ margin: "20px 0px" }} />
<Spin size="large" spinning={this.props.datasets.length === 0 && this.props.isLoading}>
{content}
Expand Down
Loading