Skip to content

Show news about ongoing campaigns/competitions #78

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

Closed
misaochan opened this issue Mar 6, 2016 · 54 comments
Closed

Show news about ongoing campaigns/competitions #78

misaochan opened this issue Mar 6, 2016 · 54 comments

Comments

@misaochan
Copy link
Member

Suggested by John Cummings at https://commons.wikimedia.org/wiki/Commons:Village_pump#IEG_proposal:_Improve_Upload_to_Commons_Android_app

@misaochan:, this has a very large potential to increase participation. I wanted ask a question that is outside the current grant request but is related. I know that there has been some previous work on a Wiki Loves Monuments app and could see a clear use for a similar app for Wiki Loves Earth. I don't understand the technical side of Wiki Loves Monuments and Wiki Loves Earth but I can see having an app may help increase the easy of participation for people. Would there be an easy mechanism to have a link somewhere in the front page of the app to contribute to the competitions? I think there are a few advantages of integrating the competitions into a central app rather than having an app for each competition:
If people install the app for the competition it means they can continue to contribute to Wikimedia Commons after the competition has finished
May encourage people to take part in multiple competitions, inccreasing the participation for all of them. E.g someone installs the app for WLE and then continues to add photos afterwards and the app makes them aware that WLM is happening.
Smaller competitions can have contributions by an app without needing to create their own.
Thanks
John Cummings (talk) 13:52, 4 March 2016 (UTC)

@misaochan misaochan changed the title Link to Wiki Loves Monuments and related competitions? Integrate Wiki Loves Monuments and related competitions into app? Mar 7, 2016
@misaochan misaochan changed the title Integrate Wiki Loves Monuments and related competitions into app? Integrate Wiki Loves Monuments and related competitions submissions into app? Mar 7, 2016
@nicolas-raoul
Copy link
Member

How about a small "news" that would show up only during such campaigns? since presumably a week or so before.

Implementation could be as simple as loading a text file from a hard-coded URL like https://www.mediawiki.org/wiki/Wikimedia_Apps/Commons/Ad (that page would need to be ultra-protected obviously) and ignoring when the page is blank. Loading would need to be asynchronous to not impact app startup speed too much.

This space could also be used for other communication such as "Now is Categorization Week, please join us at http://commons..org/Categorization_Week" or "Help translate the app to your language, see http://some-url"-type information. If we extend to this, the "news" should be dismissable.

Further integration of WLM-type campaigns used to exist but has been removed as we saw no use to it, and it increased complexity. It used to be built as separate apps if I remember correctly.

@misaochan
Copy link
Member Author

Ahh, is that the Campaigns code that we removed previously due to it being unused? That explains a lot. :)

I like the idea of the ad for other WM campaigns. Who would maintain the URL that switches the ads around though? Or is it already done automatically?

@nicolas-raoul
Copy link
Member

Maintainance would be done manually by the community at https://www.mediawiki.org/wiki/Wikimedia_Apps/Commons/Ad

@nicolas-raoul nicolas-raoul changed the title Integrate Wiki Loves Monuments and related competitions submissions into app? Show news about ongoing campaigns/competitions Jul 27, 2016
@tobias47n9e
Copy link
Member

Ideally we could have some kind of plug-in structure. For example a GeoJSON with the location, description etc.. and also the name of the campaign, start date, end date, custom categories. Ideally a user could create a campaign from query.wikidata.org which will also be able to query commons soon (once Wikidata for Commons goes online).

Something like Wiki loves monuments or Wiki loves earth is probably not more than a few lines of sparql to get the desired items. Non location based campaigns query for certain categories or create the JSON manually. If no locations are provided no map is shows, but a list. Gamification would be possible if points (stars, etc..) are assigned to the items.

@nicolas-raoul
Copy link
Member

Indeed.
Would you mind designing the ads for two campaigns that have actually happened? And design the JSON that would define each of these campaigns. Agreeing on a solid format is a requirement before we start coding.

@nicolas-raoul
Copy link
Member

@tobias47n9e: This issue is only about the ads (news), so your paragraph about SPARQL probably belongs to #100
Cheers! :-)

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Sep 18, 2016

We could load the JSON file from a hard-coded URL like http://commons-app.github.io/campaigns.json
I now see the point of having SPARQL in this file too.
To summarize, the JSON file could contain for each ongoing campaign:

  • Name of the campaign
  • Area where the campaign takes place
  • Start/end date of the campaign
  • Explanation text
  • Categories to add to categories suggestions
  • SPARQL request for nearby campaign-related items

Anyone willing to write a sample for a few real past campaigns?

@maskaravivek
Copy link
Member

As discussed with the team am assigning this task to @ashishkumar468. I would be picking up #604 instead.

cc @misaochan

@ashishkumar468
Copy link
Collaborator

Can someone help me with the api's for the same. Also, I was hoping if the right place for it would be the nav drawer ?

@misaochan
Copy link
Member Author

misaochan commented Oct 25, 2018

@VojtechDostal @nicolas-raoul @whym @tobias47n9e Would appreciate insight on which API we should use for this?

@ashishkumar468 For the UI, the eventual plan is for it to be on the main screen. But depending on the output of the API, for the time being the nav drawer or even a separate "News" activity could work.

@misaochan
Copy link
Member Author

@nicolas-raoul @VojtechDostal @urbanecm Any ideas on what API we could use? I will try to ask on wikitech-l or the village pump soon if no one here knows. :)

@urbanecm
Copy link
Contributor

Not sure I fully understand the question. What data you want to access in the app?

@misaochan
Copy link
Member Author

The exact data that we will display is somewhat flexible, but we at least need to be able to check (1) dates that the campaigns are running and (2) names of these campaigns.

@urbanecm
Copy link
Contributor

What is a campaign in this context?

@misaochan
Copy link
Member Author

I think we can just start with the international WLE and WLM campaigns for now, but for a future enhancement could include the country-specific ones?

@urbanecm
Copy link
Contributor

I wonder if such campaigns are stored in some app. If not, it's hard to recommend an API.

@misaochan
Copy link
Member Author

misaochan commented Oct 30, 2018

Hmm, I guess if an API doesn't exist, we can just go with the manual maintenance and loading of a text file as mentioned at #78 (comment) . IMO this would be less-than-ideal due to the maintenance required, but if it is only WLM and WLE, maintenance would be required only once a year (and even then only if WMF changes their plans, AFAIK those usually have fixed dates every year?).

nicolas-raoul added a commit to commons-app/campaigns that referenced this issue Dec 7, 2018
@nicolas-raoul
Copy link
Member

@ashishkumar0207 I updated the JSON file with Vivek's additions, so feel free to make the app download it from GitHub (URL above) and parse it :-)

@ashishkumar468
Copy link
Collaborator

Thanks @nicolas-raoul . I am on it :-)

@maskaravivek
Copy link
Member

Oops, I hadn't noticed that the repo already had a JSON. @nicolas-raoul Thanks for adding the updated JSON to the repo.

@ashishkumar468 You might have to update the JSON file to fix the values based on @misaochan's comment. I had just posted a sample. :)

@ashishkumar468
Copy link
Collaborator

Thanks @maskaravivek , will do the same

@JeanFred
Copy link

JeanFred commented Dec 7, 2018

Question: Is there a plan to make the news about the Campaigns country-aware or is that out of scope for this task?

@ashishkumar468
Copy link
Collaborator

ashishkumar468 commented Dec 7, 2018

@JeanFred Does not seems something difficult to implement, although it would add complexity in maintenance of the json, IMO, can be taken as an improvement later on, what do others say?

@JeanFred
Copy link

JeanFred commented Dec 7, 2018

@JeanFred Does not seems something difficult to implement, although it would add complexity in maintenance of the json, IMO, can be taken as an improvement later on, what do others say?

Agreed. I think it makes a lot of sense to keep the first iteration simple and not making it country-aware ; but also to keep that in mind for the future as a very desirable improvement: people in Country X might be confused that they get WLM advertised if there is no WLM running in their country. For WLM and WLE it is probably not too bad, because they’re global and take place in lots of countries ; but I can imagine that competitions with smaller scope (for example, there were quite some dedicated Wiki loves X happening in India) would be keen to also get their campaigns surfaced in the app :)

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Dec 7, 2018

I would suggest keeping countries for a second phase because it is not trivial:

  • Some users do not allow the app to use the GPS.
  • As far as I know, there is no open source library to guess a country from a location (nor from the Android system itself).
  • Some competitions might cover Benelux (three countries that very often act as a single one) or Alaska (not a country), adding to the complexity.

@maskaravivek
Copy link
Member

maskaravivek commented Dec 7, 2018

This might be out of the scope of the task but for the sake of discussion, we can support country-level campaigns with 2 additional attributes.

{
    "config": {
        "showOnlyLiveCampaigns": true/false,
        "sortBy": "title/startDate/endDate"
    }
    "campaigns": [
        {
            "title": "Wiki Loves Monuments",
            "description": "Wiki Loves Monuments",
            "startDate": "2018-09-01",
            "endDate": "2018-12-01",
            "link": "https://www.wikilovesmonuments.org/contest/",
            "global": false,
            "country": "India"
        }, 
        {
            "title": "Wiki Loves Earth",
            "description": "Wiki Loves Earth",
            "startDate": "2018-09-01",
            "endDate": "2018-12-01",
            "link": "https://www.wikilovesmonuments.org/contest/",
            "global": true    
        }
    ]
}
  • if global is true then the campaign would be visible in all countries.
  • if global is not set as true then the campaign would be visible only in the country.

@nicolas-raoul's concerns can also be addressed:

Some users do not allow the app to use the GPS.

Users who do not allow GPS/location access can be shown only global campaigns. Others can see global + country campaigns.

As far as I know, there is no open source library to guess a country from a location (nor from the Android system itself).

GeoCoder can be used to retrieve Address which contains country info.

Some competitions might cover Benelux (three countries that very often act as a single one) or Alaska (not a country), adding to the complexity.

The campaign file would contain a corresponding entry for each country. The user would be shown only one of these items based on his country.

  • Assuming GPS is never available, we can have a country drop-down list where the user can select the country for which they want to see the campaigns. Some users might be planning a trip ahead and might want to see campaigns in another country.
  • Our JSON file won't grow to unmanageable limits as of now but later we can introduce a middle layer so that the app doesn't consume the JSON directly. The client can send country, language, global etc as params.

@misaochan
Copy link
Member Author

Thanks for creating the new repo! I agree that country-specific support would be wonderful, but it would be best to do it as a future enhancement.

Now that we have a rudimentary backend sorted, we need to consider the UI. Do we want this in the nav drawer, or the main screen, or do we want a separate News activity? IMO the news activity would probably be easiest for the time being, and would allow us to tidy up the initial iteration based on user feedback before it is placed in a more prominent location. @neslihanturan

@ashishkumar468
Copy link
Collaborator

ashishkumar468 commented Dec 10, 2018

@misaochan yes, a separate activity which could be opened from the nav drawer

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Dec 10, 2018

At first I thought the most obvious would be to display a red notification. But then I realized that I hate receiving Facebook notifications that are about something not directly related to me (such as a message to me or an event about one of my pictures), so that is probably not a good idea. Showing non-important notifications might lead users to just ignore notifications, and thus not see important ones such as someone asking them about the copyright status of a picture.

How about showing each campaign:

  • At the first day of the campaign, on the app's home activity, instead of the Nearby notification. The app should remember (in the local database) whether it has displayed that campaign to the user or not yet, for instance if the user does not open the app for two days then the campaign should be shown during the third day. After that campaign-showing day is over, when the app is opened, do not show it anymore, just show the normal Nearby notification, or just nothing if Display nearby notification is off.
  • In the Notifications activity's list, but without triggering the red "new notification" signal.

Note: I wrote "first day of the campaign", but we might prefer "one week before the start of the campaign" or "one week before AND the first day AND at the middle of the campaign" or anything similar, with for each a shown-or-not-yet record in database.

Advantages over a nav drawer activity:

  • More visible. Nobody would open a campaign drawer activity each week to check whether a campaign has started or not.
  • No need for yet another nav drawer item.

@misaochan
Copy link
Member Author

@nicolas-raoul Hmmm. That sounds a little bit complicated to me. ;) If we are going to have it in the main activity, I think it should be OK to just have the campaign news as an additional card underneath the Nearby card? It can stay up for the duration of the campaign as long as it can be swiped to be dismissed, and we remember the user's preference. It does have to be reasonably small in height so that it doesn't take up too much of the screen.

@ashishkumar468
Copy link
Collaborator

ashishkumar468 commented Dec 10, 2018

@nicolas-raoul So to conclude to what you said

  • Apart from showing the campaigns in the notification activity, we show it in the HomeActivity as well, under the contributions tab above the contribution (the visibility of a campaign being based on its age)

@ashishkumar468
Copy link
Collaborator

@nicolas-raoul If there are any live campaigns going on, can you please add one of them in the repo mentioned, would be really helpful in testing with the actual api's, currently I am using a fork of your repository for the same

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Dec 13, 2018 via email

@misaochan
Copy link
Member Author

misaochan commented Dec 13, 2018

Umm, wouldn't it work if you just changed the date in the emulator? Pretend it's Sep 15. :)

@misaochan
Copy link
Member Author

BTW, how do we handle recurring dates? Currently the year is hardcoded in the JSON file. Is there a way for us to specify the date and month, but have it applicable for every year?

@misaochan
Copy link
Member Author

Reopening as we still need to sort out the recurring dates before we release this. We can just make them 2019 if we have to, and change them every year, but that would really not be ideal.

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Dec 15, 2018 via email

@misaochan
Copy link
Member Author

@nicolas-raoul Ah, good point. Should we just add 2019 and 2020 to the JSON file now, then?

@misaochan
Copy link
Member Author

I've added 2019 to the JSON file and fixed the dates etc. If anyone could double check the file, that would be fantastic, but everything appears to be in good working order otherwise. :)

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

No branches or pull requests

8 participants