From 861317720a4cc06d9740dabd5ab8d6c2b82b740a Mon Sep 17 00:00:00 2001 From: John Bieling Date: Wed, 4 Feb 2026 16:36:27 +0100 Subject: [PATCH 1/3] set this.moduleName needed here: https://searchfox.org/comm-central/rev/9b110d3a90e00ad156aa0c21ae5981c1a3faf00f/mail/components/extensions/ExtensionToolbarButtons.sys.mjs#833 --- calendar/experiments/calendar/parent/ext-calendarItemAction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/calendar/experiments/calendar/parent/ext-calendarItemAction.js b/calendar/experiments/calendar/parent/ext-calendarItemAction.js index 3fd93d1..4cee184 100644 --- a/calendar/experiments/calendar/parent/ext-calendarItemAction.js +++ b/calendar/experiments/calendar/parent/ext-calendarItemAction.js @@ -94,6 +94,7 @@ this.calendarItemAction = class extends ToolbarButtonAPI { super(extension, ExtensionParent.apiManager.global); this.manifest_name = "calendar_item_action"; this.manifestName = "calendarItemAction"; + this.moduleName = this.manifestName this.windowURLs = [ "chrome://messenger/content/messenger.xhtml", "chrome://calendar/content/calendar-event-dialog.xhtml" From c89996a7aa8d25c744afe4523adcac8dee607fcd Mon Sep 17 00:00:00 2001 From: John Bieling Date: Wed, 4 Feb 2026 16:38:10 +0100 Subject: [PATCH 2/3] define details inline we don't do that in our own action button APIs, and it causes errors thrown by Schemas.sys.mjs --- .../calendar/schema/calendarItemAction.json | 205 ++++++++++++++---- 1 file changed, 168 insertions(+), 37 deletions(-) diff --git a/calendar/experiments/calendar/schema/calendarItemAction.json b/calendar/experiments/calendar/schema/calendarItemAction.json index 093e384..52fd362 100644 --- a/calendar/experiments/calendar/schema/calendarItemAction.json +++ b/calendar/experiments/calendar/schema/calendarItemAction.json @@ -70,25 +70,6 @@ "description": "Use a calendarItemAction to put an icon in the calendar event/task dialogs. In addition to its icon, a calendarItemAction can also have a tooltip, a badge, and a popup. This namespace is called calendarItemAction for compatibility with browser WebExtensions.", "permissions": ["manifest:calendar_item_action"], "types": [ - { - "id": "Details", - "type": "object", - "description": "Specifies to which tab or window the value should be set, or from which one it should be retrieved. If no tab nor window is specified, the global value is set or retrieved.", - "properties": { - "tabId": { - "type": "integer", - "optional": true, - "minimum": 0, - "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." - }, - "windowId": { - "type": "integer", - "optional": true, - "minimum": -2, - "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." - } - } - }, { "id": "ColorArray", "description": "An array of four integers in the range [0,255] that make up the RGBA color. For example, opaque red is [255, 0, 0, 255].", @@ -148,7 +129,6 @@ { "name": "details", "type": "object", - "$import": "Details", "properties": { "title": { "choices": [ @@ -156,7 +136,19 @@ {"type": "null"} ], "description": "The string the calendarItemAction should display as its label and when moused over." - } + }, + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } } }, { @@ -175,7 +167,21 @@ "parameters": [ { "name": "details", - "$ref": "Details" + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } + } }, { "type": "function", @@ -198,7 +204,6 @@ { "name": "details", "type": "object", - "$import": "Details", "properties": { "label": { "choices": [ @@ -206,7 +211,19 @@ {"type": "null"} ], "description": "The string the calendarItemAction should use as label. Can be set to an empty string to not display any label. If the containing toolbar is configured to display text only, the title will be used as fallback." - } + }, + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } } }, { @@ -225,7 +242,21 @@ "parameters": [ { "name": "details", - "$ref": "Details" + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } + } }, { "type": "function", @@ -248,7 +279,6 @@ { "name": "details", "type": "object", - "$import": "Details", "properties": { "imageData": { "choices": [ @@ -265,7 +295,19 @@ ], "optional": true, "description": "Either a relative image path defining a single icon used for all sizes or an IconPathDictionary object defining dedicated icons for different sizes." - } + }, + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } } }, { @@ -285,7 +327,6 @@ { "name": "details", "type": "object", - "$import": "Details", "properties": { "popup": { "choices": [ @@ -293,7 +334,19 @@ {"type": "null"} ], "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown." - } + }, + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } } }, { @@ -312,7 +365,21 @@ "parameters": [ { "name": "details", - "$ref": "Details" + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } + } }, { "type": "function", @@ -335,7 +402,6 @@ { "name": "details", "type": "object", - "$import": "Details", "properties": { "text": { "choices": [ @@ -343,7 +409,19 @@ {"type": "null"} ], "description": "Any number of characters can be passed, but only about four can fit in the space." - } + }, + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } } }, { @@ -362,7 +440,21 @@ "parameters": [ { "name": "details", - "$ref": "Details" + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } + } }, { "type": "function", @@ -385,7 +477,6 @@ { "name": "details", "type": "object", - "$import": "Details", "properties": { "color": { "description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is [255, 0, 0, 255]. Can also be a string with a CSS value, with opaque red being #FF0000 or #F00.", @@ -394,7 +485,19 @@ {"$ref": "ColorArray"}, {"type": "null"} ] - } + }, + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } } }, { @@ -413,7 +516,21 @@ "parameters": [ { "name": "details", - "$ref": "Details" + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } + } }, { "type": "function", @@ -477,7 +594,21 @@ "parameters": [ { "name": "details", - "$ref": "Details" + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "optional": true, + "minimum": 0, + "description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited." + }, + "windowId": { + "type": "integer", + "optional": true, + "minimum": -2, + "description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited." + } + } }, { "type": "function", From 07b698f6f4df0a5ec28be85f899c979d4068d5e3 Mon Sep 17 00:00:00 2001 From: John Bieling Date: Wed, 4 Feb 2026 17:29:22 +0100 Subject: [PATCH 3/3] Add missing ; --- calendar/experiments/calendar/parent/ext-calendarItemAction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/experiments/calendar/parent/ext-calendarItemAction.js b/calendar/experiments/calendar/parent/ext-calendarItemAction.js index 4cee184..3dcaed2 100644 --- a/calendar/experiments/calendar/parent/ext-calendarItemAction.js +++ b/calendar/experiments/calendar/parent/ext-calendarItemAction.js @@ -94,7 +94,7 @@ this.calendarItemAction = class extends ToolbarButtonAPI { super(extension, ExtensionParent.apiManager.global); this.manifest_name = "calendar_item_action"; this.manifestName = "calendarItemAction"; - this.moduleName = this.manifestName + this.moduleName = this.manifestName; this.windowURLs = [ "chrome://messenger/content/messenger.xhtml", "chrome://calendar/content/calendar-event-dialog.xhtml"