|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by Bernhard Bauer Modified:
4 years, 2 months ago CC:
chromium-reviews, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionExtract a DataSource interface for items shown in a status card.
This gets rid of some of the awkwardness in the class hierarchy for
SignInPromoItem (which implements ItemGroup but also indirectly inherits from
NewTabPageItem).
BUG=616090
Committed: https://crrev.com/281c15dfc08bd0a1b1d3972c5b27784ce5e25020
Cr-Commit-Position: refs/heads/master@{#424770}
Patch Set 1 #Patch Set 2 : o #
Total comments: 4
Patch Set 3 : rename #Patch Set 4 : fix #Patch Set 5 : rebase #Patch Set 6 : argh #Patch Set 7 : blergh #Messages
Total messages: 47 (26 generated)
The CQ bit was checked by bauerb@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by bauerb@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
bauerb@chromium.org changed reviewers: + dgn@chromium.org, mvanouwerkerk@chromium.org
Please review. Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java (right): https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java:28: public class SigninPromoItem implements ItemGroup, StatusCardViewHolder.DataSource { It's a bit strange that it's called SigninPromoITEM now that it's not a NtpItem anymore. Also, our view holders logically hold a NtpItem, while the StatusCardViewHolder now holds a DataSource... How about having another interface extending NtpItem to replace DataSource? https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusCardViewHolder.java (right): https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusCardViewHolder.java:49: * @return Resource ID for the action label string, or 0 if the card does not have a label. s/a label/an action Or something more explicit saying that no action button will be shown if we return 0?
https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java (right): https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java:28: public class SigninPromoItem implements ItemGroup, StatusCardViewHolder.DataSource { On 2016/10/11 16:43:43, dgn wrote: > It's a bit strange that it's called SigninPromoITEM now that it's not a NtpItem > anymore. > > Also, our view holders logically hold a NtpItem, while the StatusCardViewHolder > now holds a DataSource... How about having another interface extending NtpItem > to replace DataSource? Weelll... in the longer term I actually want to get rid of NTPItem. The other ViewHolders are then going to hold on to the data item (SnippetArticle) directly, if they have any at all. Should I just rename this to SigninPromo?
ltgm after the comment update. https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java (right): https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java:28: public class SigninPromoItem implements ItemGroup, StatusCardViewHolder.DataSource { On 2016/10/11 16:50:24, Bernhard Bauer wrote: > On 2016/10/11 16:43:43, dgn wrote: > > It's a bit strange that it's called SigninPromoITEM now that it's not a > NtpItem > > anymore. > > > > Also, our view holders logically hold a NtpItem, while the > StatusCardViewHolder > > now holds a DataSource... How about having another interface extending NtpItem > > to replace DataSource? > > Weelll... in the longer term I actually want to get rid of NTPItem. The other > ViewHolders are then going to hold on to the data item (SnippetArticle) > directly, if they have any at all. > > Should I just rename this to SigninPromo? lgtm for Sign[Ii]nPromo. (the capitalisation there is inconsistent across the code, I noticed after landing my initial CL :/) Okay if we are going to remove the NtpItems.
On 2016/10/11 17:00:40, dgn wrote: > ltgm after the comment update. > > https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... > File > chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java > (right): > > https://codereview.chromium.org/2407283002/diff/20001/chrome/android/java/src... > chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SigninPromoItem.java:28: > public class SigninPromoItem implements ItemGroup, > StatusCardViewHolder.DataSource { > On 2016/10/11 16:50:24, Bernhard Bauer wrote: > > On 2016/10/11 16:43:43, dgn wrote: > > > It's a bit strange that it's called SigninPromoITEM now that it's not a > > NtpItem > > > anymore. > > > > > > Also, our view holders logically hold a NtpItem, while the > > StatusCardViewHolder > > > now holds a DataSource... How about having another interface extending > NtpItem > > > to replace DataSource? > > > > Weelll... in the longer term I actually want to get rid of NTPItem. The other > > ViewHolders are then going to hold on to the data item (SnippetArticle) > > directly, if they have any at all. > > > > Should I just rename this to SigninPromo? > > lgtm for Sign[Ii]nPromo. (the capitalisation there is inconsistent across the > code, I noticed after landing my initial CL :/) > > Okay if we are going to remove the NtpItems. OK, renamed to SignInPromo (I think SignIn is more common, and at the moment we can't land a capitalization-only rename, because that might confuse systems with a case-insensitive filesystem, so I'd rather take this opportunity to fix the capitalization).
The CQ bit was checked by bauerb@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgn@chromium.org, mvanouwerkerk@chromium.org Link to the patchset: https://codereview.chromium.org/2407283002/#ps40001 (title: "rename")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by bauerb@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgn@chromium.org, mvanouwerkerk@chromium.org Link to the patchset: https://codereview.chromium.org/2407283002/#ps60001 (title: "fix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by bauerb@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgn@chromium.org, mvanouwerkerk@chromium.org Link to the patchset: https://codereview.chromium.org/2407283002/#ps80001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...)
The CQ bit was checked by bauerb@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgn@chromium.org, mvanouwerkerk@chromium.org Link to the patchset: https://codereview.chromium.org/2407283002/#ps90007 (title: "argh")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by bauerb@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgn@chromium.org, mvanouwerkerk@chromium.org Link to the patchset: https://codereview.chromium.org/2407283002/#ps110001 (title: "blergh")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...)
The CQ bit was checked by bauerb@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...)
The CQ bit was checked by bauerb@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #7 (id:110001)
Message was sent while issue was closed.
Description was changed from ========== Extract a DataSource interface for items shown in a status card. This gets rid of some of the awkwardness in the class hierarchy for SignInPromoItem (which implements ItemGroup but also indirectly inherits from NewTabPageItem). BUG=616090 ========== to ========== Extract a DataSource interface for items shown in a status card. This gets rid of some of the awkwardness in the class hierarchy for SignInPromoItem (which implements ItemGroup but also indirectly inherits from NewTabPageItem). BUG=616090 Committed: https://crrev.com/281c15dfc08bd0a1b1d3972c5b27784ce5e25020 Cr-Commit-Position: refs/heads/master@{#424770} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/281c15dfc08bd0a1b1d3972c5b27784ce5e25020 Cr-Commit-Position: refs/heads/master@{#424770} |
