-
Notifications
You must be signed in to change notification settings - Fork 941
Conversation
|
||
{{#if health}} | ||
<span> - Health: <b>{{health}}</b> <image class="zci--hearthstone--icon" src="http://hydra-media.cursecdn.com/hearthstone.gamepedia.com/1/17/Health_icon.png"/></span> | ||
{{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to use the imageProxy
helper for all images, see https://duck.co/duckduckhack/spice_handlebars_helpers#imageproxy
@Akryum This is a great first pass! Thanks for contributing 🍰 I've added some feedback and I'm sure other community leaders will check this out shortly. Feel free to ask any questions. Do you own the API endpoint? bytevortex.net |
@MrChrisW Thanks for the feedback! And yes I own bytevortex.net ;) |
@Akryum No problem! Happy to help. Great! |
Feedback applied! :) |
Thanks @Akryum, We'll just need to await a staff review or other feedback from the community! |
Ironed out some quirks. |
@Akryum 👍 |
Got a question: How are IA supposed to be translated/regionalized? |
@Akryum Good question! Right now all Instant Answers provide English results. Translation will come later, so initially we're moving forward with just English answers. |
This is looking pretty good so far, I have 2 concerns:
|
// Card Data | ||
// May (but very unlikely) return <undefined> values for : image_url, Has_card_type, Has_rarity, | ||
// Has_class, Has_mana_cost | ||
var card = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled with a normalize
function: https://duck.co/duckduckhack/spice_displaying#data-normalization
@moollaza I don't really think of a good way of restricting the trigger... A keyword blacklist maybe? |
I think that duckpan test modifies my .travis.yml all the time. :/ |
@Akryum can you throw this onto DDH1? Would like to see this design with other cards (esp. those with a fuller description). But I think we're almost there! |
@Akryum @abeyang sorry about that. Updated: https://ddh1.duckduckgo.com/?q=hearthstone+leeroy+jenkins+card&ia=hearthstone |
@abeyang I don't think we have |
Flavor text now has |
@abeyang @moollaza here you go! https://ddh9.duckduckgo.com/?q=hearthstone+tidecaller&ia=hearthstone looking good! |
Looks great! Would like a design sign-off and then we can merge it in 👍 |
@abeyang unfortunately the Info template doesn't allow for a We could add the markup to the description template, but unless we add additional CSS to shift it on the page it's going to look a little odd because the subtitle div will be contained in the I think this has been fixed in the updated templates, so perhaps we can leave it as-is and change it later? |
He means subheader @moollaza |
@chrismorast Do I put the flavor text subheader div in the content template or is there any property for that? |
Hi @Akryum , put that content in the subtitle property. We will be deploying an update to the template to allow for this within the next day or two. |
@Akryum sorry! I didn't realize you had updated this -- we don't get notified of commits, only comments! |
LGTM 👍 |
@Akryum I just noticed we're not using the CSS file -- can you make a PR to remove it? |
Nevermind I see what's happening. The text comes as HTML from the API. Probably best to use |
@Akryum congrats! It's live: https://duckduckgo.com/?q=hearthstone+murloc+warleader&ia=hearthstone Thanks again for taking the time to contribute! We really appreciate it. Feel free to stick around and comment/help on other PR's & Issues or even submit more Instant Answers! |
Hi! It seems that the card IA is no longer working. Is there any problem I can help with? |
@Akryum do you have any examples? I just tried and it worked: |
@moollaza It seems that some cards no longer display the IA like these: I just tested my api endpoint and it get quite slow sometimes. Has the IA a timeout? (I will see what I can do to speed up the api.) |
I have added a cache system to greatly speed up calls to my api so the IA works again after a few try (when the card cache is ready). |
@Akryum yes there's a default timeout of 5000ms. Your 3 examples all worked for me, so I guess everything is good now? |
Yes, evrything is working again :) |
Spice Pull Request
What does your Instant Answer do?
It shows infos about any Hearthstone card with a thumbnail.
What problem does your Instant Answer solve (Why is it better than organic links)?
It allows to get instantly main informations like what a card does, without searching in a database or a wiki.
What is the data source for your Instant Answer? (Provide a link if possible)
Gamepedia Hearthstone Wiki
http://hearthstone.gamepedia.com/
Why did you choose this data source?
It seems to be the most accurate, and has image for every card.
Are there any other alternative (better) data sources?
Not better alternatives:
http://hearthstonejson.com/
http://hearthstoneapi.herokuapp.com/
What are some example queries that trigger this Instant Answer?
hearthstone leeroy
hearthstone tidecaller
hearthstone murloc warleader
Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
Gamers!
Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
No.
Which existing Instant Answers will this one supersede/overlap with?
None I can think of.
Are you having any problems? Do you need our help with anything?
No thanks. :)
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?
The API is a Mediawiki API. A Warranty disclaimer applies.
Where did you hear about DuckDuckHack? (For first time contributors)
On the duckduckgo timeline (https://duckduckgo.com/about). :)
What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
Checklist
Please place an 'X' where appropriate.