Bug 1920834 - Implement a nightly pref to toggle experimental conversation view. r=laurel,vineet

Differential Revision: https://phabricator.services.mozilla.com/D223442

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alessandro Castellani 2024-09-27 21:50:14 +00:00
Родитель 2e8b2146f5
Коммит ec0480e220
7 изменённых файлов: 66 добавлений и 0 удалений

Просмотреть файл

@ -1417,3 +1417,8 @@ pref("mail.inappnotifications.refreshInterval", 21600000);
pref("mail.inappnotifications.url", "https://notifications-stage.thunderbird.net/notifications.json");
// Disables all filtering of in-app notifications, useful for testing.
pref("mail.inappnotifications.bypass-filtering", false);
#ifdef NIGHTLY_BUILD
// Enable the new experimental conversation view based on Gloda.
pref("mail.thread.conversation.enabled", false);
#endif

Просмотреть файл

@ -1333,6 +1333,11 @@ function reportPreferences() {
booleanPrefs.push("browser.crashReports.unsubmittedCheck.autoSubmit2");
}
// Nightly experimental prefs.
if (AppConstants.NIGHTLY_BUILD) {
booleanPrefs.push("mail.thread.conversation.enabled");
}
// Fetch and report preference values
for (const prefName of booleanPrefs) {
const prefValue = Services.prefs.getBoolPref(prefName, false);

Просмотреть файл

@ -769,6 +769,22 @@
other-cases-text-label.value"/>
</hbox>
</hbox>
#ifdef NIGHTLY_BUILD
<separator/>
<vbox>
<hbox class="align-baseline">
<html:legend data-l10n-id="conversation-view-legend"></html:legend>
<span class="label-experiment" data-l10n-id="label-experiment"></span>
</hbox>
<vbox>
<checkbox id="conversationView"
data-l10n-id="conversation-view-checkbox-label"
preference="mail.thread.conversation.enabled"/>
<description data-l10n-id="conversation-view-checkbox-description"
class="tip-caption indent"/>
</vbox>
</vbox>
#endif
</html:fieldset>
</html:div>

Просмотреть файл

@ -133,6 +133,11 @@ if (AppConstants.MOZ_UPDATER) {
}
}
// Nightly experimental prefs.
if (AppConstants.NIGHTLY_BUILD) {
Preferences.add({ id: "mail.thread.conversation.enabled", type: "bool" });
}
var gGeneralPane = {
// The set of types the app knows how to handle. A map of HandlerInfoWrapper
// objects, indexed by type.

Просмотреть файл

@ -155,6 +155,14 @@ add_task(async () => {
pref: "mail.threadpane.table.horizontal_scroll",
}
);
// Nightly experimental prefs.
if (AppConstants.NIGHTLY_BUILD) {
await testCheckboxes("paneGeneral", "readingAndDisplayCategory", {
checkboxID: "conversationView",
pref: "mail.thread.conversation.enabled",
});
}
});
add_task(async () => {

Просмотреть файл

@ -540,6 +540,15 @@ table-layout-horizontal-scroll-label =
.label = Allow horizontal scroll
.accesskey = h
conversation-view-legend = Conversation view
conversation-view-checkbox-label =
.label = Enable conversation view
.accesskey = c
conversation-view-checkbox-description = Experimental feature based on Gloda, use it at your own risk
label-experiment = Experimental
## Compose Tab
forward-label =

Просмотреть файл

@ -1134,3 +1134,21 @@ calendar-notifications-setting {
vertical-align: sub;
}
}
/* Feature labels */
.align-baseline {
align-items: baseline;
}
.label-experiment {
font-size: 0.85rem;
line-height: 1;
text-transform: uppercase;
display: inline-block;
padding: 3px;
background-color: var(--color-warning-default);
color: var(--color-text-warning);
border-radius: 3px;
margin-inline-start: 12px;
}