commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
1.02k stars 1.23k forks source link

Show thumbnail of P18 when asking the user to select a Wikidata item #3106

Closed nicolas-raoul closed 5 years ago

nicolas-raoul commented 5 years ago

This makes the choice much easier, especially when no label/description is available for the user's locale:

bitmap

This should be used:

Most Wikidata items used in depictions statements have an image, it can be retrieved easily from the item's QID by requesting the P18 property. If there is no image, just show empty space. Optional: In the rare cases where several images are present (that happens even though it is against the rules), choose the one with the highest Wikibase rank.

vanshikaarora commented 5 years ago

@nicolas-raoul I have fixed the issue here.

Please check :-)

Preview

Screenshot_20190806_135217

nicolas-raoul commented 5 years ago

in my tests it shows the same thumbnail several times.

2019年8月6日(火) 17:26 Vanshika Arora notifications@github.com:

@nicolas-raoul https://github.com/nicolas-raoul I have fixed the issue here https://github.com/commons-app/apps-android-commons/pull/2970/commits/bcd457722efe69780366f61f2f3148549577e29e .

Please check :-) Preview

[image: Screenshot_20190806_135217] https://user-images.githubusercontent.com/34261945/62523652-e2e48680-b851-11e9-810f-ccde3dbb3950.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/commons-app/apps-android-commons/issues/3106?email_source=notifications&email_token=AAAYKBSVPX66EKEKLBANP2LQDEYT3A5CNFSM4II2NY3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ULDMA#issuecomment-518566320, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAYKBU3YKYLCBD6JJS6GPDQDEYT3ANCNFSM4II2NY3A .

vanshikaarora commented 5 years ago

@nicolas-raoul are you on the latest commit?

nicolas-raoul commented 5 years ago

@vanshikaarora Yes, latest commit bcd457722

nicolas-raoul commented 5 years ago

adb-screenshot

nicolas-raoul commented 5 years ago

Also, would you mind making the thumbnails a bit larger, maybe something like 70 pixels? :-)

vanshikaarora commented 5 years ago

Sure :-)

ashishkumar468 commented 5 years ago

Also, ux wise, shall we add a placeholder image for even those items which do not have the images the ui looks a little zig-zaggy, and would be nice to add a very light colored divider, what do you say @nicolas-raoul ?

vanshikaarora commented 5 years ago

@vanshikaarora Yes, latest commit bcd4577

Oh then I guess all of them have same label hence same value of url like

https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Guion_Bluford.jpg/50px-Guion_Bluford.jpg
nicolas-raoul commented 5 years ago

Yes, a placeholder based on this image would make the list more coherent and beautiful: https://commons.wikimedia.org/wiki/File:Wikidata-logo.svg

nicolas-raoul commented 5 years ago

The thumbnail should be retrieved using the Wikidata QID, not the label. In my screenshot above, the first item is Q312 (Apple Computer, Inc) so you must:

  1. Get the P18 property of Q312
  2. Retrieve the thumbnail of that P18 URL
vanshikaarora commented 5 years ago

I have added this placeholder https://commons.wikimedia.org/wiki/File:Wikidata-logo.svg

nicolas-raoul commented 5 years ago

With the latest commit, here is what I see for a search on "apple": adb-screenshot

nicolas-raoul commented 5 years ago

Also, during upload: adb-screenshot1 adb-screenshot The items "Windsurfing na Island Games 2009" and "Windsurfing Chiemsee Produktions v Boots" do not have a P18, sothey should not have a thumbnail: https://www.wikidata.org/wiki/Q9375177 https://www.wikidata.org/wiki/Q17102390

nicolas-raoul commented 5 years ago

Also getting wrong thumbnail during upload (using latest commit): Screenshot_20190819-182252_Commons Here is the thumbnail which should appear: https://www.wikidata.org/wiki/Q843426

nicolas-raoul commented 5 years ago

Implemented by @vanshikaarora I have created two issues for the small bugs I have found, but we can close this main issue :-)