Make the MORE button more configurable |
||||||
Issue descriptionCurrently, we have one flag that is passed through from the backend to the UI: "has_more_button". It has a few issues currently: 1. This name is wrong, as we now always have a button for a section. When all suggestions are dismissed, we will show the button with the empty state card. "always_show_more_button" would be a more accurate name. 2. We might want to not show the button at all. For example, for the Downloads section, when the Download Manager UI is not enabled, we have nowhere to send the user to. The action button should not be shown. +rachelis@ and nepper@ to confirm that this is what we want. 3. We might want to change the label of the button (+rachelis@, nepper@: Do we?) 4. The button has different behaviours attached to it: a) Navigate somwhere: e.g. Downloads, Bookmarks b) Reload the section: e.g. Articles when empty c) Fetch more suggestions: e.g. Articles when not empty It could be useful to let the provider specify what kind of behaviour it wants, especially for the remote sections. They have no way of doing something special right now. Maybe we would want to navigate to a new page when tapping it? (making up stuff: intent to Gmail or Maps maybe?)
,
Oct 27 2016
,
Oct 27 2016
Sounds all good! Non-blocking: I believe we will have cases where in c) we will want to be able to stop showing a MORE button when after the last fetch no more suggestions are available.
,
Oct 28 2016
Meeting outcome: Update CategoryInfo: - Remove "has_more_button": all the buttons are named MORE anyway. - Add has_more_action: When true, we will show a button that will fetch more suggestions for the category when tapped. That button will only be there when there are some suggestions - has_view_all_action: When true, we will show a button that will navigate somewhere when tapped. For now the behaviour is hardcoded in the UI for known categories. - bool has_reload_action: When true, we will show a button that will reload suggestions for the category. It will only be there when there are no suggestions. We won't support showing multiple buttons at the same time for now. Reload and More are mutually exclusive, and ViewAll has priority over both. This is to be consistent with the current behaviour. If a section is empty and has no button to show, or if show_if_empty is false, we will hide the section on new NTPs re #c3: Sure, it should not be an issue.
,
Oct 31 2016
Did you also discuss the timing of this refactoring? Will it happen in the timeframe of M56?
,
Oct 31 2016
For recent tabs we need to be able to hide the MORE button, so that's one of the reasons we want to do it now. It will be better for the Fetch More action too. CL up at https://codereview.chromium.org/2463133002/#, but we are in a shortage of OWNERS at the moment...
,
Oct 31 2016
,
Nov 1 2016
I am not sure about Recent Tabs, but we need to hide it for Downloads for sure. However, I am not sure what is more important - opening suggestions properly or "More" button.
,
Nov 1 2016
Well, it's hard to test opening suggestions when we can't have them yet :p I looked at impression tracking, currently we would track only the first time the button for the section is shown for a given instance of NTP. That means we would also track only one impression for sequences like: - Press button to reload - New items are received and the button is hidden - Dismiss all items, the button comes back Or when tapping MORE to open the bookmark manager, then closing it, coming back to the NTP with the button. Is that WAI?
,
Nov 2 2016
We can use the more label for all of these. :)
,
Nov 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3ad4278a7d10da110db8738252e83ad8cbc61687 commit 3ad4278a7d10da110db8738252e83ad8cbc61687 Author: dgn <dgn@chromium.org> Date: Thu Nov 03 10:49:13 2016 [NTP Client] Make the MORE button more configurable Replace the single "has_more_button" from CategoryInfo by more granular flags: "has_more_action", "has_reload_action", "has_view_all_action" Update ActionItem in the UI to have a behaviour similar to the one of SignInPromo: an optional leaf, that doesn't need to be added and removed from the parent, does it by itself. Added a parent class to these 2 to implemnent that behaviour. BUG= 660030 Review-Url: https://codereview.chromium.org/2463133002 Cr-Commit-Position: refs/heads/master@{#429542} [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/Leaf.java [add] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/java_sources.gni [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/browser/android/ntp/ntp_snippets_bridge.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/chrome/browser/ntp_snippets/download_suggestions_provider.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/category_info.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/category_info.h [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/content_suggestions_service_unittest.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/remote/ntp_snippets_service.cc [modify] https://crrev.com/3ad4278a7d10da110db8738252e83ad8cbc61687/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc
,
Nov 7 2016
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by treib@chromium.org
, Oct 27 2016