Commit 5dd1ea8d authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[CrOS SplitSettings] Hide browser settings banner in OS subpages.

Test:
* Manually test by clicking system tray > bluetooth section > gear
  which opens bluetooth device page directly.  The banner will not
  be present.
* Manually go to settings page and notice banner.  Then, navigate
  into a subpage and notice that the banner is not present.


Bug: 997844
Change-Id: Iefe52c0e0111f15adf6c88147a77e4e2210fd0d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773204
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691017}
parent 0a966f3c
......@@ -108,7 +108,8 @@
currentRoute_, inSearchMode, hasExpandedSection_)]]">
<template is="dom-if"
if="[[prefs.settings.cros.show_browser_banner.value]]">
<div id="browserSettingsBanner" class="settings-box banner">
<div id="browserSettingsBanner" hidden="[[isSubpage_]]"
class="settings-box banner">
<div class="start">
<span>$i18nRaw{browserSettingsBannerText}</span>
<!-- Use role="presentation" because the <span> has an accessible
......
......@@ -86,6 +86,12 @@ Polymer({
computed: 'computeShowSecondaryUserBanner_(hasExpandedSection_)',
},
/** @private {boolean} */
isSubpage_: {
type: Boolean,
value: false,
},
/** @private {!settings.Route|undefined} */
currentRoute_: Object,
},
......@@ -141,6 +147,8 @@ Polymer({
assert(!this.hasExpandedSection_);
}
this.isSubpage_ = newRoute.isSubpage();
settings.MainPageBehavior.currentRouteChanged.call(
this, newRoute, oldRoute);
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment