Bug 1643272 - Group schemas and docs together for button actions and triggers r=k88hudson
authorAndrei Oprea <andrei.br92@gmail.com>
Wed, 10 Jun 2020 13:12:28 +0000
changeset 598944 944303739df55f2c6014811ef44d23246d04aa8d
parent 598943 45c61fd0206e7505f4d950a876279ba30a203321
child 598945 5b9343de266b3a4b7fa585345027b6589ea4614f
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersk88hudson
bugs1643272
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1643272 - Group schemas and docs together for button actions and triggers r=k88hudson Differential Revision: https://phabricator.services.mozilla.com/D78307
browser/components/newtab/content-src/asrouter/docs/index.rst
browser/components/newtab/content-src/asrouter/docs/trigger-listeners.md
browser/components/newtab/test/browser/browser.ini
browser/components/newtab/test/browser/browser_asrouter_trigger_docs.js
browser/components/newtab/test/browser/browser_asrouter_trigger_listeners.js
toolkit/components/messaging-system/moz.build
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas.md
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/SpecialMessageActionSchemas.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/SpecialMessageActionSchemas.md
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser.ini
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_cancel.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_docs.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_about_page.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_awesome_bar.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_private_browser_window.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_protection_panel.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_protection_report.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_url.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_pin_current_tab.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_firefox_accounts.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js
toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/head.js
toolkit/components/messaging-system/schemas/TriggerActionSchemas.js
toolkit/components/messaging-system/schemas/TriggerActionSchemas/TriggerActionSchemas.js
toolkit/components/messaging-system/schemas/TriggerActionSchemas/TriggerActionSchemas.md
toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser.ini
toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_docs.js
toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_listeners.js
toolkit/components/messaging-system/schemas/index.rst
toolkit/components/messaging-system/test/browser/specialMessageActions/browser.ini
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_cancel.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_docs.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_about_page.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_awesome_bar.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_private_browser_window.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_protection_panel.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_protection_report.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_url.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_pin_current_tab.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_show_firefox_accounts.js
toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_show_migration_wizard.js
toolkit/components/messaging-system/test/browser/specialMessageActions/head.js
--- a/browser/components/newtab/content-src/asrouter/docs/index.rst
+++ b/browser/components/newtab/content-src/asrouter/docs/index.rst
@@ -79,16 +79,21 @@ Current templates include\:
   with calls to action that persist for several days
 * Snippets - short messages that appear on New Tab Page to highlight products,
   features and initiatives
 * Badging - A colorful dot to highlight icons in the toolbar or menu items in
   order to draw attention with minimal interruption
 
 Detailed Docs
 -------------
+
+* Read more about `trigger listeners and user action schemas`__.
+
+.. __: /toolkit/components/messaging-system/docs
+
 .. In theory, we ought to be able to use the :glob: directive here to
 .. automatically generate the list below. For unknown reasons, however,
 .. `mach doc` _sometimes_ gets confused and refuses to find patterns like
 .. `*.md`.
 .. toctree::
   :maxdepth: 2
 
   debugging-docs
--- a/browser/components/newtab/test/browser/browser.ini
+++ b/browser/components/newtab/test/browser/browser.ini
@@ -1,34 +1,32 @@
 [DEFAULT]
 support-files =
   blue_page.html
   red_page.html
   head.js
   snippet.json
   topstories.json
   ds_layout.json
-  ../../content-src/asrouter/docs/trigger-listeners.md
 prefs =
   browser.newtabpage.activity-stream.debug=false
   browser.newtabpage.activity-stream.discoverystream.enabled=true
   browser.newtabpage.activity-stream.discoverystream.endpoints=data:
   browser.newtabpage.activity-stream.feeds.section.topstories=true
   browser.newtabpage.activity-stream.feeds.section.topstories.options={"provider_name":""}
 
 [browser_aboutwelcome.js]
 [browser_aboutwelcome_actors.js]
 [browser_aboutwelcome_simplified.js]
 [browser_aboutwelcome_multistage.js]
 [browser_aboutwelcome_observer.js]
 [browser_as_load_location.js]
 [browser_as_render.js]
 [browser_asrouter_snippets.js]
 [browser_asrouter_targeting.js]
-[browser_asrouter_trigger_listeners.js]
 [browser_discovery_render.js]
 [browser_discovery_styles.js]
 [browser_enabled_newtabpage.js]
 [browser_highlights_section.js]
 [browser_discovery_card.js]
 [browser_getScreenshots.js]
 [browser_newtab_overrides.js]
 [browser_onboarding_rtamo.js]
@@ -40,9 +38,8 @@ skip-if = (os == "linux") # Test setup o
 [browser_asrouter_toolbarbadge.js]
 [browser_asrouter_whatsnewpanel.js]
 tags = remote-settings
 [browser_asrouter_momentspagehub.js]
 tags = remote-settings
 [browser_asrouter_experimentsAPILoader.js]
 [browser_asrouter_group_frequency.js]
 [browser_asrouter_group_userprefs.js]
-[browser_asrouter_trigger_docs.js]
--- a/toolkit/components/messaging-system/moz.build
+++ b/toolkit/components/messaging-system/moz.build
@@ -2,19 +2,24 @@
 # 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/.
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Messaging System')
 
-BROWSER_CHROME_MANIFESTS += ['test/browser/specialMessageActions/browser.ini']
+BROWSER_CHROME_MANIFESTS += [
+    'schemas/SpecialMessageActionSchemas/test/browser/browser.ini',
+    'schemas/TriggerActionSchemas/test/browser/browser.ini',
+]
+
+SPHINX_TREES['docs'] = 'schemas'
 
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
 TESTING_JS_MODULES += [
-    'schemas/SpecialMessageActionSchemas.js',
-    'schemas/TriggerActionSchemas.js',
+    'schemas/SpecialMessageActionSchemas/SpecialMessageActionSchemas.js',
+    'schemas/TriggerActionSchemas/TriggerActionSchemas.js',
     'test/MSTestUtils.jsm',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
rename from toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/SpecialMessageActionSchemas.js
rename from toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas.md
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/SpecialMessageActionSchemas.md
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser.ini
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser.ini
--- a/toolkit/components/messaging-system/test/browser/specialMessageActions/browser.ini
+++ b/toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser.ini
@@ -1,14 +1,14 @@
 [DEFAULT]
 prefs =
   identity.fxaccounts.remote.root=https://example.com/
 support-files =
   head.js
-  ../../../schemas/SpecialMessageActionSchemas.md
+  ../../SpecialMessageActionSchemas.md
 
 [browser_sma_open_about_page.js]
 [browser_sma_open_awesome_bar.js]
 [browser_sma_open_private_browser_window.js]
 [browser_sma_open_protection_panel.js]
 [browser_sma_open_protection_report.js]
 [browser_sma_open_url.js]
 [browser_sma_pin_current_tab.js]
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_cancel.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_cancel.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_docs.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_docs.js
--- a/toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_docs.js
+++ b/toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_docs.js
@@ -1,10 +1,10 @@
 const TEST_URL =
-  "https://example.com/browser/toolkit/components/messaging-system/test/browser/specialMessageActions/SpecialMessageActionSchemas.md";
+  "https://example.com/browser/toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/SpecialMessageActionSchemas.md";
 
 const { SpecialMessageActionSchemas } = ChromeUtils.import(
   "resource://testing-common/SpecialMessageActionSchemas.js"
 );
 
 function getHeadingsFromDocs(docs) {
   const re = /### `(\w+)`/g;
   const found = [];
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_about_page.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_about_page.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_awesome_bar.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_awesome_bar.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_private_browser_window.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_private_browser_window.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_protection_panel.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_protection_panel.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_protection_report.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_protection_report.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_open_url.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_open_url.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_pin_current_tab.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_pin_current_tab.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_show_firefox_accounts.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_firefox_accounts.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/browser_sma_show_migration_wizard.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js
rename from toolkit/components/messaging-system/test/browser/specialMessageActions/head.js
rename to toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/head.js
rename from toolkit/components/messaging-system/schemas/TriggerActionSchemas.js
rename to toolkit/components/messaging-system/schemas/TriggerActionSchemas/TriggerActionSchemas.js
rename from browser/components/newtab/content-src/asrouter/docs/trigger-listeners.md
rename to toolkit/components/messaging-system/schemas/TriggerActionSchemas/TriggerActionSchemas.md
new file mode 100644
--- /dev/null
+++ b/toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+support-files =
+  ../../TriggerActionSchemas.md
+
+[browser_asrouter_trigger_listeners.js]
+[browser_asrouter_trigger_docs.js]
rename from browser/components/newtab/test/browser/browser_asrouter_trigger_docs.js
rename to toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_docs.js
--- a/browser/components/newtab/test/browser/browser_asrouter_trigger_docs.js
+++ b/toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_docs.js
@@ -1,10 +1,10 @@
 const TEST_URL =
-  "https://example.com/browser/browser/components/newtab/test/browser/trigger-listeners.md";
+  "https://example.com/browser/toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/TriggerActionSchemas.md";
 
 const { TriggerActionSchemas } = ChromeUtils.import(
   "resource://testing-common/TriggerActionSchemas.js"
 );
 const { ASRouterTriggerListeners } = ChromeUtils.import(
   "resource://activity-stream/lib/ASRouterTriggerListeners.jsm"
 );
 const { CFRMessageProvider } = ChromeUtils.import(
rename from browser/components/newtab/test/browser/browser_asrouter_trigger_listeners.js
rename to toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_listeners.js
new file mode 100644
--- /dev/null
+++ b/toolkit/components/messaging-system/schemas/index.rst
@@ -0,0 +1,18 @@
+Messaging System Schemas
+========================
+
+Docs
+----
+
+More information about `Messaging System`__.
+
+.. __: /browser/components/newtab/content-src/asrouter/docs
+
+Triggers and actions
+---------------------
+
+.. toctree::
+  :maxdepth: 2
+
+  SpecialMessageActionSchemas/SpecialMessageActionSchemas.md
+  TriggerActionSchemas/TriggerActionSchemas.md