To prevent mistaken assumptions, we should document the various configuration parameters available in the announcement endpoint in an on-wiki schema akin to https://www.mediawiki.org/wiki/Specs/Summary/1.3.0.
|Resolved||Dbrant||T140012 Add announcement cards to feed|
|Resolved||Fjalapeno||T145830 Add announcements feed service to support donations and surveys|
|Resolved||bearND||T152572 Big English 2016 donation request for Wikimedia Foundation in the Explore feed|
|Open||None||T152160 Add beta announcement capabilities to apps|
|Open||None||T191917 Add beta and version targeting announcement capabilities to the iOS app|
|Resolved||JoeWalsh||T153224 Consistent consumption of announcements feed endpoint|
|Resolved||Mholloway||T195838 Document the announcement endpoint config parameters|
- Mentioned In
- T187098: Extra span at beginning of mobile-sections-lead
T204981: Keeping Node services documentation in sync
T191640: Create an announcement card promoting the new multilingual feature on the Explore feed
T192664: Announce browser extension support for Reading Lists in the apps
- Mentioned Here
- rGMOAbadb4633bb05: Announcements: Update spec, add docs to etc/feed/announcements.js
T187098: Extra span at beginning of mobile-sections-lead
T153224: Consistent consumption of announcements feed endpoint
T152160: Add beta announcement capabilities to apps
Also, if we could have schema validation so that it is impossible for us to deploy incompatible responses that would be great. Given the nature of this endpoint I'm guessing it could even be a test that runs on the patch for now.
Are they up to date?
Some of the newer (optional) values (most are from T152160) are missing:
- beta: boolean,
- logged_in: boolean,
- reading_list_sync_enabled: boolean,
- negative_text: string
- min_version: (Android: number), (iOS: string)
- max_version: (Android: number), (iOS: string)
- image_height: (Android only: number in dp)
Another issue is that we have inconsistent fields between the two apps. In the past the two apps teams designed the responses how they saw fit but didn't always check with the other teams.
More examples are:
- image URL: Android calls it image, iOS image_url.
- body text: Android allows/requires HTML tags for formatting; iOS requires plain text and \n for newlines.
Exercised in the tests?
Currently we don't have any announcements running. So, the announcement x-amples response is just an empty array. Also the tests are adjusted when we start/stop announcements. In the long run, once we have announcements which are configurable without code change/deploy, the latter part should change.
@bearND Thanks for the info. Lets document usage from both platforms, and as an outcome of this task it would be good to have a followup task with a proposal to unify the format across platforms, or definitely split it, whatever we need. We need to formalize this endpoint though so that we don't repeat the problems we've had in the past.