Commit 86fac9fd authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Flip the sorting column icon

The sorting icon should be an arrow pointing up when sorting in
ascending order.

Bug: 1081853
Change-Id: If559358bb05aa34a4875504ea4386364c25ccd01
Fixed: 1081853
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2208887
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770933}
parent 16e86c0b
......@@ -278,7 +278,7 @@ function renderHeader_(table) {
if (util.isFilesNg()) {
const icon = document.createElement('cr-icon-button');
const iconName = sortOrder === 'desc' ? 'down' : 'up';
const iconName = sortOrder === 'desc' ? 'up' : 'down';
icon.setAttribute('iron-icon', `files16:arrow_${iconName}_small`);
icon.setAttribute('tabindex', '-1');
icon.classList.add('sort-icon', 'no-overlap');
......
......@@ -308,7 +308,7 @@ testcase.fileDisplayUsbPartitionSort = async () => {
await remoteCall.callRemoteTestUtil(
'fakeMouseClick', appId, ['.table-header-cell:nth-of-type(4)']);
const iconSortedAsc = (await isFilesNg(appId)) ?
'.table-header-cell .sorted [iron-icon="files16:arrow_down_small"]' :
'.table-header-cell .sorted [iron-icon="files16:arrow_up_small"]' :
'.table-header-sort-image-asc';
await remoteCall.waitForElement(appId, iconSortedAsc);
......@@ -325,7 +325,7 @@ testcase.fileDisplayUsbPartitionSort = async () => {
await remoteCall.callRemoteTestUtil(
'fakeMouseClick', appId, ['.table-header-cell:nth-of-type(4)']);
const iconSortedDesc = (await isFilesNg(appId)) ?
'.table-header-cell .sorted [iron-icon="files16:arrow_up_small"]' :
'.table-header-cell .sorted [iron-icon="files16:arrow_down_small"]' :
'.table-header-sort-image-desc';
await remoteCall.waitForElement(appId, iconSortedDesc);
......
......@@ -25,7 +25,7 @@ testcase.restoreSortColumn = async () => {
// Check the sorted style of the header.
const iconSortedAsc = (await isFilesNg(appId)) ?
'.table-header-cell .sorted [iron-icon="files16:arrow_down_small"]' :
'.table-header-cell .sorted [iron-icon="files16:arrow_up_small"]' :
'.table-header-sort-image-asc';
await remoteCall.waitForElement(appId, iconSortedAsc);
......@@ -35,7 +35,7 @@ testcase.restoreSortColumn = async () => {
// Check the sorted style of the header.
const iconSortedDesc = (await isFilesNg(appId)) ?
'.table-header-cell .sorted [iron-icon="files16:arrow_up_small"]' :
'.table-header-cell .sorted [iron-icon="files16:arrow_down_small"]' :
'.table-header-sort-image-desc';
await remoteCall.waitForElement(appId, iconSortedDesc);
......
......@@ -75,10 +75,10 @@ testcase.sortColumns = async () => {
const isFilesNgEnabled = await isFilesNg(appId);
const iconSortedAsc = isFilesNgEnabled ?
'.table-header-cell .sorted [iron-icon="files16:arrow_down_small"]' :
'.table-header-cell .sorted [iron-icon="files16:arrow_up_small"]' :
'.table-header-sort-image-asc';
const iconSortedDesc = isFilesNgEnabled ?
'.table-header-cell .sorted [iron-icon="files16:arrow_up_small"]' :
'.table-header-cell .sorted [iron-icon="files16:arrow_down_small"]' :
'.table-header-sort-image-desc';
let a11yMessages;
......
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