apps-android-commons
apps-android-commons copied to clipboard
Feedback about a Wikidata item: Does not exist, Is at other location, other problem
I suggest adding a "discussion" action to the bottom panel that opens when you select a pin in the "Nearby" activity:
It would open an activity that could look like this:
Write something about the "GS1 Japan" item. It will be publicly visible.
☐ "GS1 Japan" does not exist anymore, no picture can ever be taken of it.
☑ "GS1 Japan" is at a different place (please specify the correct place below, if possible tell us the correct latitude/longitude).
☐ Other problem or information (please explain below).
--------------------------------------------------------------
| It has moved to across the street blabla. |
| |
--------------------------------------------------------------
|Send|
Current talk page:
blablabla
blablabla
The edit should be made with a particular edit tag, so that we can keep track of this feedback and impact the changes:
- Add the "closed" property to items that do not exist anymore
- Modify the latitude/longitude of items that are at a different place I volunteer to do that work, as I expect the workload to be bearable.
Implementing this would also solve issue #965.
Phase 2 (only after the feature above is implemented): Allow users to write a memo about the item even when offline. This would allow off-the-grid photographers with a DSLR to write down a picture filename, and later match it when they get back home.
That sounds like a good idea @nicolas-raoul. There were few points in my mind How are we going to utilise the memo added by a user? Is it like clicking on the pin will give us the details added by all the user's with a feature to add your a memo from the user's side?
@vanshikaarora Yes, added notes will be visible by all. I forgot to say the the phase 1 notes should be added to the item's talk page. For example, here is the talk page of the item "SQUARE BUILDING", a building which has been demolished in 2007: https://www.wikidata.org/wiki/Talk:Q11311478
== Does not exist anymore ==
"SQUARE BUILDING" does not exist anymore, no picture can ever be taken of it.
~~~~
Just one more question, please. These notes will be verified by us wikimedia(for relevance) before publishing or all of them would be published?
They can be published immediately :-) In the wiki world, we assume good will, and let anyone edit stuff. Especially talk pages.
By the way, I see what you mean by "us wikimedia", but I just want to mention that even though our app is an official Wikimedia Foundation (WMF) app, only very few of us (only Vojtech I think) are members of the Wikimedia Foundation, and we historically considered the app to be an independent effort, so we don't speak in the name of Wikimedia.
Hmmm, I am not sure about this. The bottom panel is already quite full, adding one more item seems to make it quite cluttered. I guess the main reason why I am hesitant is that having this extra item seems to only save the user 1 tap. Since they can just go to the Wikidata item and then tap the "Discussion" tab in their browser. Granted, wiki editing in the mobile browser is a bit clunky.
Maybe we could consider a different way to implement this action in the UI. For instance, a small/discreet "Report error" text button somewhere?
How about making the icons bar movable like the tools bar in the app "Photo Editor"? And removing the inactive icons rather than greying them out. For instance, the "Commons category" icon is grey most of the time.
On Mon, Feb 11, 2019, 01:02 Josephine Lim <[email protected] wrote:
Hmmm, I am not sure about this. The bottom panel is already quite full, adding one more item seems to make it quite cluttered. I guess the main reason why I am hesitant is that having this extra item seems to only save the user 1 tap. Since they can just go to the Wikidata item and then tap the "Discussion" tab in their browser. Granted, wiki editing in the mobile browser is a bit clunky.
Maybe we could consider a different way to implement this action in the UI. For instance, a small/discreet "Report error" text button somewhere?
— 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/2425#issuecomment-462146329, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGFBprIBtRQSekIe7nRKvINDXyr3WxQks5vMEKmgaJpZM4amzeE .
On Mon, Feb 11, 2019, 01:02 Josephine Lim <[email protected] wrote:
Hmmm, I am not sure about this. The bottom panel is already quite full, adding one more item seems to make it quite cluttered. I guess the main reason why I am hesitant is that having this extra item seems to only save the user 1 tap. Since they can just go to the Wikidata item and then tap the "Discussion" tab in their browser. Granted, wiki editing in the mobile browser is a bit clunky.
Maybe we could consider a different way to implement this action in the UI. For instance, a small/discreet "Report error" text button somewhere?
— 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/2425#issuecomment-462146329, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGFBprIBtRQSekIe7nRKvINDXyr3WxQks5vMEKmgaJpZM4amzeE .
Removing inactive icons would be fantastic. :) Haven't tried the Photo Editor app yet.
And removing the inactive icons rather than greying them out.
That sounds like a great idea. I can work on this
Thanks @vanshikaarora ! I think we don't have a separate issue for that yet, would you mind creating the issue (and stating that you are going to work on it in your post)?
Thanks @vanshikaarora ! I think we don't have a separate issue for that yet, would you mind creating the issue (and stating that you are going to work on it in your post)?
Sure I'll do that :)
The edit should be made with a particular edit tag, so that we can keep track of this feedback and impact the changes: Add the "closed" property to items that do not exist anymore Modify the latitude/longitude of items that are at a different place I volunteer to do that work, as I expect the workload to be bearable.
@nicolas-raoul I am ready to work on this Issue. But before I begin I would like to know how are retrieving/sending these feedback's. Is there an API for it?
@vanshikaarora Thanks!
As you have see, you will need to read and write to a Wikidata item's talk page such as https://www.wikidata.org/wiki/Talk:Q11311478 Yes, there is an API. For the read part, actually something rather similar is being implemented right now for media talk pages: https://github.com/commons-app/apps-android-commons/compare/master...sp2710:fix%231850?expand=1#diff-22835e29a24ad4eec8642964effa110cR76 I suspect the API for Wikidata item talk pages is very similar.
@nicolas-raoul I have gone through the API's available here. And I have found that we can create a new description entity for each of these talks. Here was an API that I have found useful.
"description" is a different thing, we should not edit it.
We must use edit with title
being "Talk:" + the item QID
To display the current content of the talk page, https://commons.wikimedia.org/w/api.php?action=help&modules=flow-parsoid-utils (also with title
being "Talk:" + the item QID) seems like a good solution.
To display the current content of the talk page, https://commons.wikimedia.org/w/api.php?action=help&modules=flow-parsoid-utils (also with title being "Talk:" + the item QID) seems like a good solution.
Ok I'll use this API @nicolas-raoul
Here is the work-list for me. That will be available in the next PR:
- [x] Calling this API from ApacheHttpClientMediaWikiApi.java
- [x] Adding an Icon in the bottom panel for talks
- [x] Creating a new Activity for reading talks
- [ ] Deciding the best UI for the activity
Is there anything that you would like to add or suggest especially the UI part?
Writing down this work-list is a great initiative!
The content sounds good, for the API I think we have 3 use cases:
- Read content to display it (looking at https://github.com/commons-app/apps-android-commons/compare/master...sp2710:fix%231850?expand=1#diff-22835e29a24ad4eec8642964effa110cR76 will help for this one)
- Write content to a talk page that does not exist yet
- Append content to a talk page that already has some content
Append content to a talk page that already has some content
@nicolas-raoul Is this available currently?
I don't think so, you will probably have to read the content from the server, then concatenate, then send to the server 🙂
@nicolas-raoul I have parsed the API using
public String readFeedback(String source) throws IOException {
public String readFeedback(String source) throws IOException {
return api.action("flow-parsoid-utils")
.param("from", "html")
.param("to", "wikitext")
.param("content", source)
.param("title", "Talk")
.get()
.getString("/api/flow-parsoid-utils/@content");
}
}
And got the following response
Indian Institute of Technology (Indian School of Mines), Dhanbad
Currently the source
passed as a parameter is returned as a response.
Is this intended?
You can get the wikitext of the talk page like this:
https://www.wikidata.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=Talk:Q11311478
Then either just display it like this (easiest), or put as as the source of your request above (and replace Talk
with Talk:Q11311478
Then either just display it like this (easiest)
@nicolas-raoul Do you mean using a WebView here?
@nicolas-raoul The above link gives a query like
"query": {
"pages": {
"61503095": {
"pageid": 61503095,
"ns": 1,
"title": "Talk:Q11311478",
"revisions": [
{
"contentformat": "text/x-wiki",
"contentmodel": "wikitext",
"*": "== Does not exist anymore ==\n\"SQUARE BUILDING\" does not exist anymore, no picture can ever be taken of it.\n\n[[User:Syced|Syced]] ([[User talk:Syced|<span class=\"signature-talk\">{{int:Talkpagelinktext}}</span>]]) 15:02, 9 February 2019 (UTC)"
}
]
}
}
}
While I was executing the API there wasn't any node like "revisions" instead the API response looked like
<?xml version="1.0" encoding="UTF-8"?><api batchcomplete=""><query><pages><page _idx="-1" ns="1" title="Talk:Q11311478" missing=""/></pages></query></api>
Intsead of "revisions" it returned an empty node "missing". Am I parsing the API correctly here?
api.action("query")
.param("prop", "revisions")
.param("rvprop", "content")
.param("titles", "Talk:Q11311478")
.get().getNode("api/query/pages/page/@missing");
What do you get with
api.action("query")
.param("prop", "revisions")
.param("rvprop", "content")
.param("titles", "Talk:Q11311478")
.get();
?
@nicolas-raoul It returns an object of type CustomApiResult
Does your IDE allow you to see what is inside this object?
What do you get with
api.action("query") .param("prop", "revisions") .param("rvprop", "content") .param("titles", "Talk:Q11311478") .get();
?
When I tried calling this API I got the following response:
https://www.wikidata.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=Talk:Q11311478&format=json&rvslots=main
{
"batchcomplete": "",
"query": {
"pages": {
"61503095": {
"pageid": 61503095,
"ns": 1,
"title": "Talk:Q11311478",
"revisions": [
{
"slots": {
"main": {
"contentmodel": "wikitext",
"contentformat": "text/x-wiki",
"*": "== Does not exist anymore ==\n\"SQUARE BUILDING\" does not exist anymore, no picture can ever be taken of it.\n\n[[User:Syced|Syced]] ([[User talk:Syced|<span class=\"signature-talk\">{{int:Talkpagelinktext}}</span>]]) 15:02, 9 February 2019 (UTC)"
}
}
}
]
}
}
}
}
@maskaravivek on using
api.action("query")
.param("prop", "revisions")
.param("rvprop", "content")
.param("titles", "Talk:Q11311478")
.get();
The following is shown in logs
<?xml version="1.0" encoding="UTF-8"?><api batchcomplete=""><query><pages><page _idx="-1" ns="1" title="Talk:Q11311478" missing=""/></pages></query></api>
I also used the rvslots param set to main
I also used the rvslots param set to main
@maskaravivek Even then the response was same for me :(