0
Commit Graph

42 Commits

Author SHA1 Message Date
Cathy Li
97f8a515f3 [Webfeed]: Connect sectionheaderlist to view supporting multiple headers.
Note that minimal styling work has been done. More to come in a later CL.

Bug: 1152592
Change-Id: I5df9a754ee985685b4af14bab248d48d98ec69c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2729758
Commit-Queue: Cathy Li <chili@chromium.org>
Reviewed-by: Theresa  <twellington@chromium.org>
Reviewed-by: Dan H <harringtond@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863048}
2021-03-15 23:55:10 +00:00
Dan Harrington
f3add8f687 Remove Feedv1 code
Much of this code was already compiled-out. Some exceptions:

- Code branches with if (v1 enabled) { ... } were removed.
- Extracted functions from v1 library LocateUtils class into
FeedServiceBridge.
- Some code in components/feed wasn't yet removed from
  the build, but wasn't referenced, and is now removed.
- Shared proto databases for v1 were added to
  kObsoleteSharedProtoDbTypeClients
- Obsoleted v1 specific prefs.

Bug: 1165828
Change-Id: I30bcfa7783f94f81f960a908916783e15bd98ef3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679184
Commit-Queue: Dan H <harringtond@chromium.org>
Reviewed-by: Cathy Li <chili@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#852237}
2021-02-09 17:35:30 +00:00
Dan Harrington
0fb4541d86 Some fixes for when building without feed v1
For context, enable_feed_v1=false removes the v1 version of the NTP
feed from the build. This CL fixes various problems with that
configuration:

* fixed some tests
* fixed some unused resource errors
* some tests were more difficult to fix, i've made some
  assertions conditional. Instant start isn't yet implemented
  for v2, so it's likely these require more than test updates.

Bug: 1129187
Change-Id: If1cfbdd9e596c61c082565279a545326f1dba244
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441958
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814276}
2020-10-06 17:45:53 +00:00
Angela Yoeurng
d353848972 [omnibox] Removed references to physical web
Bug: 1075723
Change-Id: I241ae1ad357e6a53d53724eb0da7dc095e18d723
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293107
Reviewed-by: manuk hovanesian <manukh@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788223}
2020-07-14 17:19:15 +00:00
Dan Harrington
a814993f92 Standardize feed android resources
Note: this is a slightly modified reland of
https://chromium-review.googlesource.com/c/chromium/src/+/1956275.
The only difference is adding SuppressWarnings for Validators.java,
which was prompted due a change in errorprone.

  - Restructure to match chrome/browser/java/res
  - Replace strings with references to existing .grd strings
  - I kept Piet resources separate, since piet may eventually be moved into
    a different library.
  - Move feed/library sources into chrome_java

Strings changed:
  snackbar_fetch_no_new_suggestions -> ntp_suggestions_fetch_no_new_suggestions
  snackbar_fetch_failed -> ntp_suggestions_fetch_failed
  snackbar_default_action -> undo

It looks like chromium's strings are translated to more languages, so
this might provide better localization. Some of these strings are
translated differently between feed and zine.

TBR=dtrainor@chromium.org,wnwen@chromium.org,twellington@chromium.org,carlosk@chromium.org

Change-Id: I2a14b0c4b4b60c7ab5b45ead0ec75b09233f4d99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017243
Reviewed-by: Dan H <harringtond@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734726}
2020-01-23 23:58:36 +00:00
Dan H
af536b762b Revert "Reland "Standardize feed android resources""
This reverts commit ef75a2f40b.

Reason for revert: The reland wasn't intended to be submitted yet.

Original change's description:
> Reland "Standardize feed android resources"
> 
> This reverts commit 807fab7951.
> 
> Reason for revert: Culprit was errorprone update this morning, which happened after trybot runs for this CL.
> 
> Original change's description:
> > Revert "Standardize feed android resources"
> > 
> > This reverts commit 0e853eb954.
> > 
> > Reason for revert: Suspect culprit for build failure
> > 
> > Sample failure:
> > https://ci.chromium.org/p/chromium/builders/ci/android-archive-rel/8660
> > 
> > Original change's description:
> > > Standardize feed android resources
> > > 
> > >   - Restructure to match chrome/browser/java/res
> > >   - Replace strings with references to existing .grd strings
> > >   - I kept Piet resources separate, since piet may eventually be moved into
> > >     a different library.
> > >   - Move feed/library sources into chrome_java
> > > 
> > > Strings changed:
> > >   snackbar_fetch_no_new_suggestions -> ntp_suggestions_fetch_no_new_suggestions
> > >   snackbar_fetch_failed -> ntp_suggestions_fetch_failed
> > >   snackbar_default_action -> undo
> > > 
> > > It looks like chromium's strings are translated to more languages, so
> > > this might provide better localization. Some of these strings are
> > > translated differently between feed and zine.
> > > 
> > > Bug: 1024945
> > > Change-Id: If9862a4965756e28ba812bf315556d6b8db09e62
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1956275
> > > Reviewed-by: David Trainor <dtrainor@chromium.org>
> > > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > > Reviewed-by: Theresa  <twellington@chromium.org>
> > > Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
> > > Commit-Queue: Dan H <harringtond@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#734575}
> > 
> > TBR=wnwen@chromium.org,dtrainor@chromium.org,twellington@chromium.org,govind@chromium.org,megjablon@chromium.org,carlosk@chromium.org,harringtond@chromium.org
> > 
> > Change-Id: I3c14db8a0c67bf5b784955df6241443489b5b8af
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 1024945
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015411
> > Reviewed-by: Sebastien Lalancette <seblalancette@chromium.org>
> > Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#734596}
> 
> TBR=wnwen@chromium.org,dtrainor@chromium.org,twellington@chromium.org,govind@chromium.org,megjablon@chromium.org,carlosk@chromium.org,seblalancette@chromium.org,harringtond@chromium.org
> 
> Change-Id: Ie6d83d3cf8d802a70cc73e4a24b0872d3b04ae17
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1024945
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017944
> Reviewed-by: Dan H <harringtond@chromium.org>
> Commit-Queue: Dan H <harringtond@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#734597}

TBR=wnwen@chromium.org,dtrainor@chromium.org,twellington@chromium.org,govind@chromium.org,megjablon@chromium.org,carlosk@chromium.org,seblalancette@chromium.org,harringtond@chromium.org

Change-Id: I8151ab3fe16c219f2d9c3295a7d7b6c0c7d69731
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1024945
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017946
Reviewed-by: Dan H <harringtond@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734598}
2020-01-23 20:55:17 +00:00
Dan H
ef75a2f40b Reland "Standardize feed android resources"
This reverts commit 807fab7951.

Reason for revert: Culprit was errorprone update this morning, which happened after trybot runs for this CL.

Original change's description:
> Revert "Standardize feed android resources"
> 
> This reverts commit 0e853eb954.
> 
> Reason for revert: Suspect culprit for build failure
> 
> Sample failure:
> https://ci.chromium.org/p/chromium/builders/ci/android-archive-rel/8660
> 
> Original change's description:
> > Standardize feed android resources
> > 
> >   - Restructure to match chrome/browser/java/res
> >   - Replace strings with references to existing .grd strings
> >   - I kept Piet resources separate, since piet may eventually be moved into
> >     a different library.
> >   - Move feed/library sources into chrome_java
> > 
> > Strings changed:
> >   snackbar_fetch_no_new_suggestions -> ntp_suggestions_fetch_no_new_suggestions
> >   snackbar_fetch_failed -> ntp_suggestions_fetch_failed
> >   snackbar_default_action -> undo
> > 
> > It looks like chromium's strings are translated to more languages, so
> > this might provide better localization. Some of these strings are
> > translated differently between feed and zine.
> > 
> > Bug: 1024945
> > Change-Id: If9862a4965756e28ba812bf315556d6b8db09e62
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1956275
> > Reviewed-by: David Trainor <dtrainor@chromium.org>
> > Reviewed-by: Peter Wen <wnwen@chromium.org>
> > Reviewed-by: Theresa  <twellington@chromium.org>
> > Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
> > Commit-Queue: Dan H <harringtond@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#734575}
> 
> TBR=wnwen@chromium.org,dtrainor@chromium.org,twellington@chromium.org,govind@chromium.org,megjablon@chromium.org,carlosk@chromium.org,harringtond@chromium.org
> 
> Change-Id: I3c14db8a0c67bf5b784955df6241443489b5b8af
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1024945
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015411
> Reviewed-by: Sebastien Lalancette <seblalancette@chromium.org>
> Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#734596}

TBR=wnwen@chromium.org,dtrainor@chromium.org,twellington@chromium.org,govind@chromium.org,megjablon@chromium.org,carlosk@chromium.org,seblalancette@chromium.org,harringtond@chromium.org

Change-Id: Ie6d83d3cf8d802a70cc73e4a24b0872d3b04ae17
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1024945
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017944
Reviewed-by: Dan H <harringtond@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734597}
2020-01-23 20:51:37 +00:00
Sebastien Lalancette
807fab7951 Revert "Standardize feed android resources"
This reverts commit 0e853eb954.

Reason for revert: Suspect culprit for build failure

Sample failure:
https://ci.chromium.org/p/chromium/builders/ci/android-archive-rel/8660

Original change's description:
> Standardize feed android resources
> 
>   - Restructure to match chrome/browser/java/res
>   - Replace strings with references to existing .grd strings
>   - I kept Piet resources separate, since piet may eventually be moved into
>     a different library.
>   - Move feed/library sources into chrome_java
> 
> Strings changed:
>   snackbar_fetch_no_new_suggestions -> ntp_suggestions_fetch_no_new_suggestions
>   snackbar_fetch_failed -> ntp_suggestions_fetch_failed
>   snackbar_default_action -> undo
> 
> It looks like chromium's strings are translated to more languages, so
> this might provide better localization. Some of these strings are
> translated differently between feed and zine.
> 
> Bug: 1024945
> Change-Id: If9862a4965756e28ba812bf315556d6b8db09e62
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1956275
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Theresa  <twellington@chromium.org>
> Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
> Commit-Queue: Dan H <harringtond@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#734575}

TBR=wnwen@chromium.org,dtrainor@chromium.org,twellington@chromium.org,govind@chromium.org,megjablon@chromium.org,carlosk@chromium.org,harringtond@chromium.org

Change-Id: I3c14db8a0c67bf5b784955df6241443489b5b8af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1024945
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015411
Reviewed-by: Sebastien Lalancette <seblalancette@chromium.org>
Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734596}
2020-01-23 19:53:51 +00:00
Dan Harrington
0e853eb954 Standardize feed android resources
- Restructure to match chrome/browser/java/res
  - Replace strings with references to existing .grd strings
  - I kept Piet resources separate, since piet may eventually be moved into
    a different library.
  - Move feed/library sources into chrome_java

Strings changed:
  snackbar_fetch_no_new_suggestions -> ntp_suggestions_fetch_no_new_suggestions
  snackbar_fetch_failed -> ntp_suggestions_fetch_failed
  snackbar_default_action -> undo

It looks like chromium's strings are translated to more languages, so
this might provide better localization. Some of these strings are
translated differently between feed and zine.

Bug: 1024945
Change-Id: If9862a4965756e28ba812bf315556d6b8db09e62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1956275
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Theresa  <twellington@chromium.org>
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734575}
2020-01-23 19:06:40 +00:00
Carlos Knippschild
8200555ec6 Creates a branded version of the articles for you section
This step only adds the branded version of the NTP's articles for you
section. Follow up changes will actually put it to use.

Bug: 1031288
Change-Id: Ife09b760ad936a021d645e2acb69e73219abda21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1954318
Reviewed-by: Dan H <harringtond@chromium.org>
Reviewed-by: Dmitry Titov <dimich@chromium.org>
Commit-Queue: Carlos Knippschild <carlosk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722326}
2019-12-06 01:24:59 +00:00
Chris Sharp
3435cdefe8 Add strings to allow experimenting with non-article content in the feed.
Bug: 1011100
Change-Id: Icd63616b1cceab782cb767a19489222f3c53b24e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906630
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Chris Sharp <csharp@chromium.org>
Reviewed-by: Tommy Martino <tmartino@chromium.org>
Commit-Queue: Chris Sharp <csharp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714927}
2019-11-13 15:36:56 +00:00
Natalie Chouinard
4333643a19 Remove dead Bookmark Suggestions code
The Bookmark Suggestions feature is disabled and this code is no longer
in use.

A follow up change will mark the BOOKMARKS category as deprecated.

Bug: 945439
Change-Id: I2ba9791d6eedc717b5670a50b09f2058399293a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1538803
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644820}
2019-03-27 15:57:18 +00:00
Mikel Astiz
6143297486 Remove experimental NTPForeignSessionsSuggestions
The feature was never launched and the code has been effectively dead
for about a year, so let's clean it up.

Bug: 883199,649880
Change-Id: I91bb4cf9e94e01fcea07d4bc70812f95da2f1231
Reviewed-on: https://chromium-review.googlesource.com/c/1271096
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598244}
2018-10-10 07:36:05 +00:00
Shakti Sahu
a7ce0368be Download Home : string changes
Bug: 850592
Change-Id: Ia5e6df2f02709547905f15c6abad692d4a7b8805
Reviewed-on: https://chromium-review.googlesource.com/1137844
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576579}
2018-07-19 18:48:43 +00:00
Boris Sazonov
2a9c134dc6 [Signin][Android] Remove dead code for old signin promos from NTP
This CL removes dead code for generic signin promos that had been shown
in the NTP before personalized signin promos were implemented. It also
fixes JavaDoc link in the same file.

Bug: 792430
Change-Id: Id555628a12301764fbd0e2a75964978d2be2b59d
Reviewed-on: https://chromium-review.googlesource.com/854896
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527998}
2018-01-09 15:27:18 +00:00
gambard
9169af5e8a Let ContentSuggestions title be title cased
Android uses sentence case for the title, iOS uses title case. This CL
changes the local suggestions only.

Bug: 747973
Change-Id: I06839d73f44f39cf058c9e2f609b6db7a6bb9c2f
Reviewed-on: https://chromium-review.googlesource.com/603714
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492574}
2017-08-08 09:07:14 +00:00
gambard
97a5a4ae33 Add spinner when fetching more suggestions
When more suggestions are fetched on the NTP, a spinner is displayed
to signal the user the suggestions are being fetched.
This spinner prevents the user from interacting with the button.
If the suggestions couldn't be fetched (network error...) a toast is
displayed.
If there is no more suggestions, the footer is removed.

Bug: 721229
Change-Id: Ib58fb446e76bbb752f37105135a58068713c96b5
Reviewed-on: https://chromium-review.googlesource.com/602130
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Elodie Banel <lod@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492350}
2017-08-07 17:39:21 +00:00
gambard
08dded8602 Add a message to empty ContentSuggestions sections
This CL adds a message to be displayed in the empty ContentSuggestions sections.

BUG=686728

Review-Url: https://codereview.chromium.org/2775593002
Cr-Commit-Position: refs/heads/master@{#460052}
2017-03-28 09:32:53 +00:00
gambard
c9bff741d8 Create ReadingListSuggestionsProvider
This CL creates the ReadingListSuggestionsProvider.

BUG=702241

Review-Url: https://codereview.chromium.org/2755113002
Cr-Commit-Position: refs/heads/master@{#460039}
2017-03-28 07:58:20 +00:00
sfiera
3614917466 ntp_snippets: update string based on feedback
The English string wasn't entirely clear about who published the
headlining article and the other articles, so it was hard to translate.

Review-Url: https://codereview.chromium.org/2765353005
Cr-Commit-Position: refs/heads/master@{#459408}
2017-03-24 13:38:48 +00:00
peconn
9cdcb2efd7 🏡 Deduplicate no content string.
Also, change some apostrophes.

BUG=699932

Review-Url: https://codereview.chromium.org/2740113002
Cr-Commit-Position: refs/heads/master@{#456033}
2017-03-10 10:10:22 +00:00
sfiera
633a30085d NTP: Add string for grouped notifications
This string is used as the message of a notification that links to the
NTP instead of directly to a particular article. I'm not 100% certain
that it's the exact string we want to use, but I'd like to get some
string in by BP, because there's no possibility to merge it later if we
find out that link-to-NTP is a blocker.

BUG=678268

Review-Url: https://codereview.chromium.org/2709083006
Cr-Commit-Position: refs/heads/master@{#452853}
2017-02-24 17:06:34 +00:00
dgn
eaa81c92de [NTP Client] Always add space above the Signin Promo
We used to only add space between the signin promo and the preceding
item when it was not a suggestion, but since most of the time it is
not a suggestion and the message can be ambiguous when attached to
the suggestions, we now want to just always add that space.

BUG=676311

Review-Url: https://codereview.chromium.org/2613593003
Cr-Commit-Position: refs/heads/master@{#443872}
2017-01-16 12:09:08 +00:00
skym
d013aca1c6 Update title of foreign tabs Zine section.
BUG=673869

Review-Url: https://codereview.chromium.org/2594213003
Cr-Commit-Position: refs/heads/master@{#441177}
2017-01-03 19:14:01 +00:00
vitaliii
c68f6585d9 [NTP] Translateable strings for recent tabs and physical web sections.
BUG=667764

Review-Url: https://codereview.chromium.org/2532783003
Cr-Commit-Position: refs/heads/master@{#441121}
2017-01-03 14:38:07 +00:00
skym
e1d6d4ff4e Adding a category specific string for the empty foreign tabs suggestions section.
Previously the foreign tabs section used the generic empty section text. This change adds a custom string to make it slightly me specific and useful. Another benefit of the string we choose, it is explains that this section shows tabs from other devices, which isn't currently explained by the section header.

BUG=663966

Review-Url: https://codereview.chromium.org/2500963005
Cr-Commit-Position: refs/heads/master@{#432484}
2016-11-16 15:00:33 +00:00
skym
737a80cd1b Updating foreign tabs suggestion's title and text.
Two separate things are being changes in this:

* The title of the foreign tabs suggestions on the new tab page is being updated from "Continue from another device" to "Recent tabs". This helps bring the title more inline with existing UI, and is shorter. There are not currently any local tab suggestions on this page so we dodge ambiguity for now. This could change in the future.

* The individual suggestions no longer contain the foreign device's name. The name is sometimes not very readable or useful, and created long, ugly lines. This also results in a very consistent experience between this section and the other sections, where the 'publisher' line only contains favicon, domain, and age.

BUG=663966

Review-Url: https://codereview.chromium.org/2497343002
Cr-Commit-Position: refs/heads/master@{#432199}
2016-11-15 17:04:32 +00:00
finkm
88cdcbd519 NTPSnippets: Clarified description of the 'Recent bookmarks' string
BUG=665388

Review-Url: https://codereview.chromium.org/2498303002
Cr-Commit-Position: refs/heads/master@{#432159}
2016-11-15 10:56:17 +00:00
vitaliii
a97c47f198 [NTP] Remove unused resource string and TODOs.
Due to crbug.com/660343 we could not remove an unused resource string,
which is finally removed in this CL. Also an obsolete TODO related to
crbug.com/641568 is removed (offline pages are now opened correctly,
see crbug.com/661214).

BUG=none

Review-Url: https://codereview.chromium.org/2477313003
Cr-Commit-Position: refs/heads/master@{#430273}
2016-11-07 14:58:04 +00:00
vitaliii
dbedcae7e3 [NTPSnippets] Show all downloads on the NTP (3/3): Downloads provider.
This CL is the third of the three CLs.
The overall aim is to show all types of downloads on the NTP in
downloads section.

This CL adds DownloadSuggestionsProvider, which provides both offline
page (e.g. offlined pages) and asset (e.g. images) downloads.

If any of the two previous CLs is reverted, this CL must be reverted too.

BUG=639233

Review-Url: https://codereview.chromium.org/2360263002
Cr-Commit-Position: refs/heads/master@{#429194}
2016-11-02 03:02:41 +00:00
treib
c8a8ed14c6 [NTP Snippets] Pass "no suggestions" message from the backend to the UI
BUG=656008

Review-Url: https://codereview.chromium.org/2447163004
Cr-Commit-Position: refs/heads/master@{#427733}
2016-10-26 17:39:49 +00:00
dgn
9116cbaf9f [NTP Client] Update the strings for the empty state cards
Does not add or change any resource id.

BUG=656634

Review-Url: https://codereview.chromium.org/2424033002
Cr-Commit-Position: refs/heads/master@{#426000}
2016-10-18 17:25:51 +00:00
dgn
b48353878e [NTP Client] Add default empty state strings for remote sections
Preview: https://goo.gl/photos/aK3GPFL5Z7MSzcwn8

BUG=656008

Review-Url: https://codereview.chromium.org/2426663002
Cr-Commit-Position: refs/heads/master@{#425932}
2016-10-18 09:26:01 +00:00
dgn
76d61d3752 [NTP Client][Reland]Use the separate button style for the NoArticles status
Original issue's description:
> [NTP Client] Use the separate button style for the NoArticles status
>
> Makes the articles and bookmarks sections use the same style of status
> card when they have no snippets.
>
> the hasMoreButton property of categories now only determines whether
> the action item will be shown when there are suggestions to display.
>
> This patch also lets the SuggestionsCategoryInfo be aware of the
> current category it is describing, and moves various category specific
> behaviours into the SuggestionsCategoryInfo class.
>
> Preview: https://goo.gl/photos/VhceT6cjvME6QS8m7
>
> BUG=649670
>
> Committed: https://crrev.com/ffa8e3905fed0b1df0d56ab6e4b17791b31cd171
> Cr-Commit-Position: refs/heads/master@{#423517}

> Revert Data:
> Committed: https://crrev.com/b5e8956c2c8a10484d10a117b3ef5a33ee58cb6c
> Cr-Commit-Position: refs/heads/master@{#423573}

BUG=649670

Review-Url: https://codereview.chromium.org/2401643004
Cr-Commit-Position: refs/heads/master@{#423863}
2016-10-07 15:34:43 +00:00
twellington
b5e8956c2c Revert of 📰 Use the separate button style for the NoArticles status (patchset id:100001 of https://codereview.chromium.org/2392943002/ )
Reason for revert:
Breaking tests on Android bots, see bug comment.

Original issue's description:
> [NTP Client] Use the separate button style for the NoArticles status
>
> Makes the articles and bookmarks sections use the same style of status
> card when they have no snippets.
>
> the hasMoreButton property of categories now only determines whether
> the action item will be shown when there are suggestions to display.
>
> This patch also lets the SuggestionsCategoryInfo be aware of the
> current category it is describing, and moves various category specific
> behaviours into the SuggestionsCategoryInfo class.
>
> Preview: https://goo.gl/photos/VhceT6cjvME6QS8m7
>
> BUG=649670
>
> Committed: https://crrev.com/ffa8e3905fed0b1df0d56ab6e4b17791b31cd171
> Cr-Commit-Position: refs/heads/master@{#423517}

TBR=bauerb@chromium.org,dgn@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=649670

Review-Url: https://codereview.chromium.org/2398463005
Cr-Commit-Position: refs/heads/master@{#423573}
2016-10-06 17:37:47 +00:00
dgn
ffa8e3905f [NTP Client] Use the separate button style for the NoArticles status
Makes the articles and bookmarks sections use the same style of status
card when they have no snippets.

the hasMoreButton property of categories now only determines whether
the action item will be shown when there are suggestions to display.

This patch also lets the SuggestionsCategoryInfo be aware of the
current category it is describing, and moves various category specific
behaviours into the SuggestionsCategoryInfo class.

Preview: https://goo.gl/photos/VhceT6cjvME6QS8m7

BUG=649670

Review-Url: https://codereview.chromium.org/2392943002
Cr-Commit-Position: refs/heads/master@{#423517}
2016-10-06 14:15:30 +00:00
skym
9e961dbb27 [Sync] Initial implementation of foreign sessions suggestions provider.
BUG=646951

Review-Url: https://codereview.chromium.org/2279123002
Cr-Commit-Position: refs/heads/master@{#419520}
2016-09-19 21:02:14 +00:00
dgn
78a053aeef [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

Review-Url: https://codereview.chromium.org/2249903003
Cr-Commit-Position: refs/heads/master@{#413141}
2016-08-19 14:39:55 +00:00
pke
c4fe8dd8b9 Split OfflinePageSuggestions into two categories
Add separate flags for enabling the recent tabs and downloads sections.
Update flags shown on snippets-internals page. Modify the
OfflinePageSuggestionsProvider to handle the two categories, especially
to split the OfflinePageItems coming from the OfflinePageModel into two
distinct lists ordered by the last accessed date.

Use the title from the OfflinePageItem, if available; use the URL as
a fallback otherwise.

Add more-button actions for Recent Tabs and Downloads to open the
respective native UIs.

TBR=cpu@chromium.org (for generated_resources.grd)
BUG=628198
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2245583002
Cr-Commit-Position: refs/heads/master@{#411645}
2016-08-12 14:38:41 +00:00
pke
bd2f650a67 Add CategoryInfo for meta information of content suggestions Categories
Apart from the ContentSuggestions in a Category and its current status,
there is meta information assigned with a Category that does not change
even for dynamically added categories. This information includes the
title, for example.

Implement a new CategoryInfo struct (with currently only the title
and a card_layout field) and corresponding methods to hand the
information from the ContentSuggestionsProviders to the
ContentSuggestionsService and out towards the UI.
Implement those methods in the three providers we currently have.

For the offline pages, only use a placeholder string at the moment,
because it will provide two distinct categories with different titles
in the future.

BUG=632320

Review-Url: https://codereview.chromium.org/2207493002
Cr-Commit-Position: refs/heads/master@{#410672}
2016-08-09 14:58:34 +00:00
dgn
c09dbeacff [NTP Client] Remove SnippetService's dependency on Sync
The SnippetService doesn't care about the sync state anymore so we
can get rid of that dependency.

BUG=627488
TBR=noyau@chromium.org

Review-Url: https://codereview.chromium.org/2191343002
Cr-Commit-Position: refs/heads/master@{#408650}
2016-07-29 16:18:57 +00:00
dgn
bea29e22d8 [NTP Snippets] The Status card reports disabled sync states
When there are no snippets to display, the Status card now
shows an appropriate message and action for the following
contexts:

- User is signed out
- User has disabled sync
- User has disabled history sync
- User has set a custom passphrase

The detection of those states is done by the newly added
NTPSnippetsStatusService.

Preview: https://goo.gl/photos/gpDA8g6Mm2jW56e87

BUG=612508

Review-Url: https://codereview.chromium.org/2061803002
Cr-Commit-Position: refs/heads/master@{#402537}
2016-06-28 20:41:30 +00:00