Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PLOS Search (research articles) #153
Plugin functionality: this plugin uses the query to find the top 5 related research articles from PLOS Journals, the most influential nonprofit open access publisher. It lists the title, authors, journal and year of publication providing a direct link to content. The more_at link points to PLOS' search page with results for the same query.
Plugin data source (API): PLOS Search API. It needs an API key to work.
Example queries: A simple example query is
The API provides more complex queries, so you can search for papers about dinosaurs that have metabolism in the title:
Plugin Audience: mainly scientists, but since all articles are open access it is useful for everybody.
Have you done any cross-browser testing? No, just ran on Firefox 20.0 and Chromium 25.0.1364.160.
Any issue you're having? What should be the default behaviour if the query returns 0 articles? Should it show the zeroclickinfo box and report that it found no result or it should simply not appear?
Thanks for starting this spice. I'd never heard of PLOS before, but it looks like an excellent resource and a great addition to duckduckgo. Let me answer your question first: if there are no results found, it's best to return without triggering a ZCI. There's no reason to take up space on a results page just to say that we couldn't find something. I would also remove the "Found x results in x seconds." It's fun to see sometimes, but our end users just experienced that x second wait firsthand ;-). I would also remove the "Data provided by PLOS" fine print text. We usually use a cannonical header style in the form "user query (Spice)". So in this case, "research articles:dinasaurs title:metabolism (PLOS)".
It'd be extra cool if we could get links to these sources. I notice that the API is returning an
Finally, I think it might be nice to wrap this inside an list to show bulletpoints for each result.
Please let me know what you think of these ideas :-)
I just wanted to add that also we should probably remove the bolding on the text because we save that for exact matches in results. Otherwise this plugin looks awesome (nicely done @nelas ) and I agree with your suggestions @nospampleasemam
Btw I noticed in the last result, it returned a value of "undefined" in the string -- we prefer to simply not show anything rather than show its "undefined".
Also, @nelas I really appreciate that you used the PR template!
Hi @nospampleasemam and @moollaza! Comments inline:
Cool! I'll change this.
This was only an extra candy :p
This is to follow PLOS API display policy. They ask to show "Data Provided by PLOS" next to the results. Maybe it can be placed floating to the right so that the results are the first thing you read, any suggestions?
Ok! I will fix this.
This is already happening :) Each citation is a clickable direct link to the article.
It is a list, I just think citations looked better without the bullet points, just white space and padding. I'll give it another try, maybe an ordered list makes more sense in this case.
Ah, I didn't know. Normally the title is the most important part to be read, so I'll make it stand in front with font size or maybe as a regular link color? I switched the
Thanks for getting this, I had not noticed it! Probably this data is missing (and it shouldn't, since the articles need to have a journal), so I can add a fallback for this just in case and notify them.
Great, thanks for the comments! I'll push some commits later this week. Let me know if you have more suggestions!
Cool! Just so you guys know, I shot PLOS an email, explaining our use case and asking if they would consider our alternate attribution style - as well as showcasing our integration with the PLOS API products (which they mention on their API FAQ).
Looking forward to the updates!
Updated font sizes and changed the colour. Now it looks more like the original, but better I guess. Does it need to look clickable? (hovering shows underline already)
Also, ZCI now only shows up if there are results and only write journal names if they are defined.
My last two commits are showing "Failure: The Travis build failed". Maybe I messed up something.. :/
@nelas sorry I meant I didn't like the blue underline on the black text below, I still liked the blue text and blue underline on the title! That way it looks clickable. Sorry for the confusion.
To be clear I think it should look like #3,4,5 in the above image, and then on hover, just add the highlight to the title.
Does that make sense?
Re Travis, ignore that, its something new we're currently working on, you did nothing wrong.
An useful feature is to have the article abstract easily accessible. When skimming through literature the title is the most important, but sometimes it is not enough to decide if we want to read the article or not. So being able to have a look at the abstract on the fly is great to decide whether it is worth it to open the link.
Screenshot below shows how I implemented this, with a clickable "[+]" to toggle the abstract. It only shows if there is an abstract. Item 4 shows the opened state after clicking (default is hidden) and item 5 just before clicking, with hover info.
Additional features also shown above are the inclusion of volume/issue of the journal (a standard for scientific citations) and article stats on hovering the link (not really necessary, but kind of cool; specially because PLOS was one of the first to display this type of data publicly).
I tried my best not to clutter the visuals. Opinions?
@nelas here's my thoughts on those features:
Hover info - I do like showing the number of views, but I'm not sure how relevant that is to the user -- is that meant to be an indicator of how _good_ the article will be? (because many others have looked at it?)
Regarding the implementation -- are you using the title tag? I see its in a black box, so I couldn't quite tell. If the styling was modified to look that way, I think it would be best to just use the default title tag styling for the sake of visual consistency with respect to the other plugins that also utilize title tags.
Abstract Toggle - I'm a little torn as to whether or not we should use this feature. Although I do personally like it - we try to keep the plugins as simple as possible. The idea is that the ZCI result should give you exactly what you're looking for without clicking (hence the name ZeroClick) and if you're going to click it should usually be to pass the user along to the source or the result. How do you feel about putting the abstract in the title tag? I think it keeps things simple.
I'm using the title tag for hoverings, it is just my desktop style that makes them a black box.
The number of views is not a good indicator of how good an article is. Just how popular... and since recently we had no idea of how popular an article could be. This is why it is cool, but I also fail to see how it might help the user decide; the abstract is more important.
Abstract: breaking the click limits was my fear with the toggle, but when I tried putting it in the title tag it felt a bit cumbersome to read it. I will give it another shot.
Ah! I did not know about the spice.css! Will be a pleasure to transfer, I suffered a bit with the inline styling.
@nelas glad to hear that you too cringe at the sight of inline styling
I agree on the title tag abstract looking bad. I think we can go ahead and skip the abstract altogether for now. If any users raise a concern about it we can revisit the idea.
How does that sound?
@nelas hey just playing around with the plugin a little more and I have a few more thoughts:
Sorry for all the changes, just trying to see if we can maximize the benefit to the user.
What do you think about those changes?
@moollaza sorry for the absence!
@nelas I think that looks great! Styling can remain as it is. I think 5 results is best. If its really necessary we could show more in a div that expands (like HackerNews does).
Also, did you happen to email PLOS about the "Data Provided by Plos" requirement for their API? We tend to never add extra attribution like that to the results because we have the more at link which suggests the source and where they can go for further results.
Would you mind reaching out to them to see if they'll make an exception for our use case? We also do note the source in the plugin MetaData which is visible in the source code and the Goodies page...
@nelas sorry for the delays with respect to you plugin!
We've been very busy that last few months working on the new Spice v2 platform. We've made significant changes and updated our documentation (mostly) in Spice2.md.
If you're still willing to to work on this plugin I would ask that you please upgrade it to the new Spice v2 style and then we can get this released!
For now I think it's best to remove the "Data Provided by Plos" attribution so we can move forward. We really don't add extra attribution and it has not been a problem with any other plugins or API's. We do have the "More at" link and the metadata which indicate the source.
Again, apologies for all the delays!