mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Backed out changeset 4ad2cddade30 (bug 1883516) for causing node newtab failures
This commit is contained in:
parent
da2c14d7b8
commit
ac32d77102
@ -1372,102 +1372,6 @@ html {
|
||||
outline: 2px solid var(--in-content-primary-button-background);
|
||||
}
|
||||
|
||||
// newtab wallpaper specific styles
|
||||
&.wallpaper {
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
|
||||
&:hover {
|
||||
outline: unset;
|
||||
}
|
||||
|
||||
.theme {
|
||||
flex: unset;
|
||||
width: unset;
|
||||
transition: var(--transition);
|
||||
|
||||
.icon {
|
||||
width: 116px;
|
||||
height: 86px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 2px 0 #3A394433;
|
||||
|
||||
&:hover {
|
||||
filter: brightness(45%);
|
||||
}
|
||||
|
||||
// dark theme wallpapers
|
||||
&.dark-aurora {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/dark-aurora.avif');
|
||||
}
|
||||
|
||||
&.dark-city {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/dark-city.avif');
|
||||
}
|
||||
|
||||
&.dark-color {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/dark-color.avif');
|
||||
}
|
||||
|
||||
&.dark-mountain {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/dark-mountain.avif');
|
||||
}
|
||||
|
||||
&.dark-panda {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/dark-panda.avif');
|
||||
}
|
||||
|
||||
&.dark-sky {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/dark-sky.avif');
|
||||
}
|
||||
|
||||
// light theme wallpapers
|
||||
&.light-beach {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/light-beach.avif');
|
||||
}
|
||||
|
||||
&.light-color {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/light-color.avif');
|
||||
}
|
||||
|
||||
&.light-landscape {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/light-landscape.avif');
|
||||
}
|
||||
|
||||
&.light-mountain {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/light-mountain.avif');
|
||||
}
|
||||
|
||||
&.light-redpanda {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/light-redpanda.avif');
|
||||
}
|
||||
|
||||
&.light-sky {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/light-sky.avif');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.light {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dark {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.theme {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
@ -463,14 +463,9 @@ export class WelcomeScreen extends React.PureComponent {
|
||||
action.theme === "<event>"
|
||||
? event.currentTarget.value
|
||||
: this.props.initialTheme || action.theme;
|
||||
|
||||
this.props.setActiveTheme(themeToUse);
|
||||
if (props.content.tiles?.category?.type === "wallpaper") {
|
||||
let actionWallPaper = props.content.tiles?.category?.action;
|
||||
actionWallPaper.data.pref.value = themeToUse;
|
||||
await AboutWelcomeUtils.handleUserAction(actionWallPaper);
|
||||
} else {
|
||||
window.AWSelectTheme(themeToUse);
|
||||
}
|
||||
window.AWSelectTheme(themeToUse);
|
||||
}
|
||||
|
||||
// If the action has persistActiveTheme: true, we set the initial theme to the currently active theme
|
||||
|
@ -9,20 +9,18 @@ export const Themes = props => {
|
||||
return (
|
||||
<div className="tiles-theme-container">
|
||||
<div>
|
||||
<fieldset
|
||||
className={`tiles-theme-section ${props.content.tiles?.category?.type}`}
|
||||
>
|
||||
<fieldset className="tiles-theme-section">
|
||||
<Localized text={props.content.subtitle}>
|
||||
<legend className="sr-only" />
|
||||
</Localized>
|
||||
{props.content.tiles.data.map(
|
||||
({ theme, label, tooltip, description, type }) => (
|
||||
({ theme, label, tooltip, description }) => (
|
||||
<Localized
|
||||
key={theme + label}
|
||||
text={typeof tooltip === "object" ? tooltip : {}}
|
||||
>
|
||||
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
|
||||
<label className={`theme ${type}`} title={theme + label}>
|
||||
<label className="theme" title={theme + label}>
|
||||
<Localized
|
||||
text={typeof description === "object" ? description : {}}
|
||||
>
|
||||
|
@ -560,13 +560,7 @@ class WelcomeScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
|
||||
if (action.theme) {
|
||||
let themeToUse = action.theme === "<event>" ? event.currentTarget.value : this.props.initialTheme || action.theme;
|
||||
this.props.setActiveTheme(themeToUse);
|
||||
if (props.content.tiles?.category?.type === "wallpaper") {
|
||||
let actionWallPaper = props.content.tiles?.category?.action;
|
||||
actionWallPaper.data.pref.value = themeToUse;
|
||||
await _lib_aboutwelcome_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.AboutWelcomeUtils.handleUserAction(actionWallPaper);
|
||||
} else {
|
||||
window.AWSelectTheme(themeToUse);
|
||||
}
|
||||
window.AWSelectTheme(themeToUse);
|
||||
}
|
||||
|
||||
// If the action has persistActiveTheme: true, we set the initial theme to the currently active theme
|
||||
@ -1457,7 +1451,7 @@ const Themes = props => {
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
||||
className: "tiles-theme-container"
|
||||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("fieldset", {
|
||||
className: `tiles-theme-section ${props.content.tiles?.category?.type}`
|
||||
className: "tiles-theme-section"
|
||||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MSLocalized__WEBPACK_IMPORTED_MODULE_1__.Localized, {
|
||||
text: props.content.subtitle
|
||||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("legend", {
|
||||
@ -1466,13 +1460,12 @@ const Themes = props => {
|
||||
theme,
|
||||
label,
|
||||
tooltip,
|
||||
description,
|
||||
type
|
||||
description
|
||||
}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MSLocalized__WEBPACK_IMPORTED_MODULE_1__.Localized, {
|
||||
key: theme + label,
|
||||
text: typeof tooltip === "object" ? tooltip : {}
|
||||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
|
||||
className: `theme ${type}`,
|
||||
className: "theme",
|
||||
title: theme + label
|
||||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MSLocalized__WEBPACK_IMPORTED_MODULE_1__.Localized, {
|
||||
text: typeof description === "object" ? description : {}
|
||||
|
@ -2062,77 +2062,6 @@ html {
|
||||
border-radius: 8px;
|
||||
outline: 2px solid var(--in-content-primary-button-background);
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper {
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper:hover {
|
||||
outline: unset;
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme {
|
||||
flex: unset;
|
||||
width: unset;
|
||||
transition: var(--transition);
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon {
|
||||
width: 116px;
|
||||
height: 86px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 2px 0 rgba(58, 57, 68, 0.2);
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon:hover {
|
||||
filter: brightness(45%);
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.dark-aurora {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/dark-aurora.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.dark-city {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/dark-city.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.dark-color {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/dark-color.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.dark-mountain {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/dark-mountain.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.dark-panda {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/dark-panda.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.dark-sky {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/dark-sky.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.light-beach {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/light-beach.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.light-color {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/light-color.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.light-landscape {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/light-landscape.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.light-mountain {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/light-mountain.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.light-redpanda {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/light-redpanda.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .theme .icon.light-sky {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/wallpapers/light-sky.avif");
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .dark {
|
||||
display: none;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .light {
|
||||
display: none;
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .dark {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section.wallpaper .text {
|
||||
display: none;
|
||||
}
|
||||
.onboardingContainer .tiles-theme-section .theme {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
@ -55,9 +55,6 @@ mr1-onboarding-theme-header = Make it your own
|
||||
mr1-onboarding-theme-subtitle = Personalize { -brand-short-name } with a theme.
|
||||
mr1-onboarding-theme-secondary-button-label = Not now
|
||||
|
||||
newtab-wallpaper-onboarding-title = Try a splash of color
|
||||
newtab-wallpaper-onboarding-subtitle = Choose a wallpaper to give your New Tab a fresh look.
|
||||
|
||||
# System theme uses operating system color settings
|
||||
mr1-onboarding-theme-label-system = System theme
|
||||
|
||||
|
@ -198,7 +198,6 @@ export const SpecialMessageActions = {
|
||||
"browser.firefox-view.feature-tour",
|
||||
"browser.pdfjs.feature-tour",
|
||||
"browser.newtab.feature-tour",
|
||||
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper",
|
||||
"cookiebanners.service.mode",
|
||||
"cookiebanners.service.mode.privateBrowsing",
|
||||
"cookiebanners.service.detectOnly",
|
||||
|
Loading…
Reference in New Issue
Block a user