New issue
Advanced search Search tips

Issue 699979 link

Starred by 1 user

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , iOS
Pri: 3
Type: Task



Sign in to add a comment

Cleanup CategoryStatus values in ContentSuggestionsService API

Project Member Reported by gambard@chromium.org, Mar 9 2017

Issue description

I don't see any usage for ntp_snippets::CategoryStatus::SIGNED_OUT. Is it still used?
 

Comment 1 by treib@chromium.org, Mar 9 2017

Cc: jkrcal@chromium.org vitaliii@chromium.org
I think it's not, and should be removed. I'll take a stab at it, unless someone else gets to it first :)
This might be a nice opportunity to revisit the various states a category can have.
I think we can simplify this a lot. Speaking of which there are probably other signals we send to the UI which can be revisited -- some also have a little complicated semantics. Would be a shame to re-implement things in iOS which aren't needed anymore. 

Should we book some time tomorrow or next week to look into these?

Comment 3 by treib@chromium.org, Mar 9 2017

Cc: bauerb@chromium.org dgn@chromium.org
Yup, that SGTM. We also need to include Android UI folks, since they'll know better which information is actually needed.

Comment 4 by treib@chromium.org, Mar 9 2017

Status: Started (was: Assigned)
Independent of that, I'll see about removing that status, which should be an easy cleanup.

Comment 5 by dgn@chromium.org, Mar 9 2017

Indeed, we don't use it anymore.

The last thing we did with it was use it as a signal to clear the suggestions on sign out, but this has been replaced by an explicit onFullRefreshRequired() method on the bridge in https://codereview.chromium.org/2519053002. The current code that mentions it can't be reached.

So removing SIGNED_OUT is fine from a UI perspective
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ce0e63223261f496b2721a83c42aae8b163da960

commit ce0e63223261f496b2721a83c42aae8b163da960
Author: treib <treib@chromium.org>
Date: Fri Mar 10 16:11:52 2017

Cleanup: Remove CategoryStatus::SIGNED_OUT

BUG=699979

Review-Url: https://codereview.chromium.org/2740783004
Cr-Commit-Position: refs/heads/master@{#456073}

[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/browser/android/ntp/content_suggestions_notifier_service.cc
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/browser/ui/webui/snippets_internals_message_handler.cc
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/suggestions/FakeSuggestionsSource.java
[modify] https://crrev.com/ce0e63223261f496b2721a83c42aae8b163da960/components/ntp_snippets/category_status.h

Comment 7 by treib@chromium.org, Mar 20 2017

Summary: Cleanup CategoryStatus values in ContentSuggestionsService API (was: Is Zine SIGNED_OUT CategoryStatus used?)
Repurposing the bug for cleaning up the CategoryStatus values we send to the UI:

The UI mostly cares about a bool that says whether the category is there or not. In addition, it uses the INITIALIZING and AVAILABLE_LOADING states as a signal that it should show a loading indicator.

Comment 8 by dgn@chromium.org, Mar 20 2017

Note: the UI does not use AVAILABLE_LOADING and INITIALIZING as the only signals for showing the loading indicator. Triggering a "fetch more" action also shows the indicator until the associated callback is triggered, without the above statuses being involved.

Comment 9 by treib@chromium.org, May 16 2017

Cc: treib@chromium.org
Owner: ----
Status: Available (was: Started)
Throwing back into the pool, since I'm not actively working on this.
Components: -UI>Browser>NewTabPage UI>Browser>ContentSuggestions
Labels: -Type-Bug Type-Task
Project Member

Comment 11 by sheriffbot@chromium.org, Sep 28

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -vitaliii@chromium.org
Status: Available (was: Untriaged)
jkrcal: Is something going to happen here? I don't want to assign to treib@ based on comment 9.
Cc: zea@chromium.org
Not on our end (treib@, jkrcal@). We do not own the ntp_snippets component any more.

cc'ing zea@ to possibly re-triage.
Cc: -dgn@chromium.org -bauerb@chromium.org -treib@chromium.org -jkrcal@chromium.org
Owner: fgor...@chromium.org
Filip, could you take a look (and possibly close out)?

Sign in to add a comment