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

Conversation

daniel-wer
Copy link
Member

@daniel-wer daniel-wer commented Jan 21, 2019

This PR redesigns the dataset gallery/spotlight view and makes it a dedicated publication gallery. Datasets that are not part of a publication, are not shown. A publication consists of a name, description and a single or multiple published datasets. The publications are sorted by publicationDate (descending). Each dataset has a name and scale, but can also contain more details such as species, acquisition method and brain-region. Although the dataset details can contain arbitrary json in the backend, the frontend now expects a "standardized" format like:

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

The search box currently only searches through the dataset properties. Ideally, users could search for the publication title/description as well, but I'm not sure how to decide whether the search query should apply to the publications or datasets, then.

I'm also not quite sure how to best incorporate a possible publication image, yet.

Open for design feedback :)

publication-gallery

URL of deployed dev instance (used for testing):

Steps to test:

  • Check out locally and insert publications and dataset details using pgadmin:
insert into webknossos.publications(_id, publicationDate, imageUrl, title, description) values('5c3c9ec895010095014759fd',NOW(),'https://webknossos.org/images/oxalis.svg','Dummy Title that is usually very long and contains highly scientific terms', 'This is a wonderful dummy publication, it has authors, it has a link, it has a doi number, those could go here');

update webknossos.datasets set _publication = '5c3c9ec895010095014759fd', details='{"species":"Mouse", "brainRegion":"lateral parietal association cortex P46", "acquisition":"Raw CLSM data"}' where _id = '<INSERT_DATASET_ID>' ;
  • Repeat the update clause for as many dataset ids that you like. Take care when visiting the spotlight page while being logged out - only public datasets can be seen in that case.
  • You should be able to see the publication gallery, hover over the published datasets to see a dataset preview, or click onto one to set it as active.
  • Hover over the right large thumbnail, a "Click to View" hint should appear. Clicking it should open the dataset.
  • Enter a search term. The datasets should be filtered accordingly.

Issues:


@daniel-wer daniel-wer self-assigned this Jan 21, 2019
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I had this review pending and forgot to submit it (and I think, my typed text is also gone 🤔)

The redesign looks really good! If datasets without publications are filtered away, the mhlab instance will have a blank page then, right? Or is the filtering configurable?

const activeDataset = hoveredDataset || selectedDataset;
const { publication } = activeDataset;
// This method will only be called for datasets with a publication, but Flow doesn't know that
if (publication == null) return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd even throw an error instead of returning null, since this should never happen, anyway. If it happens for some reason, we will notice it faster.

@normanrz
Copy link
Member

I played around with it on https://redesignspotlight.webknossos.xyz. To me it feels weird that you first have to click on a dataset and then click again on the larger thumbnail to get into the data.
Maybe it would be nicer to switch the large thumbnail when hovering on the smaller one (and not back when you leave it) and a click on the small thumbnail brings you into the data directly.
And I think the small thumbnails could be a tad larger.

@daniel-wer daniel-wer merged commit dad5a33 into master Jan 24, 2019
@daniel-wer daniel-wer deleted the redesign-spotlight branch January 24, 2019 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more entities to datasets Display publications as entities on demo server
4 participants