Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Medicine #1451

Closed
wants to merge 26 commits into from
Closed

Medicine #1451

wants to merge 26 commits into from

Conversation

Bjoern
Copy link

@Bjoern Bjoern commented Jan 27, 2015

What does your Instant Answer do?
Provide details about medicine

What problem does your Instant Answer solve (Why is it better than organic links)?
Medicine can be quickly identified and detailed information can be provided

What is the data source for your Instant Answer? (Provide a link if possible)
http://myHealthbox.eu

Why did you choose this data source?
Promotion of myHealthbox.eu

Are there any other alternative (better) data sources?

What are some example queries that trigger this Instant Answer?
aspirin dosage

Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
patients

Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
https://duck.co/ideas/idea/4607/looking-for-developer-to-help-with-ddg-spice-insta

Which existing Instant Answers will this one supersede/overlap with?

Are you having any problems? Do you need our help with anything?
Yes, not sure how make a detail snippet for the leaflet information.

What are the terms of use for the API? Will DuckDuckGo need specific authorization (e.g. an API key)? Are there any costs associated with API usage?
No costs

Where did you hear about DuckDuckHack? (For first time contributors)

What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
Just a draft so far:
myhealthboxddg

Checklist

Please place an 'X' where appropriate.

[] Added metadata and attribution information
[X] Wrote test file and added to t/ directory
[] Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)
[] Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)
[] Tested cross-browser compatibility

    Please let us know which browsers/devices you've tested on:
    - Windows 8
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 10

    - Windows 7
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 8
        [] IE 9
        [] IE 10

    - Windows XP
        [] IE 7
        [] IE 8

    - Mac OSX
        [] Google Chrome
        [] Firefox
        [] Opera
        [] Safari

    - iOS (iPhone)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - iOS (iPad)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - Android
        [] Firefox
        [] Native Browser
        [] Google Chrome
        [] Opera

@MrChrisW
Copy link
Collaborator

@Bjoern Looks like you've accidentally included some of your other code in this PR? Did you mean to?

I'll try my best to help with the template issues when I get a free moment 👍

@Bjoern
Copy link
Author

Bjoern commented Jan 27, 2015

Hi,

yeah, sorry. I guess the problem is that I had developed my first IA in
the master branch (UV Index), then I branched medicine from that. Or
maybe I shouldn't have merged upstream/master into the branch :-/

My git fu is not strong enough to fix that immediately, but I can look
into it. Always good to learn more about git...

I made the pull request because I was asked to do so on the mailing
list, to make it easier to discuss problems. It is not finished yet.

Björn

On 27/01/15 17:24, Chris Wilson wrote:

@Bjoern https://github.com/bjoern Looks like you've accidentally
included some of your other code in this PR? Did you mean to?

I'll try my best to help with the template issues when I get a free
moment 👍


Reply to this email directly or view it on GitHub
#1451 (comment).

@MrChrisW
Copy link
Collaborator

Ok, after a little research I've usually found it easier to use the "products" template group and use the buy option in options: to specify the handlebars template to display tile content.

However @moollaza probably knows a better way (best practice) 😄

@MrChrisW
Copy link
Collaborator

@Bjoern That's fine! I thought that was the case! I've been following the mailing list discussion, we can still review the code here which helps!

You can simply do a git rm <file> and remove the UV files. Then commit and push (in this branch)

@Bjoern
Copy link
Author

Bjoern commented Jan 30, 2015

I'll try the product group. Meanwhile, here is a screenshot of the Q/A instant answer, which looks like a good fit. But I couldn't find the code (it's not the maven IA I think, something else was triggered here).
ddg_qa

Or is there perhaps a way to override styles of existing templates? I think the 'text' group would work well if the titles wouldn't be cut off.

@@ -11,7 +11,7 @@
.replace(/^\s*github\s+/, "");

var results = api_result.data.repositories;

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this also needs to be removed from the PR?

@moollaza
Copy link
Member

@Bjoern unfortunately the StackOverflow Instant Answer is closed-source which is why you can't find the code.

As you mentioned, the text template group is ideal for this kind of data. You're also able to provide a CSS file that can be used to modify the UI if necessary. I'd say go ahead with the text template group for now so we can see how it looks. If we need to make any adjustments our designers will be able to tell you what needs to be adjusted.

@Bjoern
Copy link
Author

Bjoern commented Feb 2, 2015

I managed to correct the title via CSS (smaller font, no cropping), but is there also a way to get linebreaks into the description of a text_item? Thanks!

@moollaza
Copy link
Member

moollaza commented Feb 2, 2015

Hi @Bjoern,

Thanks a lot for making this, we really appreciate you taking the time to contribute.

After discussing this PR with the team, playing around with the Spice and investigating the API a little more, we've decided that MyHealthBox isn't a good fit for what we want out of a medicine/dosage Instant Answer.

Right now the API doesn't give very much info (only about 5 data points) and there's no good place to direct users for more info because MyHealthBox requires a signup and just links to a very long PDF, so unfortunately I don't see this becoming a very helpful Instant Answer.

I'm very sorry that your time and effort has been wasted, but I hope you can understand our reasoning for closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants