Commit 443a130b authored by Jordy Greenblatt's avatar Jordy Greenblatt Committed by Commit Bot

[CrOS MultiDevice]: Fix bug in settings UI page

The basic settings page (via MainPageBehavior) searches its children
for settings-sections to hide when it expands a subpage. Because CL
https://chromium-review.googlesource.com/c/chromium/src/+/1105185
pushed the multidevice settings-section down the DOM tree, it is no
longer automatically hidden. To avoid dealing with the /deep/ selector
(see https://bugs.chromium.org/p/chromium/issues/detail?id=852098)
I just had the basic page take page expansion into account directly
when deciding whether to attach the
multidevice-settings-section-container.

Bug: 854400
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I89e08e5af79163146737d7ae5a9637536cb032c2
Reviewed-on: https://chromium-review.googlesource.com/1107168
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568711}
parent 60fa2abb
......@@ -111,8 +111,8 @@
</settings-section>
</template>
<template is="dom-if"
if="[[shouldShowMultidevice_(showMultidevice, pageVisibility)]]"
restamp>
if="[[shouldShowMultidevice_(showMultidevice, pageVisibility,
hasExpandedSection_, currentRoute_)]]" restamp>
<settings-multidevice-section-container prefs="{{prefs}}">
</settings-multidevice-section-container>
</template>
......
......@@ -239,7 +239,9 @@ Polymer({
shouldShowMultidevice_: function() {
const visibility = /** @type {boolean|undefined} */ (
this.get('pageVisibility.multidevice'));
return this.showMultidevice && this.showPage_(visibility);
return this.showMultidevice && this.showPage_(visibility) &&
(settings.routes.MULTIDEVICE.contains(this.currentRoute_) ||
!this.hasExpandedSection_);
},
/**
......
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