Play store onebox issue


(ForgotPants) #1

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?


(Jeff Atwood) #2

The oneboxer for Google Play should probably be revisited for improvements. Community PRs welcome in this area!


(Sam Saffron) #3

this looks like a oneboxer bug to me.


(Ahmad Mushtaq) #4

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:

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


(Sam Saffron) #5

Sounds like a fine solution.


(Ahmad Mushtaq) #6

created a pull request:
https://github.com/discourse/onebox/pull/259


(Gerhard Schlager) #7

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.


(Ahmad Mushtaq) #8

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.



(Ahmad Mushtaq) #9

So this is how it now shows with that pull request:


(Sam Saffron) #10

Way too much text, you need to truncate to something way shorter


(Ahmad Mushtaq) #11

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


(Jeff Atwood) #12