Commit 3820b726 authored by Jordy Greenblatt's avatar Jordy Greenblatt Committed by Commit Bot

SettingsSplit: Add route for newly branched 'file' page

In my fix [1] for our bug to change the OS Settings 'downloads' section
to a naming pattern based around the term 'files' to match UX specs
[2], I didn't add a separate route for files for OS-Settings. This CL
adds that section in. I manually ensured that clicking 'Files' item in
os-settings-menu scrolls to the 'Files' section [3].

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1696180
[2] http://crbug.com/978648
[3] http://screen/9QpZtnw8TS0

Bug: 986466
Change-Id: I7d255a41015b307c674bf231878dffa72066ca5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713909Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679809}
parent ee997bc3
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
--ink-color: var(--menu-text-color); --ink-color: var(--menu-text-color);
align-items: center; align-items: center;
background: none; background: none;
border-radius: initial;
border: none; border: none;
border-radius: initial;
box-shadow: none; box-shadow: none;
color: var(--menu-text-color); color: var(--menu-text-color);
display: flex; display: flex;
...@@ -230,10 +230,10 @@ ...@@ -230,10 +230,10 @@
$i18n{osLanguagesPageTitle} $i18n{osLanguagesPageTitle}
</div> </div>
</a> </a>
<a href="/downloads"> <a href="/files">
<div class="item"> <div class="item">
<iron-icon icon="cr:file-download"></iron-icon> <iron-icon icon="cr:file-download"></iron-icon>
$i18n{downloadsPageTitle} $i18n{filesPageTitle}
</div> </div>
</a> </a>
<a href="/printing"> <a href="/printing">
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
* EDIT_DICTIONARY: (undefined|!settings.Route), * EDIT_DICTIONARY: (undefined|!settings.Route),
* EXTERNAL_STORAGE_PREFERENCES: (undefined|!settings.Route), * EXTERNAL_STORAGE_PREFERENCES: (undefined|!settings.Route),
* FINGERPRINT: (undefined|!settings.Route), * FINGERPRINT: (undefined|!settings.Route),
* FILES: (undefined|!settings.Route),
* FONTS: (undefined|!settings.Route), * FONTS: (undefined|!settings.Route),
* GOOGLE_ASSISTANT: (undefined|!settings.Route), * GOOGLE_ASSISTANT: (undefined|!settings.Route),
* IMPORT_DATA: (undefined|!settings.Route), * IMPORT_DATA: (undefined|!settings.Route),
...@@ -257,12 +258,6 @@ cr.define('settings', function() { ...@@ -257,12 +258,6 @@ cr.define('settings', function() {
r.SMART_LOCK = r.SMART_LOCK =
r.MULTIDEVICE_FEATURES.createChild('/multidevice/features/smartLock'); r.MULTIDEVICE_FEATURES.createChild('/multidevice/features/smartLock');
// TODO(hsuregan): Remove once this file is forked.
if (loadTimeData.getBoolean('isOSSettings')) {
r.PERSONALIZATION =
r.BASIC.createSection('/personalization', 'personalization');
r.CHANGE_PICTURE = r.PERSONALIZATION.createChild('/changePicture');
}
// </if> // </if>
if (pageVisibility.appearance !== false) { if (pageVisibility.appearance !== false) {
...@@ -333,7 +328,11 @@ cr.define('settings', function() { ...@@ -333,7 +328,11 @@ cr.define('settings', function() {
// </if> // </if>
// <if expr="chromeos"> // <if expr="chromeos">
// TODO(crbug.com/950007): Remove when SplitSettings is the default. // TODO(crbug.com/950007): Remove when SplitSettings is the default.
if (!loadTimeData.getBoolean('isOSSettings')) { if (loadTimeData.getBoolean('isOSSettings')) {
r.PERSONALIZATION =
r.BASIC.createSection('/personalization', 'personalization');
r.CHANGE_PICTURE = r.PERSONALIZATION.createChild('/changePicture');
} else {
r.CHANGE_PICTURE = r.PEOPLE.createChild('/changePicture'); r.CHANGE_PICTURE = r.PEOPLE.createChild('/changePicture');
} }
r.ACCOUNTS = r.PEOPLE.createChild('/accounts'); r.ACCOUNTS = r.PEOPLE.createChild('/accounts');
...@@ -449,7 +448,14 @@ cr.define('settings', function() { ...@@ -449,7 +448,14 @@ cr.define('settings', function() {
if (pageVisibility.downloads !== false) { if (pageVisibility.downloads !== false) {
r.DOWNLOADS = r.ADVANCED.createSection('/downloads', 'downloads'); r.DOWNLOADS = r.ADVANCED.createSection('/downloads', 'downloads');
// <if expr="chromeos"> // <if expr="chromeos">
r.SMB_SHARES = r.DOWNLOADS.createChild('/smbShares'); // TODO(crbug.com/950007): Make unconditional and remove 'else' block
// when SplitSettings is the default.
if (loadTimeData.getBoolean('isOSSettings')) {
r.FILES = r.ADVANCED.createSection('/files', 'files');
r.SMB_SHARES = r.FILES.createChild('/smbShares');
} else {
r.SMB_SHARES = r.DOWNLOADS.createChild('/smbShares');
}
// </if> // </if>
} }
......
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