Backed out changeset a008abcd3d9d (Bug 1823019) for breaking tests. rs=bustage-fix
--HG-- extra : amend_source : 3b2e932f70ffd1d19d4f59bbc29af0e447cbe7d5
This commit is contained in:
Родитель
2fb9de0a8a
Коммит
1818ef1688
|
@ -103,7 +103,6 @@ window.addEventListener("DOMContentLoaded", async event => {
|
|||
folderPaneContextMenu.init();
|
||||
await folderPane.init();
|
||||
await threadPane.init();
|
||||
threadPaneHeader.init();
|
||||
await messagePane.init();
|
||||
|
||||
accountCentralBrowser = document.getElementById("accountCentralBrowser");
|
||||
|
@ -130,7 +129,6 @@ window.addEventListener("unload", () => {
|
|||
gViewWrapper?.close();
|
||||
folderPane.uninit();
|
||||
threadPane.uninit();
|
||||
threadPaneHeader.uninit();
|
||||
});
|
||||
|
||||
var paneLayout = {
|
||||
|
@ -182,29 +180,30 @@ var paneLayout = {
|
|||
(name, oldValue, newValue) => this.setLayout(newValue)
|
||||
);
|
||||
this.setLayout(this.layoutPreference);
|
||||
threadPane.updateThreadView(
|
||||
Services.xulStore.getValue(XULSTORE_URL, "threadPane", "view")
|
||||
);
|
||||
},
|
||||
|
||||
setLayout(preference) {
|
||||
document.body.classList.remove(
|
||||
"layout-classic",
|
||||
"layout-vertical",
|
||||
"layout-wide"
|
||||
"layout-wide",
|
||||
"layout-table"
|
||||
);
|
||||
switch (preference) {
|
||||
case 1:
|
||||
document.body.classList.add("layout-wide");
|
||||
document.body.classList.add("layout-wide", "layout-table");
|
||||
this.messagePaneSplitter.resizeDirection = "vertical";
|
||||
threadTree?.setAttribute("rows", "thread-row");
|
||||
break;
|
||||
case 2:
|
||||
document.body.classList.add("layout-vertical");
|
||||
this.messagePaneSplitter.resizeDirection = "horizontal";
|
||||
threadTree?.setAttribute("rows", "thread-card");
|
||||
break;
|
||||
default:
|
||||
document.body.classList.add("layout-classic");
|
||||
document.body.classList.add("layout-classic", "layout-table");
|
||||
this.messagePaneSplitter.resizeDirection = "vertical";
|
||||
threadTree?.setAttribute("rows", "thread-row");
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -1794,7 +1793,6 @@ var folderPane = {
|
|||
|
||||
threadPane.restoreSortIndicator();
|
||||
threadPane.restoreSelection();
|
||||
threadPaneHeader.onFolderSelected();
|
||||
}
|
||||
|
||||
window.dispatchEvent(
|
||||
|
@ -2876,180 +2874,6 @@ class FolderTreeRow extends HTMLLIElement {
|
|||
}
|
||||
customElements.define("folder-tree-row", FolderTreeRow, { extends: "li" });
|
||||
|
||||
/**
|
||||
* Header area of the message list pane.
|
||||
*/
|
||||
var threadPaneHeader = {
|
||||
/**
|
||||
* The header bar element.
|
||||
* @type {?HTMLElement}
|
||||
*/
|
||||
bar: null,
|
||||
/**
|
||||
* The h2 element receiving the folder name.
|
||||
* @type {?HTMLHeadElement}
|
||||
*/
|
||||
folderName: null,
|
||||
/**
|
||||
* The span element receiving the message count.
|
||||
* @type {?HTMLSpanElement}
|
||||
*/
|
||||
folderCount: null,
|
||||
/**
|
||||
* The quick filter toolbar toggle button.
|
||||
* @type {?HTMLButtonElement}
|
||||
*/
|
||||
filterButton: null,
|
||||
/**
|
||||
* The display options button opening the popup.
|
||||
* @type {?HTMLButtonElement}
|
||||
*/
|
||||
displayButton: null,
|
||||
/**
|
||||
* If the header area is hidden.
|
||||
* @type {boolean}
|
||||
*/
|
||||
isHidden: false,
|
||||
|
||||
init() {
|
||||
this.isHidden =
|
||||
Services.xulStore.getValue(XULSTORE_URL, "threadPaneHeader", "hidden") ===
|
||||
"true";
|
||||
this.bar = document.getElementById("threadPaneHeaderBar");
|
||||
this.bar.hidden = this.isHidden;
|
||||
|
||||
this.folderName = document.getElementById("threadPaneFolderName");
|
||||
this.folderCount = document.getElementById("threadPaneFolderCount");
|
||||
this.filterButton = document.getElementById("threadPaneQuickFilterButton");
|
||||
this.filterButton.addEventListener("click", () =>
|
||||
goDoCommand("cmd_toggleQuickFilterBar")
|
||||
);
|
||||
window.addEventListener("qfbtoggle", this);
|
||||
this.onQuickFilterToggle();
|
||||
|
||||
this.displayButton = document.getElementById("threadPaneDisplayButton");
|
||||
this.displayContext = document.getElementById("threadPaneDisplayContext");
|
||||
this.displayButton.addEventListener("click", event => {
|
||||
this.displayContext.openPopup(event.target, { triggerEvent: event });
|
||||
});
|
||||
},
|
||||
|
||||
uninit() {
|
||||
window.removeEventListener("qfbtoggle", this);
|
||||
},
|
||||
|
||||
handleEvent(event) {
|
||||
switch (event.type) {
|
||||
case "qfbtoggle":
|
||||
this.onQuickFilterToggle();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the context menu to reflect the currently selected display options.
|
||||
*/
|
||||
updateDisplayContextMenu() {
|
||||
const isTableLayout = document.body.classList.contains("layout-table");
|
||||
document
|
||||
.getElementById(
|
||||
isTableLayout ? "threadPaneTableView" : "threadPaneCardsView"
|
||||
)
|
||||
.setAttribute("checked", "true");
|
||||
},
|
||||
|
||||
/**
|
||||
* Change the display view of the message list pane.
|
||||
*
|
||||
* @param {DOMEvent} event - The click event.
|
||||
*/
|
||||
changePaneView(event) {
|
||||
const view = event.target.value;
|
||||
Services.xulStore.setValue(XULSTORE_URL, "threadPane", "view", view);
|
||||
threadPane.updateThreadView(view);
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the quick filter button based on the quick filter bar state.
|
||||
*/
|
||||
onQuickFilterToggle() {
|
||||
const active = quickFilterBar.filterer.visible;
|
||||
this.filterButton.setAttribute("aria-pressed", active.toString());
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle the visibility of the message list pane header.
|
||||
*/
|
||||
toggleThreadPaneHeader() {
|
||||
this.isHidden = !this.isHidden;
|
||||
this.bar.hidden = this.isHidden;
|
||||
|
||||
Services.xulStore.setValue(
|
||||
XULSTORE_URL,
|
||||
"threadPaneHeader",
|
||||
"hidden",
|
||||
this.isHidden
|
||||
);
|
||||
// Trigger a data refresh if we're revealing the header.
|
||||
if (!this.isHidden) {
|
||||
this.onFolderSelected();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the header data when the selected folder changes.
|
||||
*/
|
||||
onFolderSelected() {
|
||||
// Bail out if the pane is hidden as we don't need to update anything.
|
||||
if (this.isHidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Hide any potential stale data if we don't have a folder.
|
||||
if (!gFolder && !gViewWrapper?.isSynthetic) {
|
||||
this.folderName.hidden = true;
|
||||
this.folderCount.hidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this.folderName.hidden = false;
|
||||
this.folderCount.hidden = false;
|
||||
|
||||
this.folderName.textContent = gFolder?.name ?? document.title;
|
||||
document.l10n.setAttributes(
|
||||
this.folderCount,
|
||||
"thread-pane-folder-message-count",
|
||||
{ count: gFolder?.getTotalMessages(false) || gDBView?.rowCount }
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the total message count in the header if the value changed for the
|
||||
* currently selected folder.
|
||||
*
|
||||
* @param {nsIMsgFolder} folder - The folder updating the count.
|
||||
* @param {integer} oldValue
|
||||
* @param {integer} newValue
|
||||
*/
|
||||
updateFolderCount(folder, oldValue, newValue) {
|
||||
if (
|
||||
!gFolder ||
|
||||
!folder ||
|
||||
this.isHidden ||
|
||||
folder.URI != gFolder.URI ||
|
||||
oldValue == newValue
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
document.l10n.setAttributes(
|
||||
this.folderCount,
|
||||
"thread-pane-folder-message-count",
|
||||
{ count: newValue }
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
var threadPane = {
|
||||
/**
|
||||
* Non-persistent storage of the last-selected items in each folder.
|
||||
|
@ -3083,9 +2907,7 @@ var threadPane = {
|
|||
]);
|
||||
threadTree.setAttribute(
|
||||
"rows",
|
||||
Services.xulStore.getValue(XULSTORE_URL, "threadPane", "view") == "cards"
|
||||
? "thread-card"
|
||||
: "thread-row"
|
||||
paneLayout.layoutPreference == 2 ? "thread-card" : "thread-row"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
|
@ -4227,26 +4049,6 @@ var threadPane = {
|
|||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the display view of the message list. Current supported options are
|
||||
* table and cards.
|
||||
*
|
||||
* @param {string} view - The view type.
|
||||
*/
|
||||
updateThreadView(view) {
|
||||
switch (view) {
|
||||
case "cards":
|
||||
document.body.classList.remove("layout-table");
|
||||
threadTree?.setAttribute("rows", "thread-card");
|
||||
break;
|
||||
case "table":
|
||||
default:
|
||||
document.body.classList.add("layout-table");
|
||||
threadTree?.setAttribute("rows", "thread-row");
|
||||
break;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var messagePane = {
|
||||
|
@ -4438,7 +4240,6 @@ function restoreState({
|
|||
folderURI,
|
||||
syntheticView,
|
||||
first = false,
|
||||
title = null,
|
||||
} = {}) {
|
||||
if (folderPaneVisible === undefined) {
|
||||
folderPaneVisible = folderURI || !syntheticView;
|
||||
|
@ -4479,10 +4280,8 @@ function restoreState({
|
|||
gViewWrapper.openSynthetic(syntheticView);
|
||||
gDBView = gViewWrapper.dbView;
|
||||
|
||||
document.title = title;
|
||||
document.body.classList.remove("account-central");
|
||||
accountCentralBrowser.hidden = true;
|
||||
threadPaneHeader.onFolderSelected();
|
||||
}
|
||||
|
||||
if (
|
||||
|
@ -4551,7 +4350,6 @@ var folderListener = {
|
|||
break;
|
||||
case "TotalMessages":
|
||||
folderPane.changeTotalCount(folder, oldValue, newValue);
|
||||
threadPaneHeader.updateFolderCount(folder, oldValue, newValue);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -4992,11 +4790,6 @@ commandController.registerCallback("cmd_viewWideMailLayout", () =>
|
|||
commandController.registerCallback("cmd_viewVerticalMailLayout", () =>
|
||||
Services.prefs.setIntPref("mail.pane_config.dynamic", 2)
|
||||
);
|
||||
commandController.registerCallback(
|
||||
"cmd_toggleThreadPaneHeader",
|
||||
() => threadPaneHeader.toggleThreadPaneHeader(),
|
||||
() => gFolder && !gFolder.isServer
|
||||
);
|
||||
commandController.registerCallback("cmd_toggleFolderPane", () => {
|
||||
paneLayout.folderPaneSplitter.toggleCollapsed();
|
||||
});
|
||||
|
|
|
@ -100,27 +100,8 @@
|
|||
resize-id="folderPane"
|
||||
collapse-width="100" />
|
||||
<div id="threadPane">
|
||||
<div id="threadPaneHeaderBar" class="list-header-bar">
|
||||
<div class="list-header-bar-container-start">
|
||||
<h2 id="threadPaneFolderName" class="list-header-title"></h2>
|
||||
<span id="threadPaneFolderCount" class="thread-pane-total-count"></span>
|
||||
</div>
|
||||
<div class="list-header-bar-container-end">
|
||||
<button id="threadPaneQuickFilterButton"
|
||||
class="button icon-button check-button unified-toolbar-button"
|
||||
data-l10n-id="quick-filter-button"
|
||||
oncommand="cmd_toggleQuickFilterBar">
|
||||
<span data-l10n-id="quick-filter-button-label"></span>
|
||||
</button>
|
||||
<button id="threadPaneDisplayButton"
|
||||
class="button button-flat icon-button icon-only"
|
||||
data-l10n-id="thread-pane-header-display-button"
|
||||
type="button">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
#include quickFilterBar.inc.xhtml
|
||||
<tree-view id="threadTree" data-label-id="threadPaneFolderName"/>
|
||||
<tree-view id="threadTree"/>
|
||||
<!-- Thread pane templates -->
|
||||
<template id="threadPaneApplyColumnMenu">
|
||||
<xul:menu class="applyTo-menu"
|
||||
|
@ -466,31 +447,6 @@
|
|||
data-l10n-id="folder-pane-header-context-hide"
|
||||
oncommand="folderPane.toggleHeader(false);"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="threadPaneDisplayContext"
|
||||
class="no-accel-menupopup"
|
||||
position="bottomleft topleft"
|
||||
onpopupshowing="threadPaneHeader.updateDisplayContextMenu();">
|
||||
<menuitem id="threadPaneTableView"
|
||||
class="thread-view-option"
|
||||
type="radio"
|
||||
name="threadview"
|
||||
value="table"
|
||||
closemenu="none"
|
||||
data-l10n-id="thread-pane-header-context-table-view"
|
||||
oncommand="threadPaneHeader.changePaneView(event);"/>
|
||||
<menuitem id="threadPaneCardsView"
|
||||
class="thread-view-option"
|
||||
type="radio"
|
||||
name="threadview"
|
||||
value="cards"
|
||||
closemenu="none"
|
||||
data-l10n-id="thread-pane-header-context-cards-view"
|
||||
oncommand="threadPaneHeader.changePaneView(event);"/>
|
||||
<menuseparator id="separatorBeforeHideThreadHeaderOption"/>
|
||||
<menuitem data-l10n-id="thread-pane-header-context-hide"
|
||||
oncommand="threadPaneHeader.toggleThreadPaneHeader();"/>
|
||||
</menupopup>
|
||||
#include mailContext.inc.xhtml
|
||||
</popupset>
|
||||
</html>
|
||||
|
|
|
@ -28,7 +28,6 @@ function hiddenWindowStartup() {
|
|||
"menu_Toolbars",
|
||||
"menu_MessagePaneLayout",
|
||||
"menu_showMessage",
|
||||
"menu_toggleThreadPaneHeader",
|
||||
"menu_showFolderPane",
|
||||
"menu_FolderViews",
|
||||
"viewSortMenu",
|
||||
|
@ -99,7 +98,6 @@ function hiddenWindowStartup() {
|
|||
"appmenu_properties",
|
||||
"appmenu_MessagePaneLayout",
|
||||
"appmenu_showMessage",
|
||||
"appmenu_toggleThreadPaneHeader",
|
||||
"appmenu_showFolderPane",
|
||||
"appmenu_FolderViews",
|
||||
"appmenu_groupBySort",
|
||||
|
|
|
@ -254,7 +254,6 @@ function view_init(event) {
|
|||
let message;
|
||||
let messagePaneVisible;
|
||||
let quickFilterBarVisible;
|
||||
let threadPaneHeaderVisible;
|
||||
|
||||
let tab = document.getElementById("tabmail")?.currentTabInfo;
|
||||
if (tab?.mode.name == "mail3PaneTab") {
|
||||
|
@ -267,11 +266,9 @@ function view_init(event) {
|
|||
messagePaneVisible,
|
||||
} = paneLayout);
|
||||
quickFilterBarVisible = quickFilterBar.filterer.visible;
|
||||
threadPaneHeaderVisible = true;
|
||||
} else if (tab?.mode.name == "mailMessageTab") {
|
||||
message = tab.message;
|
||||
messagePaneVisible = true;
|
||||
threadPaneHeaderVisible = false;
|
||||
}
|
||||
|
||||
let isFeed = FeedUtils.isFeedMessage(message);
|
||||
|
@ -324,16 +321,6 @@ function view_init(event) {
|
|||
folderPaneAppMenuItem.setAttribute("checked", folderPaneVisible);
|
||||
}
|
||||
|
||||
let threadPaneMenuItem = document.getElementById(
|
||||
"menu_toggleThreadPaneHeader"
|
||||
);
|
||||
threadPaneMenuItem.setAttribute("disabled", !threadPaneHeaderVisible);
|
||||
|
||||
let threadPaneAppMenuItem = document.getElementById(
|
||||
"appmenu_toggleThreadPaneHeader"
|
||||
);
|
||||
threadPaneAppMenuItem.setAttribute("disabled", !threadPaneHeaderVisible);
|
||||
|
||||
let colsEnabled = Services.prefs.getBoolPref("mail.folderpane.showColumns");
|
||||
let folderPaneColsMenuItem = document.getElementById(
|
||||
"menu_showFolderPaneCols"
|
||||
|
@ -466,20 +453,6 @@ function InitViewLayoutStyleMenu(event, appmenu) {
|
|||
if (layoutStyleMenuitem) {
|
||||
layoutStyleMenuitem.setAttribute("checked", "true");
|
||||
}
|
||||
|
||||
if (
|
||||
Services.xulStore.getValue(
|
||||
"chrome://messenger/content/messenger.xhtml",
|
||||
"threadPaneHeader",
|
||||
"hidden"
|
||||
) !== "true"
|
||||
) {
|
||||
parent
|
||||
.querySelector(`[name="threadheader"]`)
|
||||
.setAttribute("checked", "true");
|
||||
} else {
|
||||
parent.querySelector(`[name="threadheader"]`).removeAttribute("checked");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
<command id="cmd_viewVerticalMailLayout" oncommand="goDoCommand('cmd_viewVerticalMailLayout')" disabled="true"/>
|
||||
<command id="cmd_toggleFolderPane" oncommand="goDoCommand('cmd_toggleFolderPane')" disabled="true"/>
|
||||
<command id="cmd_toggleFolderPaneCols" oncommand="goDoCommand('cmd_toggleFolderPaneCols')" disabled="true"/>
|
||||
<command id="cmd_toggleThreadPaneHeader" oncommand="goDoCommand('cmd_toggleThreadPaneHeader')" disabled="true"/>
|
||||
<command id="cmd_toggleMessagePane" oncommand="goDoCommand('cmd_toggleMessagePane')" disabled="true"/>
|
||||
<command id="cmd_viewAllMsgs" oncommand="goDoCommand('cmd_viewAllMsgs')" disabled="true"/>
|
||||
<command id="cmd_viewUnreadMsgs" oncommand="goDoCommand('cmd_viewUnreadMsgs')" disabled="true"/>
|
||||
|
|
|
@ -367,11 +367,6 @@
|
|||
accesskey="&showFolderPaneCmd.accesskey;" command="cmd_toggleFolderPane"/>
|
||||
<menuitem id="menu_showFolderPaneCols" type="checkbox" label="&showFolderPaneColsCmd.label;"
|
||||
accesskey="&showFolderPaneColsCmd.accesskey;" command="cmd_toggleFolderPaneCols"/>
|
||||
<menuitem id="menu_toggleThreadPaneHeader"
|
||||
type="checkbox"
|
||||
name="threadheader"
|
||||
data-l10n-id="menu-view-toggle-thread-pane-header"
|
||||
command="cmd_toggleThreadPaneHeader"/>
|
||||
<menuitem id="menu_showMessage" type="checkbox" label="&showMessageCmd.label;" key="key_toggleMessagePane"
|
||||
accesskey="&showMessageCmd.accesskey;" command="cmd_toggleMessagePane"/>
|
||||
</menupopup>
|
||||
|
|
|
@ -1876,10 +1876,6 @@ class TreeViewTableBody extends HTMLTableSectionElement {
|
|||
this.addEventListener("keyup", treeView);
|
||||
this.addEventListener("click", treeView);
|
||||
this.addEventListener("keydown", treeView);
|
||||
|
||||
if (treeView.dataset.labelId) {
|
||||
this.setAttribute("aria-labelledby", treeView.dataset.labelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
customElements.define("tree-view-table-body", TreeViewTableBody, {
|
||||
|
|
|
@ -12,7 +12,7 @@ var { click_through_appmenu } = ChromeUtils.import(
|
|||
let tabmail = document.getElementById("tabmail");
|
||||
let about3Pane = tabmail.currentAbout3Pane;
|
||||
let { threadPane, threadTree } = about3Pane;
|
||||
let rootFolder, testFolder, testMessages, displayContext, displayButton;
|
||||
let rootFolder, testFolder, testMessages;
|
||||
|
||||
add_setup(async function() {
|
||||
MailServices.accounts.createLocalMailAccount();
|
||||
|
@ -35,52 +35,23 @@ add_setup(async function() {
|
|||
about3Pane.paneLayout.messagePaneVisible = false;
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
click_through_appmenu(
|
||||
[{ id: "appmenu_View" }, { id: "appmenu_MessagePaneLayout" }],
|
||||
{ id: "appmenu_messagePaneClassic" },
|
||||
window
|
||||
);
|
||||
MailServices.accounts.removeAccount(account, false);
|
||||
about3Pane.paneLayout.messagePaneVisible = true;
|
||||
about3Pane.folderTree.focus();
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function testSwitchToCardsView() {
|
||||
add_task(async function testSwitchToVerticalView() {
|
||||
click_through_appmenu(
|
||||
[{ id: "appmenu_View" }, { id: "appmenu_MessagePaneLayout" }],
|
||||
{ id: "appmenu_messagePaneVertical" },
|
||||
window
|
||||
);
|
||||
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => threadTree.getAttribute("rows") == "thread-row",
|
||||
"The tree view should not switch to a card layout"
|
||||
);
|
||||
|
||||
displayContext = about3Pane.document.getElementById(
|
||||
"threadPaneDisplayContext"
|
||||
);
|
||||
displayButton = about3Pane.document.getElementById("threadPaneDisplayButton");
|
||||
let shownPromise = BrowserTestUtils.waitForEvent(
|
||||
displayContext,
|
||||
"popupshown"
|
||||
);
|
||||
EventUtils.synthesizeMouseAtCenter(displayButton, {}, about3Pane);
|
||||
await shownPromise;
|
||||
|
||||
Assert.ok(
|
||||
displayContext
|
||||
.querySelector("#threadPaneTableView")
|
||||
.getAttribute("checked"),
|
||||
"The table view menuitem should be checked"
|
||||
);
|
||||
|
||||
let hiddenPromise = BrowserTestUtils.waitForEvent(
|
||||
displayContext,
|
||||
"popuphidden"
|
||||
);
|
||||
displayContext.activateItem(
|
||||
displayContext.querySelector("#threadPaneCardsView")
|
||||
);
|
||||
EventUtils.synthesizeKey("KEY_Escape", {}, about3Pane);
|
||||
await hiddenPromise;
|
||||
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => threadTree.getAttribute("rows") == "thread-card",
|
||||
"The tree view switched to a card layout"
|
||||
|
@ -102,19 +73,6 @@ add_task(async function testSwitchToCardsView() {
|
|||
BrowserTestUtils.is_hidden(attachment),
|
||||
"attachment icon should be hidden"
|
||||
);
|
||||
|
||||
// Switching to horizontal view shouldn't affect the list layout.
|
||||
click_through_appmenu(
|
||||
[{ id: "appmenu_View" }, { id: "appmenu_MessagePaneLayout" }],
|
||||
{ id: "appmenu_messagePaneClassic" },
|
||||
window
|
||||
);
|
||||
|
||||
Assert.equal(
|
||||
threadTree.getAttribute("rows"),
|
||||
"thread-card",
|
||||
"tree view in cards layout"
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function testTagsInVerticalView() {
|
||||
|
@ -144,47 +102,4 @@ add_task(async function testTagsInVerticalView() {
|
|||
EventUtils.synthesizeKey("2", {});
|
||||
Assert.ok(BrowserTestUtils.is_visible(tag2), "tag icon should be visible");
|
||||
Assert.deepEqual(tag2.title, "Work", "The work tag should be set");
|
||||
|
||||
// Switch back to a table layout and horizontal view.
|
||||
let shownPromise = BrowserTestUtils.waitForEvent(
|
||||
displayContext,
|
||||
"popupshown"
|
||||
);
|
||||
EventUtils.synthesizeMouseAtCenter(displayButton, {}, about3Pane);
|
||||
await shownPromise;
|
||||
|
||||
Assert.ok(
|
||||
displayContext
|
||||
.querySelector("#threadPaneCardsView")
|
||||
.getAttribute("checked"),
|
||||
"The cards view menuitem should be checked"
|
||||
);
|
||||
|
||||
let hiddenPromise = BrowserTestUtils.waitForEvent(
|
||||
displayContext,
|
||||
"popuphidden"
|
||||
);
|
||||
displayContext.activateItem(
|
||||
displayContext.querySelector("#threadPaneTableView")
|
||||
);
|
||||
EventUtils.synthesizeKey("KEY_Escape", {}, about3Pane);
|
||||
await hiddenPromise;
|
||||
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => threadTree.getAttribute("rows") == "thread-row",
|
||||
"The tree view switched to a table layout"
|
||||
);
|
||||
|
||||
Assert.equal(
|
||||
threadTree.getAttribute("rows"),
|
||||
"thread-row",
|
||||
"tree view in table layout"
|
||||
);
|
||||
|
||||
Services.prefs.clearUserPref("mail.pane_config.dynamic");
|
||||
Services.xulStore.removeValue(
|
||||
"chrome://messenger/content/messenger.xhtml",
|
||||
"threadPane",
|
||||
"view"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -19,7 +19,6 @@ const viewMenuData = {
|
|||
messagePaneVertical: {},
|
||||
menu_showFolderPane: { checked: true },
|
||||
menu_showFolderPaneCols: { disabled: true },
|
||||
menu_toggleThreadPaneHeader: { disabled: true, checked: true },
|
||||
menu_showMessage: {},
|
||||
menu_FolderViews: {},
|
||||
menu_toggleFolderHeader: { checked: true },
|
||||
|
@ -171,7 +170,6 @@ add_task(async function test3PaneTab() {
|
|||
view_toolbars_popup_quickFilterBar: { checked: true },
|
||||
menu_MessagePaneLayout: {},
|
||||
menu_showFolderPane: { checked: true },
|
||||
menu_toggleThreadPaneHeader: { checked: true },
|
||||
menu_showMessage: { checked: true },
|
||||
viewSortMenu: { disabled: false },
|
||||
viewMessagesMenu: { disabled: false },
|
||||
|
@ -190,12 +188,6 @@ add_task(async function test3PaneTab() {
|
|||
menu_showMessage: { checked: true },
|
||||
});
|
||||
|
||||
goDoCommand("cmd_toggleThreadPaneHeader");
|
||||
await helper.testItems({
|
||||
menu_MessagePaneLayout: {},
|
||||
menu_toggleThreadPaneHeader: { checked: false },
|
||||
});
|
||||
|
||||
goDoCommand("cmd_toggleMessagePane");
|
||||
await helper.testItems({
|
||||
menu_MessagePaneLayout: {},
|
||||
|
@ -205,14 +197,12 @@ add_task(async function test3PaneTab() {
|
|||
|
||||
goDoCommand("cmd_toggleQuickFilterBar");
|
||||
goDoCommand("cmd_toggleFolderPane");
|
||||
goDoCommand("cmd_toggleThreadPaneHeader");
|
||||
goDoCommand("cmd_toggleMessagePane");
|
||||
await helper.testItems({
|
||||
menu_Toolbars: {},
|
||||
view_toolbars_popup_quickFilterBar: { checked: true },
|
||||
menu_MessagePaneLayout: {},
|
||||
menu_showFolderPane: { checked: true },
|
||||
menu_toggleThreadPaneHeader: { checked: true },
|
||||
menu_showMessage: { checked: true },
|
||||
});
|
||||
});
|
||||
|
|
|
@ -356,7 +356,6 @@
|
|||
<toolbarbutton id="appmenu_showFolderPane"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
type="checkbox"
|
||||
closemenu="none"
|
||||
label="&showFolderPaneCmd.label;"
|
||||
command="cmd_toggleFolderPane"/>
|
||||
<toolbarbutton id="appmenu_showFolderPaneCols"
|
||||
|
@ -364,17 +363,9 @@
|
|||
type="checkbox"
|
||||
label="&showFolderPaneColsCmd.label;"
|
||||
command="cmd_toggleFolderPaneCols"/>
|
||||
<toolbarbutton id="appmenu_toggleThreadPaneHeader"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
type="checkbox"
|
||||
name="threadheader"
|
||||
closemenu="none"
|
||||
data-l10n-id="appmenuitem-toggle-thread-pane-header"
|
||||
command="cmd_toggleThreadPaneHeader"/>
|
||||
<toolbarbutton id="appmenu_showMessage"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
type="checkbox"
|
||||
closemenu="none"
|
||||
label="&showMessageCmd.label;"
|
||||
key="key_toggleMessagePane"
|
||||
command="cmd_toggleMessagePane"/>
|
||||
|
|
|
@ -2,32 +2,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
## Message List Header Bar
|
||||
|
||||
quick-filter-button =
|
||||
.title = Toggle the Quick Filter Bar
|
||||
quick-filter-button-label = Quick Filter
|
||||
|
||||
thread-pane-header-display-button =
|
||||
.title = Message list display options
|
||||
|
||||
# Variables:
|
||||
# $count (Number) - The number of messages in this folder.
|
||||
thread-pane-folder-message-count =
|
||||
{ $count ->
|
||||
[one] { $count } Message
|
||||
*[other] { $count } Messages
|
||||
}
|
||||
|
||||
thread-pane-header-context-table-view =
|
||||
.label = Table View
|
||||
|
||||
thread-pane-header-context-cards-view =
|
||||
.label = Cards View
|
||||
|
||||
thread-pane-header-context-hide =
|
||||
.label = Hide Message List Header
|
||||
|
||||
## Quick Filter Bar
|
||||
|
||||
# The tooltip to display when the user hovers over the sticky button
|
||||
|
|
|
@ -139,9 +139,6 @@ appmenu-view-panel =
|
|||
.label = View
|
||||
.accesskey = V
|
||||
|
||||
appmenuitem-toggle-thread-pane-header =
|
||||
.label = Message List Header
|
||||
|
||||
appmenu-font-size-value = Font Size
|
||||
|
||||
appmenu-mail-uidensity-value = Density
|
||||
|
|
|
@ -111,10 +111,6 @@ menu-view-folders-toggle-header =
|
|||
|
||||
## View / Layout
|
||||
|
||||
menu-view-toggle-thread-pane-header =
|
||||
.label = Message List Header
|
||||
.accesskey = H
|
||||
|
||||
menu-font-size-label =
|
||||
.label = Font Size
|
||||
.accesskey = o
|
||||
|
|
|
@ -2,14 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
:root {
|
||||
--thread-pane-header-padding: 3px 6px;
|
||||
}
|
||||
|
||||
:root[uidensity="touch"] {
|
||||
--thread-pane-header-padding: 6px 9px;
|
||||
}
|
||||
|
||||
@media not (prefers-contrast) {
|
||||
:root {
|
||||
--thread-pane-flag-fill: var(--color-orange-30);
|
||||
|
@ -549,6 +541,7 @@ tr[data-properties~="outgoing"].selected .correspondentcol-column {
|
|||
|
||||
#threadTree[rows="thread-card"] {
|
||||
background-color: var(--layout-background-1);
|
||||
border-top: 1px solid var(--splitter-color);
|
||||
}
|
||||
|
||||
tr[is="thread-card"] td {
|
||||
|
@ -650,47 +643,3 @@ tr[data-properties~="thread-children"] + tr:not([data-properties~="thread-childr
|
|||
#threadTree [data-properties~="new"]:not(.selected) .thread-card-container :is(.subject, .date) {
|
||||
color: var(--new-folder-color);
|
||||
}
|
||||
|
||||
/* Header bar */
|
||||
|
||||
.list-header-bar:not([hidden]) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 6px;
|
||||
padding: var(--thread-pane-header-padding);
|
||||
background-color: var(--layout-background-1);
|
||||
border-bottom: 1px solid var(--layout-border-0);
|
||||
}
|
||||
|
||||
.list-header-bar-container-start,
|
||||
.list-header-bar-container-end {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.list-header-title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
color: var(--layout-color-2);
|
||||
margin-block: 0;
|
||||
}
|
||||
|
||||
.thread-pane-total-count {
|
||||
align-self: end;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
padding-inline-start: 9px;
|
||||
color: var(--layout-color-2);
|
||||
}
|
||||
|
||||
#threadPaneQuickFilterButton {
|
||||
background-image: var(--icon-filter);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#threadPaneDisplayButton {
|
||||
background-image: var(--icon-layout); /* TODO: Change with a display icon */
|
||||
margin: 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче