Skip to content

Commit 0dd54e8

Browse files
committed
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
1 parent 6d50e21 commit 0dd54e8

File tree

9 files changed

+78
-0
lines changed

9 files changed

+78
-0
lines changed

browser/base/content/test/static/browser_all_files_referenced.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ var gExceptionPaths = [
7171

7272
// Localization file added programatically in featureCallout.jsm
7373
"resource://app/localization/en-US/browser/featureCallout.ftl",
74+
75+
// Temporary allowlist for shopping - we'll reference this soon.
76+
"chrome://browser/content/shopping/shopping.html",
7477
];
7578

7679
// These are not part of the omni.ja file, so we find them only when running

browser/components/moz.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ DIRS += [
6666

6767
DIRS += ["build"]
6868

69+
if CONFIG["NIGHTLY_BUILD"]:
70+
DIRS += ["shopping"]
71+
6972

7073
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
7174
DIRS += ["touchbar"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
:root,
6+
body {
7+
margin: 0;
8+
padding: 0;
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
### This file is not in a locales directory to prevent it from
6+
### being translated as the feature is still in heavy development
7+
### and strings are likely to change often.
8+
9+
shopping-page-title = { -brand-product-name } Shopping
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- This Source Code Form is subject to the terms of the Mozilla Public
2+
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
3+
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
4+
<!DOCTYPE html>
5+
<html xmlns="http://www.w3.org/1999/xhtml" role="document" id="shopping">
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta
9+
http-equiv="Content-Security-Policy"
10+
content="default-src resource: chrome:; object-src 'none'; img-src chrome:;"
11+
/>
12+
<meta name="color-scheme" content="light dark" />
13+
<link rel="localization" href="branding/brand.ftl" />
14+
<link rel="localization" href="preview/shopping.ftl" />
15+
16+
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
17+
<link
18+
rel="stylesheet"
19+
href="chrome://browser/content/shopping/shopping.css"
20+
/>
21+
22+
<script
23+
type="module"
24+
src="chrome://browser/content/shopping/shopping.mjs"
25+
></script>
26+
<title data-l10n-id="shopping-page-title"></title>
27+
</head>
28+
<body>
29+
<div id="content"></div>
30+
</body>
31+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this
4+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

browser/components/shopping/jar.mn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
browser.jar:
6+
content/browser/shopping/shopping.html (content/shopping.html)
7+
content/browser/shopping/shopping.css (content/shopping.css)
8+
content/browser/shopping/shopping.mjs (content/shopping.mjs)

browser/components/shopping/moz.build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2+
# vim: set filetype=python:
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+
JAR_MANIFESTS += ["jar.mn"]
8+
9+
with Files("**"):
10+
BUG_COMPONENT = ("Firefox", "Shopping")

browser/locales/jar.mn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
preview/protections.ftl (../components/protections/content/protections.ftl)
1313
preview/interventions.ftl (../components/urlbar/content/interventions.ftl)
1414
preview/firefoxSuggest.ftl (../components/urlbar/content/firefoxSuggest.ftl)
15+
preview/shopping.ftl (../components/shopping/content/shopping.ftl)
1516
preview/stripOnShare.ftl (../components/urlbar/content/stripOnShare.ftl)
1617
browser (%browser/**/*.ftl)
1718

0 commit comments

Comments
 (0)