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

Issue 2340333002: 📰 Make status cards swipable (Closed)

Created:
4 years, 3 months ago by dgn
Modified:
4 years, 3 months ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Client] Make status cards swipable When the status card is swiped away, the entire section is dismissed and stays that way on NTPs opened afterwards. If the status of the section changes (new snippets loaded, user logged in, etc.) the section will be added back. Preview: https://goo.gl/photos/ooDFBuAVCLauo4bbA BUG=638580 Committed: https://crrev.com/212feea3b3df08ddb7d25d8b6293344ebc5d5b9b Cr-Commit-Position: refs/heads/master@{#419170}

Patch Set 1 #

Patch Set 2 : implement required UI changes #

Patch Set 3 : #

Total comments: 14

Patch Set 4 : address comments #

Total comments: 2

Patch Set 5 : fix nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -20 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java View 1 2 3 4 4 chunks +12 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java View 1 2 3 4 chunks +40 lines, -8 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java View 1 2 3 3 chunks +39 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/FakeSuggestionsSource.java View 1 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java View 1 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SuggestionsSource.java View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 2 chunks +42 lines, -0 lines 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service.cc View 1 2 chunks +14 lines, -6 lines 0 comments Download

Messages

Total messages: 24 (11 generated)
dgn
PTAL. WIP, but I'd like to validate the backend changes. The desired behaviour is implemented. ...
4 years, 3 months ago (2016-09-15 16:04:27 UTC) #3
dgn
All is there now. PTAL.
4 years, 3 months ago (2016-09-15 21:48:05 UTC) #7
Bernhard Bauer
https://codereview.chromium.org/2340333002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java (right): https://codereview.chromium.org/2340333002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java:27: /** Whether this item can be dismissed.*/ Maybe move ...
4 years, 3 months ago (2016-09-16 09:56:44 UTC) #10
Marc Treib
Code mostly LG, but I have some general concerns: - Dismissing a section has somewhat ...
4 years, 3 months ago (2016-09-16 10:07:50 UTC) #11
dgn
Moved the discussion to the bug (https://crbug.com/638580), so that Patrick can contribute.
4 years, 3 months ago (2016-09-16 11:20:32 UTC) #12
dgn
Thanks! PTAL https://codereview.chromium.org/2340333002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java (right): https://codereview.chromium.org/2340333002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java:94: public static final int SNIPPETS_ACTION_DISMISSED_SECTION = 7; ...
4 years, 3 months ago (2016-09-16 11:28:00 UTC) #13
Marc Treib
Thanks! LGTM if you want to land this now and figure out the exact re-appearing ...
4 years, 3 months ago (2016-09-16 11:36:44 UTC) #14
Marc Treib
Ah, one more thing: We should have tests for the section dismissing/re-appearing, but probably not ...
4 years, 3 months ago (2016-09-16 11:37:56 UTC) #15
Bernhard Bauer
LGTM with Marc's nit addressed.
4 years, 3 months ago (2016-09-16 12:59:40 UTC) #16
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/2340333002/80001
4 years, 3 months ago (2016-09-16 14:09:57 UTC) #19
dgn
Thanks! I'll add tests in the follow up CL with the logic rework, yes. https://codereview.chromium.org/2340333002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java ...
4 years, 3 months ago (2016-09-16 14:10:34 UTC) #20
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-16 15:09:08 UTC) #22
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 15:11:08 UTC) #24
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/212feea3b3df08ddb7d25d8b6293344ebc5d5b9b
Cr-Commit-Position: refs/heads/master@{#419170}

Powered by Google App Engine
This is Rietveld 408576698