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

Issue 2470913009: 📰 Refactor SuggestionsSection change detection (Closed)

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

Description

[NTP Client] Refactor SuggestionsSection change detection The change detection and notification used to rely on keeping track of children sizes, manually notifying on certain changes. This CL finishes making its children OptionalLeaves, and makes SuggestionList the only one capable of modifying the list of suggestions. This allows letting these children notify of changes themselves. BUG=616090 Committed: https://crrev.com/4e2a6810fd84198ce9d8062d69393076b48a91e9 Cr-Commit-Position: refs/heads/master@{#430929}

Patch Set 1 : Draft. Not ready for review yet. #

Patch Set 2 : fix tests #

Total comments: 17

Patch Set 3 : address comments #

Patch Set 4 : address comments #

Total comments: 1

Patch Set 5 : rebase #

Total comments: 2

Patch Set 6 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -252 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java View 1 2 2 chunks +2 lines, -7 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java View 1 2 3 4 5 3 chunks +36 lines, -8 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ProgressItem.java View 1 2 2 chunks +4 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java View 1 2 4 chunks +10 lines, -40 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java View 1 2 3 2 chunks +13 lines, -8 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java View 1 2 3 9 chunks +111 lines, -102 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 2 18 chunks +43 lines, -24 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java View 1 2 10 chunks +50 lines, -48 lines 0 comments Download

Messages

Total messages: 22 (15 generated)
dgn
PTAL
4 years, 1 month ago (2016-11-07 17:42:51 UTC) #5
Michael van Ouwerkerk
https://codereview.chromium.org/2470913009/diff/20001/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/2470913009/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java#newcode25 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java:25: mCategoryInfo = section.getCategoryInfo(); Why keep the mCategoryInfo field at ...
4 years, 1 month ago (2016-11-08 11:01:31 UTC) #9
dgn
PTAL https://codereview.chromium.org/2470913009/diff/20001/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/2470913009/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java#newcode25 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java:25: mCategoryInfo = section.getCategoryInfo(); On 2016/11/08 11:01:31, Michael van ...
4 years, 1 month ago (2016-11-09 12:02:24 UTC) #12
Michael van Ouwerkerk
lgtm with nits https://codereview.chromium.org/2470913009/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java (right): https://codereview.chromium.org/2470913009/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java#newcode25 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java:25: // We can't use isShown() to ...
4 years, 1 month ago (2016-11-09 13:53:17 UTC) #15
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/2470913009/100001
4 years, 1 month ago (2016-11-09 14:21:59 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 1 month ago (2016-11-09 14:50:51 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-11-09 14:53:08 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/4e2a6810fd84198ce9d8062d69393076b48a91e9
Cr-Commit-Position: refs/heads/master@{#430929}

Powered by Google App Engine
This is Rietveld 408576698