Bug 1837662 - Create shopping placeholder page. r=jhirsch

* For now, make page available via chrome://browser/content/shopping/shopping.html .

* Includes preview ftl file and proof-of-concept working localization of
  the page title.

Differential Revision: https://phabricator.services.mozilla.com/D180487
This commit is contained in:
Jared Hirsch 2023-06-12 19:02:49 +00:00
Родитель 6d50e21963
Коммит 0dd54e871a
9 изменённых файлов: 78 добавлений и 0 удалений

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

@ -71,6 +71,9 @@ var gExceptionPaths = [
// Localization file added programatically in featureCallout.jsm
"resource://app/localization/en-US/browser/featureCallout.ftl",
// Temporary allowlist for shopping - we'll reference this soon.
"chrome://browser/content/shopping/shopping.html",
];
// These are not part of the omni.ja file, so we find them only when running

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

@ -66,6 +66,9 @@ DIRS += [
DIRS += ["build"]
if CONFIG["NIGHTLY_BUILD"]:
DIRS += ["shopping"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
DIRS += ["touchbar"]

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

@ -0,0 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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,
body {
margin: 0;
padding: 0;
}

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

@ -0,0 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
### This file is not in a locales directory to prevent it from
### being translated as the feature is still in heavy development
### and strings are likely to change often.
shopping-page-title = { -brand-product-name } Shopping

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

@ -0,0 +1,31 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" role="document" id="shopping">
<head>
<meta charset="utf-8" />
<meta
http-equiv="Content-Security-Policy"
content="default-src resource: chrome:; object-src 'none'; img-src chrome:;"
/>
<meta name="color-scheme" content="light dark" />
<link rel="localization" href="branding/brand.ftl" />
<link rel="localization" href="preview/shopping.ftl" />
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
<link
rel="stylesheet"
href="chrome://browser/content/shopping/shopping.css"
/>
<script
type="module"
src="chrome://browser/content/shopping/shopping.mjs"
></script>
<title data-l10n-id="shopping-page-title"></title>
</head>
<body>
<div id="content"></div>
</body>
</html>

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

@ -0,0 +1,4 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */

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

@ -0,0 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
browser.jar:
content/browser/shopping/shopping.html (content/shopping.html)
content/browser/shopping/shopping.css (content/shopping.css)
content/browser/shopping/shopping.mjs (content/shopping.mjs)

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

@ -0,0 +1,10 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
JAR_MANIFESTS += ["jar.mn"]
with Files("**"):
BUG_COMPONENT = ("Firefox", "Shopping")

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

@ -12,6 +12,7 @@
preview/protections.ftl (../components/protections/content/protections.ftl)
preview/interventions.ftl (../components/urlbar/content/interventions.ftl)
preview/firefoxSuggest.ftl (../components/urlbar/content/firefoxSuggest.ftl)
preview/shopping.ftl (../components/shopping/content/shopping.ftl)
preview/stripOnShare.ftl (../components/urlbar/content/stripOnShare.ftl)
browser (%browser/**/*.ftl)