Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item name not filled in toast #2882

Closed
nicolas-raoul opened this issue Apr 16, 2019 · 32 comments · Fixed by #3569
Closed

Item name not filled in toast #2882

nicolas-raoul opened this issue Apr 16, 2019 · 32 comments · Fixed by #3569

Comments

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Apr 16, 2019

Screenshot_20190416-203820
2.10.2.388~84637c5

@ahmedmamdouh13
Copy link

i would like to start my first contribution on this

ahmedmamdouh13 added a commit to ahmedmamdouh13/apps-android-commons that referenced this issue Apr 18, 2019
ahmedmamdouh13 added a commit to ahmedmamdouh13/apps-android-commons that referenced this issue Apr 22, 2019
ahmedmamdouh13 added a commit to ahmedmamdouh13/apps-android-commons that referenced this issue Apr 22, 2019
@draco-malfoy
Copy link

Why is this still open?

@chaytanyasinha
Copy link

If its not done yet I can contribute to it @nicolas-raoul

@neslihanturan
Copy link
Collaborator

Hi @chaytanyasinha , we usually make one issue once. Since you already claimed another issue, it is better to focus that one first. If you want to claim this one instead, please write a comment under #3202 so that others can work on it.

@chaytanyasinha
Copy link

chaytanyasinha commented Nov 26, 2019

I am sorry @neslihanturan, actually I was cloning the extensions and till then going through other issues and just because I was not knowing that I can't work on 2 issues at same time I commented

@neslihanturan
Copy link
Collaborator

It is totally okay @chaytanyasinha , thanks for your interest:) It is also always okay to leave the other issue and pick new ones.

@nicolas-raoul
Copy link
Member Author

@draco-malfoy I haven't tested it yet.
Would you mind testing and posting a screenshot of the result? Thanks :-)

@318anushka
Copy link
Contributor

@nicolas-raoul
If it's still open can i work on this?

@macgills
Copy link
Collaborator

@318anushka please verify the issue exists and then start working on it

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Mar 19, 2020

@318anushka Please let us know about your progress, and by the way thanks for adding the scalebar in Nearby, it is very useful :-)
I just tested, the problem still exists:
Screenshot_20200320-001525

@318anushka
Copy link
Contributor

@318anushka please verify the issue exists and then start working on it

@macgills Yes i checked, i'll start working on it.
And thanks a lot for helping me out with the first contribution😊

@318anushka
Copy link
Contributor

What exactly do we wan't to display here. I just saw last PR and it displayed title name but the changes aren't merged
#2890 (comment)
Can you please elaborate :-)

@sivaraam
Copy link
Member

When you upload via Nearby the image gets associated with a Wikidata item. We would like to show the title of the corresponding Wikidata item in the toast.

@sivaraam
Copy link
Member

Also, whether the PR #2890 achieved that correctly is questionable.

@nicolas-raoul
Copy link
Member Author

Hum, good find, I wonder why this PR was not merged.
It looks good to me as it is simple enough.
@318anushka would you mind testing it? Then send a new PR with the same content if it looks OK to you.
@sivaraam Is it a general observation, or do you have in mind something in particular which is bad about this PR? Thanks for your insight :-)

@sivaraam
Copy link
Member

sivaraam commented Mar 20, 2020

@sivaraam Is it a general observation, or do you have in mind something in particular which is bad about this PR?

I had a suspicion that the PR was just showing the image title rather than the title of the Wikidata item in the toast. I'm not familiar with that code to confirm either way. Thus the observation. :)

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Mar 20, 2020 via email

@318anushka
Copy link
Contributor

318anushka commented Mar 20, 2020

Sure!! will do that.

@318anushka
Copy link
Contributor

I tried testing the pr and everytime on uploading image toast displayed "failed to update corresponding wikidata entity" and the image is still getting uploaded.

@nicolas-raoul
Copy link
Member Author

Could you please post the URL to the image?

@318anushka
Copy link
Contributor

Could you please post the URL to the image?

Yes , here
https://commons.wikimedia.beta.wmflabs.org/wiki/File%3AGovindgarh_lake_side.jpg

@318anushka
Copy link
Contributor

@318anushka
Copy link
Contributor

318anushka commented Mar 21, 2020

Also i recently synched local repo and now there is an error, it is unable to fetch nearby places.
Logcat shows this error: E/SQLiteLog: (1) no such column: location_pic
Screenshot_20200321-145330
@nicolas-raoul i am not able to figure this out

@nicolas-raoul
Copy link
Member Author

Please rebuild using the "prodDebug" option, and upload/post the URL again. Thanks! :-)

@318anushka
Copy link
Contributor

Yes the PR is showing image title (i edited and checked).
https://commons.wikimedia.org/wiki/File%3ASVNIT%2C_SURAT.jpg

@nicolas-raoul
Copy link
Member Author

Thanks!
Unfortunately, image title is not great, because it may not be the same as the Wikidata item.
The toast is a remainder that the image you just uploaded is now linked from the Wikidata item (as seen at https://www.wikidata.org/wiki/Q7423738 )
That's probably why Ahmed's PR was not merged.

So, you will have to figure out how to implement this and show the Wikidata item's label (which was displayed on the Nearby activity) instead, good luck! :-)
You can probably pass it along the same way the Wikidata item QID is passed along.

@318anushka
Copy link
Contributor

Okay i'll start working on it

@318anushka
Copy link
Contributor

That means whenever toast isn't displayed, the image is uploaded but isn't linked to a wikidata item, right? Why does this happen?
Because only 2 out of 8 times toast was visible to me 😅

@nicolas-raoul
Copy link
Member Author

These 8 uploads were all done via the Nearby map?
If the wikidata linking fails, an error message toast is shown instead, so a toast should be shown everytime. Maybe another bug? On my phone I see the toast everytime, what device and Android version do you have? Maybe something appears in logcat about that? :-)

@318anushka
Copy link
Contributor

Yes all via Nearby map. Logcat shows contribution success but wikidata item is not edited because of location mismatch. I am using pre-clicked photos maybe that's why(quarantined you know).
Anyway a minor change in Ahmed's PR instead of image title displaying place.name(since it is linked to wikidata item) and this is the default label(if not modified) which is displayed as title when uploaded via nearby will do the job.
Let me know your views on this then i'll submit a PR.

@maskaravivek
Copy link
Member

@318anushka You can comment out this if condition if you are testing with pictures that have an incorrect location.

https://github.com/commons-app/apps-android-commons/blob/master/app/src/main/java/fr/free/nrw/commons/wikidata/WikidataEditService.java#L64

@318anushka
Copy link
Contributor

Thanks!! @maskaravivek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment