Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Issue 2249903003: 📰 Empty state handling for the Bookmarks section (Closed)

Created:
4 years, 4 months ago by dgn
Modified:
4 years, 4 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, ntp-dev+reviews_chromium.org, Philipp Keck
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Client] Empty state handling for the Bookmarks section - Added a show_if_empty field to CategoryInfo. A category with this flag enabled will be always shown on the NTP, but if it's disabled and we have no suggestion for this category when initialising the NTP, we won't show it at all. - If the section has a MORE button, when the last suggestion is dismissed, we show a different Empty State status card that has no action and leave the MORE button to provide the action. - Added strings an a new status card for Bookmarks and updated the ones for articles. Preview: https://goo.gl/photos/CE8bFvEtuYQNhW1m9 BUG=610648 Committed: https://crrev.com/78a053aeef3074fc62eaa5dbed1d2c02efb4f7e1 Cr-Commit-Position: refs/heads/master@{#413141}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Skip creating the section and add actionless status card #

Patch Set 3 : fix tests #

Total comments: 8

Patch Set 4 : address comments #

Patch Set 5 : updated strings #

Patch Set 6 : #

Patch Set 7 : rebase #

Patch Set 8 : fix instrumentation test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -53 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java View 1 2 3 4 5 6 5 chunks +7 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java View 1 2 3 4 5 6 4 chunks +36 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java View 1 2 chunks +10 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java View 1 2 3 4 5 6 5 chunks +25 lines, -12 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 2 chunks +1 line, -7 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 2 3 4 5 6 6 chunks +83 lines, -3 lines 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M components/ntp_snippets/category_info.h View 1 2 chunks +6 lines, -1 line 0 comments Download
M components/ntp_snippets/category_info.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_snippets/ntp_snippets_service.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc View 1 2 3 4 5 6 1 chunk +6 lines, -3 lines 0 comments Download
M components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets_strings.grdp View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (34 generated)
dgn
PTAL
4 years, 4 months ago (2016-08-16 21:10:44 UTC) #4
Bernhard Bauer
https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java (right): https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java#newcode373 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java:373: ItemGroup getGroup(int itemPosition) { Add @VisibleForTesting? https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java ...
4 years, 4 months ago (2016-08-16 22:56:49 UTC) #8
dgn
PTAL +pke@: FYI, I'm adding a new field to CategoryInfo. https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java (right): https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java#newcode373 ...
4 years, 4 months ago (2016-08-17 17:17:21 UTC) #13
Bernhard Bauer
https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java (right): https://codereview.chromium.org/2249903003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java#newcode373 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java:373: ItemGroup getGroup(int itemPosition) { On 2016/08/17 17:17:21, dgn wrote: ...
4 years, 4 months ago (2016-08-17 20:38:03 UTC) #20
dgn
PTAL https://codereview.chromium.org/2249903003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java (right): https://codereview.chromium.org/2249903003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java#newcode33 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java:33: public interface StatusActionDelegate { void onButtonTapped(); } On ...
4 years, 4 months ago (2016-08-18 09:52:57 UTC) #22
Bernhard Bauer
lgtm
4 years, 4 months ago (2016-08-18 18:42:33 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2249903003/100001
4 years, 4 months ago (2016-08-19 09:30:44 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/241695)
4 years, 4 months ago (2016-08-19 09:36:24 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2249903003/120001
4 years, 4 months ago (2016-08-19 10:59:12 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/115336)
4 years, 4 months ago (2016-08-19 11:23:30 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2249903003/140001
4 years, 4 months ago (2016-08-19 14:32:58 UTC) #43
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 4 months ago (2016-08-19 14:37:32 UTC) #45
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 14:40:08 UTC) #47
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/78a053aeef3074fc62eaa5dbed1d2c02efb4f7e1
Cr-Commit-Position: refs/heads/master@{#413141}

Powered by Google App Engine
This is Rietveld 408576698