Skip to content

Commit

Permalink
[MD settings] help button in content settings site lists
Browse files Browse the repository at this point in the history
This CL removes the Learn more row button in the Content settings and
puts that functionality in a new help button in the upper right of the
subpage.

BUG=658060
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://chromiumcodereview.appspot.com/2432383005
Cr-Commit-Position: refs/heads/master@{#426941}
  • Loading branch information
dschuyler authored and Commit bot committed Oct 22, 2016
1 parent 99557fe commit 5805da7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 14 deletions.
4 changes: 4 additions & 0 deletions chrome/browser/resources/settings/images/help_outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions chrome/browser/resources/settings/privacy_page/privacy_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<dom-module id="settings-privacy-page">
<template>
<style include="settings-shared">
button[is='paper-icon-button-light'].icon-help {
background-image: url(../images/help_outline.svg);
}

/* TODO(dbeam): this is similar to a 1 line checkbox. Worth somehow
* combining? */
#metricsReporting {
Expand Down Expand Up @@ -187,6 +191,8 @@
<template is="dom-if" route-path="/siteSettings/automaticDownloads"
no-search>
<settings-subpage page-title="$i18n{siteSettingsAutomaticDownloads}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.AUTOMATIC_DOWNLOADS}}">
Expand All @@ -196,6 +202,8 @@
<template is="dom-if" route-path="/siteSettings/backgroundSync" no-search>
no-search>
<settings-subpage page-title="$i18n{siteSettingsBackgroundSync}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.BACKGROUND_SYNC}}">
Expand All @@ -204,6 +212,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/camera" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryCamera}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.CAMERA}}">
Expand All @@ -213,6 +223,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/cookies" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryCookies}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.COOKIES}}">
Expand All @@ -229,6 +241,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/images" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryImages}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.IMAGES}}">
Expand All @@ -237,6 +251,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/location" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryLocation}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.GEOLOCATION}}">
Expand All @@ -255,6 +271,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/javascript" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryJavascript}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.JAVASCRIPT}}">
Expand All @@ -263,6 +281,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/keygen" no-search>
<settings-subpage page-title="$i18n{siteSettingsKeygen}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.KEYGEN}}">
Expand All @@ -271,6 +291,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/microphone" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryMicrophone}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.MIC}}">
Expand All @@ -280,6 +302,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/notifications" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryNotifications}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.NOTIFICATIONS}}">
Expand All @@ -288,6 +312,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/flash" no-search>
<settings-subpage page-title="$i18n{siteSettingsFlash}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.PLUGINS}}">
Expand All @@ -296,6 +322,8 @@
</template>
<template is="dom-if" route-path="/siteSettings/popups" no-search>
<settings-subpage page-title="$i18n{siteSettingsCategoryPopups}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.POPUPS}}">
Expand All @@ -305,6 +333,8 @@
<template is="dom-if" route-path="/siteSettings/unsandboxedPlugins"
no-search>
<settings-subpage page-title="$i18n{siteSettingsUnsandboxedPlugins}">
<button class="icon-help subpage-title-extra"
is="paper-icon-button-light" on-tap="onHelpTap_"></button>
<site-settings-category
selected-site="{{selectedSite}}"
category="{{ContentSettingsTypes.UNSANDBOXED_PLUGINS}}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ Polymer({
settings.navigateToPreviousRoute();
},

/** @private */
onHelpTap_: function() {
window.open(
'https://support.google.com/chrome/?p=settings_manage_exceptions');
},

<if expr="_google_chrome and not chromeos">
/** @private */
onMetricsReportingCheckboxTap_: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@

h1 {
color: var(--settings-nav-grey);
font-size: 107.6923%; /* go to 14px from 13px */
flex: 1; /* Push other items to the end. */
font-size: 107.6923%; /* Go to 14px from 13px */
font-weight: 500;
}

Expand All @@ -49,6 +50,7 @@ <h1>[[pageTitle]]</h1>
on-search-changed="onSearchChanged_">
</settings-subpage-search>
</template>
<content select=".subpage-title-extra"></content>
</div>
<content></content>
</template>
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/resources/settings/settings_shared_css.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
transform: scaleX(-1); /* Flip on the X axis (aka mirror). */
}

[actionable] button[is="paper-icon-button-light"].subpage-arrow {
[actionable] button[is='paper-icon-button-light'].subpage-arrow {
background-image: url(images/arrow_right.svg);
}

[actionable] button[is="paper-icon-button-light"].icon-external {
[actionable] button[is='paper-icon-button-light'].icon-external {
background-image: url(images/open_in_new.svg);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,16 @@

<content select=".cookie-controls"></content>

<div class="settings-box layout horizontal">
<if expr="chromeos">
<div class="settings-box layout horizontal">
<div class="flex" hidden$="[[!isPluginCategory_(category)]]">
<div class="list-item list-button"
on-tap="onAdobeFlashStorageClicked_">
$i18n{adobeFlashStorage}
</div>
</div>
</if>
<div class="list-item list-button" on-tap="onLearnMoreClicked_">
$i18n{learnMore}
</div>
</div>
</if>

<site-list
category="[[category]]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@ Polymer({
return category == settings.ContentSettingsTypes.PLUGINS;
},

/** @private */
onLearnMoreClicked_: function() {
window.open(
'https://support.google.com/chrome/?p=settings_manage_exceptions');
},

/** @private */
onAdobeFlashStorageClicked_: function() {
window.open('https://www.macromedia.com/support/' +
Expand Down

0 comments on commit 5805da7

Please sign in to comment.