Add spinner when fetching more suggestions

Desktop / Chromium - gambard [chromium.org] - 7 August 2017 13:39 EDT

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

97a5a4a Add spinner when fetching more suggestions
components/ntp_snippets_strings.grdp | 4 ++
.../content_suggestions_mediator.mm | 11 ++--
.../browser/content_suggestions/mediator_util.h | 3 +
.../browser/content_suggestions/mediator_util.mm | 14 +++++
.../browser/ui/content_suggestions/cells/BUILD.gn | 1 +
.../cells/content_suggestions_footer_item.h | 39 +++++++++---
.../cells/content_suggestions_footer_item.mm | 70 +++++++++++++++------
.../content_suggestions_footer_item_unittest.mm | 52 ++++++++++------
.../content_suggestions_collection_updater.mm | 71 ++++++++++++++++++----
.../content_suggestions_data_source.h | 18 +++++-
.../material_cell_catalog_view_controller.mm | 2 +-
11 files changed, 221 insertions(+), 64 deletions(-)

Upstream: git.chromium.org


  • Share