[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Generalize Announcement cards a bit.
jenkins-bot has submitted this change and it was merged. Change subject: Generalize Announcement cards a bit. .. Generalize Announcement cards a bit. The previous (first) version of announcement cards didn't actually make use of the "caption_HTML" or "image" parameters that are part of the announcement endpoint of the Content Service, which are meant to represent the footer verbiage and the header image, respectively. This patch updates our logic to make use of these fields, which means that we no longer need to maintain any hard-coded images or strings for this purpose. We will still, however, keep around the separate classes of SurveyCard and FundraisingCard, since this distinction is necessary for analytics purposes. But aside from that, the card is now fully customizable by the endpoint content. (Also update the Test to be a more general test of AnnouncementCardView.) Change-Id: I8e77fc7bcbdd9ed020127f40c1996ff772fff097 --- A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testNoImage-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png A app/screenshots-ref/org.wikipedia.feed.announcement.AnnouncementCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png D app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png A app/src/androidTest/java/org/wikipedia/feed/announcement/AnnouncementCardViewTest.java D app/src/androidTest/java/org/wikipedia/feed/announcement/FundraisingCardViewTest.java D
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Generalize Announcement cards a bit.
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/325724 Change subject: Generalize Announcement cards a bit. .. Generalize Announcement cards a bit. The previous (first) version of announcement cards didn't actually make use of the "caption_HTML" or "image" parameters that are part of the announcement endpoint of the Content Service, which are meant to represent the footer verbiage and the header image, respectively. This patch updates our logic to make use of these fields, which means that we no longer need to maintain any hard-coded images or strings for this purpose. We will still, however, keep around the separate classes of SurveyCard and FundraisingCard, since this distinction is necessary for analytics purposes, as well as enabling the "negative" action button in the announcement card. But aside from that, the card is now fully customizable by the endpoint content. Change-Id: I8e77fc7bcbdd9ed020127f40c1996ff772fff097 --- M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png M app/src/androidTest/java/org/wikipedia/feed/announcement/FundraisingCardViewTest.java M app/src/androidTest/java/org/wikipedia/feed/announcement/SurveyCardViewTest.java M app/src/main/java/org/wikipedia/feed/announcement/Announcement.java M app/src/main/java/org/wikipedia/feed/announcement/AnnouncementCard.java M app/src/main/java/org/wikipedia/feed/announcement/AnnouncementCardView.java M app/src/main/java/org/wikipedia/feed/announcement/FundraisingCardView.java M app/src/main/java/org/wikipedia/feed/announcement/SurveyCardView.java D app/src/main/res/drawable/ic_fundraising_header_2016.xml M app/src/main/res/layout/view_card_announcement.xml M app/src/test/java/org/wikipedia/feed/announcement/AnnouncementClientTest.java M app/src/test/res/raw/announce_2016_11_21.json 31 files changed, 110 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/24/325724/1 diff --git a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png index 7d531cd..c29aa17 100644 --- a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png +++ b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png Binary files differ diff --git