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

Added links to databases to pathway view title #1023

Merged
merged 10 commits into from
Aug 21, 2018

Conversation

MichaelWrana
Copy link
Collaborator

@MichaelWrana MichaelWrana commented Aug 17, 2018

Fixes #1018
Fixes #930

Reversed the order of Pathway name | Datasource => Datasource | Pathway name.
Removed "Unknown Title" text if it were to appear.

The map should be correct for all datasources as of right now, but there is also a string similarity calculation included as backup in case the names change in future.

screen shot 2018-08-20 at 12 00 23 pm
screen shot 2018-08-20 at 12 00 38 pm
screen shot 2018-08-20 at 12 00 43 pm

@jvwong
Copy link
Member

jvwong commented Aug 17, 2018

Just curious where did you get the URLs for the databases?

@MichaelWrana
Copy link
Collaborator Author

Googled it for most of them. If I couldn't find a direct link, the link is to the journal article for the database (ex: pid goes to https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2686461/)

@jvwong
Copy link
Member

jvwong commented Aug 17, 2018

OK, I'm fine with the decision for those with no live URL.

@MichaelWrana
Copy link
Collaborator Author

Update: Turns out this doesn't actually fix #930

@maxkfranz
Copy link
Member

How about using : instead of |? With the DB name on the left, it looks like the title of the site beside the PC logo. Maybe a bit more spacing between the DB name and the logo too.

@d2fong
Copy link
Member

d2fong commented Aug 20, 2018

Also, maybe we can make all links consistent and use the plain link style that the tooltips and the protein info box uses

@MichaelWrana
Copy link
Collaborator Author

Something like this?

screen shot 2018-08-20 at 10 36 32 am

@maxkfranz
Copy link
Member

Yes, but I think Dylan meant just the blue underline on links.

@d2fong
Copy link
Member

d2fong commented Aug 20, 2018

There should be a plain-link class included by the base css file we use. I think you can just use that.

@@ -84,9 +86,32 @@ class Pathways extends React.Component {
}
}

baseNameToUrl(baseName){
Copy link
Member

Choose a reason for hiding this comment

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

I think this function belongs in datasource-url-map

const baseDatasource = pathway.datasource();
const databaseURL = this.baseNameToUrl(baseDatasource);
let baseName = pathway.name();
if(baseName.toLowerCase() === 'unknown title'){
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you can just change the default value returned by pathway.name(). What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't figure out where pathway.name() is being defined, do you know?

Copy link
Member

Choose a reason for hiding this comment

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

@d2fong
Copy link
Member

d2fong commented Aug 20, 2018

@jvwong thoughts on this?

@jvwong
Copy link
Member

jvwong commented Aug 20, 2018

Works for me!

@d2fong
Copy link
Member

d2fong commented Aug 20, 2018

Thoughts on the way that the name and title are displayed?

@jvwong
Copy link
Member

jvwong commented Aug 20, 2018

Actually, just a sec: Those database names aren't going to work: e.g. pid

@jvwong
Copy link
Member

jvwong commented Aug 20, 2018

'pid' is the only one - probably should be displayed as 'NCI-PID'

@MichaelWrana
Copy link
Collaborator Author

I think the names are based on metadata for the network:
In /src/client/models/pathway:

  datasource(){
    return _.get(this.raw, 'graph.pathwayMetadata.dataSource.0', 'Unknown datasource');
  }

I could add in a quick fix and directly change 'pid' to 'NCI-PID', but that seems like bad practice. Any ideas?

@jvwong
Copy link
Member

jvwong commented Aug 20, 2018

OK then - I am fine with all of this.

Notes for future: Datasource derived from traversal into pathway object. Should be improved with mapping file

@d2fong d2fong merged commit dd010e9 into PathwayCommons:development Aug 21, 2018
@gbader
Copy link
Member

gbader commented Aug 21, 2018

Hi - just noticed the move of the database name to be first. Users don't care about the database name - they want to see the pathway name first. Database groups, I'm sure, would like to see their name first, but they are secondary to users. Did you guys discuss that?

@d2fong
Copy link
Member

d2fong commented Aug 21, 2018

I think the initial proposal is in this issue, but I don't think we had any discussion about it.

#1018

@gbader
Copy link
Member

gbader commented Aug 21, 2018

Ok - we just need to add the links. The original title format and order was fine.

@jvwong
Copy link
Member

jvwong commented Aug 21, 2018

That was my suggestion to put the source: title- some titles are huge. Anyways, we can go with title: datasource.

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.

5 participants