mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Backed out 3 changesets (bug 1845109, bug 1845113, bug 1845110) for causing bc failures on browser_html_scroll_restoration.js CLOSED TREE
Backed out changeset 87bf8758b922 (bug 1845113) Backed out changeset 0a70c42c7d57 (bug 1845110) Backed out changeset 0e9d4a136f5d (bug 1845109)
This commit is contained in:
parent
1978aed638
commit
26c741c830
@ -1,36 +0,0 @@
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.syntax.ast as FTL
|
||||
from fluent.migrate.helpers import transforms_from
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1845109 - Use moz-message-bar to replace the addon-card-message in about:addons, part {index}."""
|
||||
abouAddons_ftl = "toolkit/toolkit/about/aboutAddons.ftl"
|
||||
ctx.add_transforms(
|
||||
abouAddons_ftl,
|
||||
abouAddons_ftl,
|
||||
transforms_from(
|
||||
"""
|
||||
details-notification-incompatible2 =
|
||||
.message = {COPY_PATTERN(from_path, "details-notification-incompatible")}
|
||||
|
||||
details-notification-unsigned-and-disabled2 =
|
||||
.message = {COPY_PATTERN(from_path, "details-notification-unsigned-and-disabled")}
|
||||
|
||||
details-notification-unsigned2 =
|
||||
.message = {COPY_PATTERN(from_path, "details-notification-unsigned")}
|
||||
|
||||
details-notification-blocked2 =
|
||||
.message = {COPY_PATTERN(from_path, "details-notification-blocked")}
|
||||
|
||||
details-notification-softblocked2 =
|
||||
.message = {COPY_PATTERN(from_path, "details-notification-softblocked")}
|
||||
|
||||
details-notification-gmp-pending2 =
|
||||
.message = {COPY_PATTERN(from_path, "details-notification-gmp-pending")}
|
||||
""",
|
||||
from_path=abouAddons_ftl,
|
||||
),
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.syntax.ast as FTL
|
||||
from fluent.migrate.helpers import transforms_from
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1845110 - Use moz-message-bar to replace the postponed update message in about:addons, part {index}."""
|
||||
abouAddons_ftl = "toolkit/toolkit/about/aboutAddons.ftl"
|
||||
ctx.add_transforms(
|
||||
abouAddons_ftl,
|
||||
abouAddons_ftl,
|
||||
transforms_from(
|
||||
"""
|
||||
install-postponed-message2 =
|
||||
.message = {COPY_PATTERN(from_path, "install-postponed-message")}
|
||||
""",
|
||||
from_path=abouAddons_ftl,
|
||||
),
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import fluent.syntax.ast as FTL
|
||||
from fluent.migrate.helpers import transforms_from
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1845113 - Use moz-message-bar for the recommended extensions message in about:addons, part {index}."""
|
||||
abouAddons_ftl = "toolkit/toolkit/about/aboutAddons.ftl"
|
||||
ctx.add_transforms(
|
||||
abouAddons_ftl,
|
||||
abouAddons_ftl,
|
||||
transforms_from(
|
||||
"""
|
||||
discopane-notice-recommendations2 =
|
||||
.message = {COPY_PATTERN(from_path, "discopane-notice-recommendations")}
|
||||
""",
|
||||
from_path=abouAddons_ftl,
|
||||
),
|
||||
)
|
@ -48,11 +48,11 @@
|
||||
|
||||
add_task(async function test_close_button() {
|
||||
const notDismissableComponent = document.querySelector("#infoMessage");
|
||||
let closeButton = notDismissableComponent.closeButtonEl;
|
||||
let closeButton = notDismissableComponent.shadowRoot.querySelector(".close");
|
||||
ok(!closeButton, "Close button doesn't show when the message bar isn't dismissable.");
|
||||
|
||||
let dismissableComponent = document.querySelector("#infoMessage2");
|
||||
closeButton = dismissableComponent.closeButtonEl;
|
||||
closeButton = dismissableComponent.shadowRoot.querySelector(".close");
|
||||
ok(closeButton, "Close button is shown when the message bar is dismissable.");
|
||||
|
||||
closeButton.click();
|
||||
|
@ -43,7 +43,6 @@ export default class MozMessageBar extends MozLitElement {
|
||||
static queries = {
|
||||
actionsSlotEl: "slot[name=actions]",
|
||||
actionsEl: ".actions",
|
||||
closeButtonEl: "button.close",
|
||||
};
|
||||
|
||||
static properties = {
|
||||
|
@ -315,10 +315,9 @@ discopane-intro =
|
||||
security, performance, and functionality.
|
||||
|
||||
# Notice to make user aware that the recommendations are personalized.
|
||||
discopane-notice-recommendations2 =
|
||||
.message =
|
||||
Some of these recommendations are personalized. They are based on other
|
||||
extensions you’ve installed, profile preferences, and usage statistics.
|
||||
discopane-notice-recommendations =
|
||||
Some of these recommendations are personalized. They are based on other
|
||||
extensions you’ve installed, profile preferences, and usage statistics.
|
||||
discopane-notice-learn-more = Learn more
|
||||
|
||||
privacy-policy = Privacy Policy
|
||||
@ -393,8 +392,7 @@ addon-detail-homepage-label = Homepage
|
||||
addon-detail-rating-label = Rating
|
||||
|
||||
# Message for add-ons with a staged pending update.
|
||||
install-postponed-message2 =
|
||||
.message = This extension will be updated when { -brand-short-name } restarts.
|
||||
install-postponed-message = This extension will be updated when { -brand-short-name } restarts.
|
||||
install-postponed-button = Update Now
|
||||
|
||||
# This string is used to show that an add-on is disabled.
|
||||
@ -520,25 +518,19 @@ addon-page-options-button =
|
||||
|
||||
# Variables:
|
||||
# $version (string) - Application version.
|
||||
details-notification-incompatible2 =
|
||||
.message = { $name } is incompatible with { -brand-short-name } { $version }.
|
||||
details-notification-incompatible = { $name } is incompatible with { -brand-short-name } { $version }.
|
||||
details-notification-incompatible-link = More Information
|
||||
|
||||
details-notification-unsigned-and-disabled2 =
|
||||
.message = { $name } could not be verified for use in { -brand-short-name } and has been disabled.
|
||||
details-notification-unsigned-and-disabled = { $name } could not be verified for use in { -brand-short-name } and has been disabled.
|
||||
details-notification-unsigned-and-disabled-link = More Information
|
||||
|
||||
details-notification-unsigned2 =
|
||||
.message = { $name } could not be verified for use in { -brand-short-name }. Proceed with caution.
|
||||
details-notification-unsigned = { $name } could not be verified for use in { -brand-short-name }. Proceed with caution.
|
||||
details-notification-unsigned-link = More Information
|
||||
|
||||
details-notification-blocked2 =
|
||||
.message = { $name } has been disabled due to security or stability issues.
|
||||
details-notification-blocked = { $name } has been disabled due to security or stability issues.
|
||||
details-notification-blocked-link = More Information
|
||||
|
||||
details-notification-softblocked2 =
|
||||
.message = { $name } is known to cause security or stability issues.
|
||||
details-notification-softblocked = { $name } is known to cause security or stability issues.
|
||||
details-notification-softblocked-link = More Information
|
||||
|
||||
details-notification-gmp-pending2 =
|
||||
.message = { $name } will be installed shortly.
|
||||
details-notification-gmp-pending = { $name } will be installed shortly.
|
||||
|
@ -258,7 +258,7 @@ addon-card[expanded] .update-postponed-bar + .addon-card-message {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.update-postponed-bar + .addon-card-message:not([hidden]) {
|
||||
.update-postponed-bar + .addon-card-message {
|
||||
/* Prevent the small overlapping between the two message bars
|
||||
* when they are both visible at the same time one after the
|
||||
* other on the same addon card */
|
||||
@ -448,6 +448,20 @@ recommended-addon-card .addon-description:not(:empty) {
|
||||
margin: 24px 0;
|
||||
}
|
||||
|
||||
.discopane-notice-content {
|
||||
padding-block: 6px;
|
||||
}
|
||||
|
||||
.discopane-notice-content > span {
|
||||
flex-grow: 1;
|
||||
margin-inline-end: 4px;
|
||||
}
|
||||
|
||||
.discopane-notice-content > button {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.view-footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -60,10 +60,6 @@
|
||||
defer
|
||||
src="chrome://mozapps/content/extensions/aboutaddons.js"
|
||||
></script>
|
||||
<script
|
||||
type="module"
|
||||
src="chrome://global/content/elements/moz-message-bar.mjs"
|
||||
></script>
|
||||
<script
|
||||
type="module"
|
||||
src="chrome://global/content/elements/moz-toggle.mjs"
|
||||
@ -419,22 +415,20 @@
|
||||
<span class="addon-description" tabindex="-1"></span>
|
||||
</div>
|
||||
</div>
|
||||
<moz-message-bar
|
||||
class="update-postponed-bar"
|
||||
data-l10n-id="install-postponed-message2"
|
||||
data-l10n-attrs="message"
|
||||
align="center"
|
||||
hidden
|
||||
>
|
||||
<message-bar class="update-postponed-bar" align="center" hidden>
|
||||
<span
|
||||
class="description"
|
||||
data-l10n-id="install-postponed-message"
|
||||
></span>
|
||||
<button
|
||||
slot="actions"
|
||||
action="install-postponed"
|
||||
data-l10n-id="install-postponed-button"
|
||||
></button>
|
||||
</moz-message-bar>
|
||||
<moz-message-bar class="addon-card-message" align="center" hidden>
|
||||
</message-bar>
|
||||
<message-bar class="addon-card-message" align="center" hidden>
|
||||
<span></span>
|
||||
<button action="link"></button>
|
||||
</moz-message-bar>
|
||||
</message-bar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -675,20 +669,17 @@
|
||||
</template>
|
||||
|
||||
<template name="taar-notice">
|
||||
<moz-message-bar
|
||||
class="discopane-notice"
|
||||
data-l10n-id="discopane-notice-recommendations2"
|
||||
data-l10n-attrs="message"
|
||||
dismissable
|
||||
>
|
||||
<a
|
||||
is="moz-support-link"
|
||||
support-page="personalized-addons"
|
||||
data-l10n-id="discopane-notice-learn-more"
|
||||
action="notice-learn-more"
|
||||
slot="support-link"
|
||||
></a>
|
||||
</moz-message-bar>
|
||||
<message-bar class="discopane-notice" dismissable>
|
||||
<div class="discopane-notice-content">
|
||||
<span data-l10n-id="discopane-notice-recommendations"></span>
|
||||
<a
|
||||
is="moz-support-link"
|
||||
support-page="personalized-addons"
|
||||
data-l10n-id="discopane-notice-learn-more"
|
||||
action="notice-learn-more"
|
||||
></a>
|
||||
</div>
|
||||
</message-bar>
|
||||
</template>
|
||||
|
||||
<template name="recommended-footer">
|
||||
|
@ -262,16 +262,14 @@ async function getAddonMessageInfo(addon) {
|
||||
if (addon.blocklistState === STATE_BLOCKED) {
|
||||
return {
|
||||
linkUrl: await addon.getBlocklistURL(),
|
||||
linkId: "details-notification-blocked-link",
|
||||
messageId: "details-notification-blocked2",
|
||||
messageId: "details-notification-blocked",
|
||||
messageArgs: { name },
|
||||
type: "error",
|
||||
};
|
||||
} else if (isDisabledUnsigned(addon)) {
|
||||
return {
|
||||
linkUrl: SUPPORT_URL + "unsigned-addons",
|
||||
linkId: "details-notification-unsigned-and-disabled-link",
|
||||
messageId: "details-notification-unsigned-and-disabled2",
|
||||
messageId: "details-notification-unsigned-and-disabled",
|
||||
messageArgs: { name },
|
||||
type: "error",
|
||||
};
|
||||
@ -281,29 +279,27 @@ async function getAddonMessageInfo(addon) {
|
||||
addon.blocklistState !== STATE_SOFTBLOCKED)
|
||||
) {
|
||||
return {
|
||||
messageId: "details-notification-incompatible2",
|
||||
messageId: "details-notification-incompatible",
|
||||
messageArgs: { name, version: Services.appinfo.version },
|
||||
type: "warning",
|
||||
};
|
||||
} else if (!isCorrectlySigned(addon)) {
|
||||
return {
|
||||
linkUrl: SUPPORT_URL + "unsigned-addons",
|
||||
linkId: "details-notification-unsigned-link",
|
||||
messageId: "details-notification-unsigned2",
|
||||
messageId: "details-notification-unsigned",
|
||||
messageArgs: { name },
|
||||
type: "warning",
|
||||
};
|
||||
} else if (addon.blocklistState === STATE_SOFTBLOCKED) {
|
||||
return {
|
||||
linkUrl: await addon.getBlocklistURL(),
|
||||
linkId: "details-notification-softblocked-link",
|
||||
messageId: "details-notification-softblocked2",
|
||||
messageId: "details-notification-softblocked",
|
||||
messageArgs: { name },
|
||||
type: "warning",
|
||||
};
|
||||
} else if (addon.isGMPlugin && !addon.isInstalled && addon.isActive) {
|
||||
return {
|
||||
messageId: "details-notification-gmp-pending2",
|
||||
messageId: "details-notification-gmp-pending",
|
||||
messageArgs: { name },
|
||||
type: "warning",
|
||||
};
|
||||
@ -2806,7 +2802,6 @@ class AddonCard extends HTMLElement {
|
||||
|
||||
const {
|
||||
linkUrl,
|
||||
linkId,
|
||||
messageId,
|
||||
messageArgs,
|
||||
type = "",
|
||||
@ -2814,17 +2809,18 @@ class AddonCard extends HTMLElement {
|
||||
|
||||
if (messageId) {
|
||||
document.l10n.pauseObserving();
|
||||
document.l10n.setAttributes(messageBar, messageId, messageArgs);
|
||||
messageBar.setAttribute("data-l10n-attrs", "message");
|
||||
document.l10n.setAttributes(
|
||||
messageBar.querySelector("span"),
|
||||
messageId,
|
||||
messageArgs
|
||||
);
|
||||
|
||||
const link = messageBar.querySelector("button");
|
||||
if (linkUrl) {
|
||||
document.l10n.setAttributes(link, linkId);
|
||||
document.l10n.setAttributes(link, `${messageId}-link`);
|
||||
link.setAttribute("url", linkUrl);
|
||||
link.setAttribute("slot", "actions");
|
||||
link.hidden = false;
|
||||
} else {
|
||||
link.removeAttribute("slot");
|
||||
link.hidden = true;
|
||||
}
|
||||
|
||||
@ -3878,7 +3874,7 @@ class TaarMessageBar extends HTMLElement {
|
||||
if (this.childElementCount == 0 && !this.hidden) {
|
||||
this.appendChild(importTemplate("taar-notice"));
|
||||
this.addEventListener("click", this);
|
||||
this.messageBar = this.querySelector("moz-message-bar");
|
||||
this.messageBar = this.querySelector("message-bar");
|
||||
this.messageBar.addEventListener("message-bar:user-dismissed", this);
|
||||
}
|
||||
}
|
||||
|
@ -107,9 +107,7 @@ add_task(async function testNotInstalledDisabled() {
|
||||
"The addon name should include a disabled postfix"
|
||||
);
|
||||
|
||||
let cardMessage = addonCard.querySelector(
|
||||
"moz-message-bar.addon-card-message"
|
||||
);
|
||||
let cardMessage = addonCard.querySelector("message-bar.addon-card-message");
|
||||
is_element_hidden(cardMessage, "Warning notification is hidden");
|
||||
}
|
||||
|
||||
@ -132,9 +130,7 @@ add_task(async function testNotInstalledDisabledDetails() {
|
||||
|
||||
let updatesBtn = addonCard.querySelector("[action=update-check]");
|
||||
is_element_visible(updatesBtn, "Check for Updates action is visible");
|
||||
let cardMessage = addonCard.querySelector(
|
||||
"moz-message-bar.addon-card-message"
|
||||
);
|
||||
let cardMessage = addonCard.querySelector("message-bar.addon-card-message");
|
||||
is_element_hidden(cardMessage, "Warning notification is hidden");
|
||||
|
||||
await switchView(win, "plugin");
|
||||
@ -152,9 +148,7 @@ add_task(async function testNotInstalled() {
|
||||
Assert.ok(item, "Got add-on element:" + addon.id);
|
||||
|
||||
let warningMessageBar = await BrowserTestUtils.waitForCondition(() => {
|
||||
return item.querySelector(
|
||||
"moz-message-bar.addon-card-message[type=warning]"
|
||||
);
|
||||
return item.querySelector("message-bar.addon-card-message[type=warning]");
|
||||
}, "Wait for the addon card message to be updated");
|
||||
|
||||
is_element_visible(warningMessageBar, "Warning notification is visible");
|
||||
@ -188,7 +182,7 @@ add_task(async function testNotInstalledDetails() {
|
||||
|
||||
let warningMessageBar = await BrowserTestUtils.waitForCondition(() => {
|
||||
return addonCard.querySelector(
|
||||
"moz-message-bar.addon-card-message[type=warning]"
|
||||
"message-bar.addon-card-message[type=warning]"
|
||||
);
|
||||
}, "Wait for the addon card message to be updated");
|
||||
is_element_visible(warningMessageBar, "Warning notification is visible");
|
||||
|
@ -649,19 +649,17 @@ add_task(async function checkDiscopaneNotice() {
|
||||
});
|
||||
|
||||
let win = await loadInitialView("extension");
|
||||
let messageBar = win.document.querySelector(
|
||||
"moz-message-bar.discopane-notice"
|
||||
);
|
||||
let messageBar = win.document.querySelector("message-bar.discopane-notice");
|
||||
ok(messageBar, "Recommended notice should exist in extensions view");
|
||||
await switchToDiscoView(win);
|
||||
messageBar = win.document.querySelector("moz-message-bar.discopane-notice");
|
||||
messageBar = win.document.querySelector("message-bar.discopane-notice");
|
||||
ok(messageBar, "Recommended notice should exist in disco view");
|
||||
|
||||
messageBar.closeButtonEl.click();
|
||||
messageBar = win.document.querySelector("moz-message-bar.discopane-notice");
|
||||
messageBar.closeButton.click();
|
||||
messageBar = win.document.querySelector("message-bar.discopane-notice");
|
||||
ok(!messageBar, "Recommended notice should not exist in disco view");
|
||||
await switchToNonDiscoView(win);
|
||||
messageBar = win.document.querySelector("moz-message-bar.discopane-notice");
|
||||
messageBar = win.document.querySelector("message-bar.discopane-notice");
|
||||
ok(!messageBar, "Recommended notice should not exist in extensions view");
|
||||
|
||||
await closeView(win);
|
||||
|
@ -34,9 +34,10 @@ async function checkMessageState(id, addonType, expected) {
|
||||
ok(!messageBar.hidden, "message is visible");
|
||||
|
||||
is(messageBar.getAttribute("type"), type, "message has the right type");
|
||||
const textSpan = messageBar.querySelector("span");
|
||||
Assert.deepEqual(
|
||||
document.l10n.getAttributes(messageBar),
|
||||
{ id: `${text.id}2`, args: text.args },
|
||||
document.l10n.getAttributes(textSpan),
|
||||
text,
|
||||
"message l10n data is set correctly"
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user