Oneboxing links from the Play store generally end with a ‘0’ for some reason,
This seems to be happening on Meta as well. Also, is there a way to set a maximum character limit for oneboxing from third party sites?
Oneboxing links from the Play store generally end with a ‘0’ for some reason,
This seems to be happening on Meta as well. Also, is there a way to set a maximum character limit for oneboxing from third party sites?
The oneboxer for Google Play should probably be revisited for improvements. Community PRs welcome in this area!
this looks like a oneboxer bug to me.
If no one is looking into this bug, I would like to work on it. Since I am new to ruby & rails my progress will be slow.
I am able to reproduce it on my development install:
That 0 is the price of the item, since them item is free, its zero:
https://github.com/discourse/onebox/blob/master/templates/googleplayapp.mustache
for paid items, the price shows up correctly:
Perhaps for free items it should show string “free” instead of zero. if we have such a string in discourse, I will create the pull request to onebox
Sounds like a fine solution.
created a pull request:
I’m sorry, but this solution seems wrong to me. Ideally the price shouldn’t be visible at all if it’s free. Adding the word “Free” opens a can of worms since it’s currently not possible (and probably not needed) to add translations.
Moreover, I noticed that the title (which should be the most important thing) isn’t shown at all (it’s missing in the template). The developer of an app shouldn’t be the heading of the onebox.
Multiple other onebox templates are using english text, examples at the end.
I think showing free when an item is actually free would make sense. About the title, I can update the commit and put the title in the mustache template.
https://github.com/discourse/onebox/blob/master/templates/githubblob.mustache
https://github.com/discourse/onebox/blob/master/templates/stackexchange.mustache
Way too much text, you need to truncate to something way shorter
I made the description text shorter. Now how it looks like:
The number of chars for description is in the google play app engine itself, perhaps the work of making sure the description text is not too big could be off-loaded to the framework.
This was merged into discourse/onebox
https://github.com/discourse/onebox/commit/3ffcdff566bf0f1ed8addfb50fa4c5801098d11e
I think I will make a google play movie & book store engines as well… just a learning exercise