From df1909423d87986eb1c9dcac43e1ba6ea566f3db Mon Sep 17 00:00:00 2001
From: lisa-wolfgang <43426138+lisa-wolfgang@users.noreply.github.com>
Date: Mon, 18 Jul 2022 19:37:22 -0500
Subject: [PATCH 1/3] Change addon compat page name
---
content/docs/reference/addon-compatibility-checklist.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 content/docs/reference/addon-compatibility-checklist.md
diff --git a/content/docs/reference/addon-compatibility-checklist.md b/content/docs/reference/addon-compatibility-checklist.md
new file mode 100644
index 000000000..6e5ea7e65
--- /dev/null
+++ b/content/docs/reference/addon-compatibility-checklist.md
@@ -0,0 +1,5 @@
+---
+title: Addon Compatibility Checklist
+aliases:
+ - /docs/developing/addon-compatibility-checklist
+---
From d3763ee1e8f52597620b70eae6f07bf230a91a6d Mon Sep 17 00:00:00 2001
From: lisa-wolfgang <43426138+lisa-wolfgang@users.noreply.github.com>
Date: Mon, 18 Jul 2022 22:13:41 -0500
Subject: [PATCH 2/3] Compat list additions
- Navbar
- Editor (general)
- Stage header
---
.../addon-compatibility-checklist.md | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/content/docs/reference/addon-compatibility-checklist.md b/content/docs/reference/addon-compatibility-checklist.md
index 6e5ea7e65..219e142d8 100644
--- a/content/docs/reference/addon-compatibility-checklist.md
+++ b/content/docs/reference/addon-compatibility-checklist.md
@@ -3,3 +3,40 @@ title: Addon Compatibility Checklist
aliases:
- /docs/developing/addon-compatibility-checklist
---
+
+When developing an addon, make sure to review the categories that you're editing for any factors that need to be considered.
+
+# Non-Editor Addons
+
+## Navbar
+New addons that modify the navbar must be compatible with the following addons:
+- Customizable navigation bar
+- Expandable search bar
+
+# Editor Addons
+
+## General
+
+Any elements inside `
` that are modified with a userscript will be wiped and restored to vanilla Scratch when the user switches to the project page. This also happens with other parent `div`s: for example, when a new button is added to the color picker, then the color picker is closed. The convention is to reinstate custom UI elements by using a `while (true)` loop with `addon.tab.waitForElement` like so:
+
+ ```js
+ while (true) {
+ let element = await addon.tab.waitForElement(/* CSS selector of desired parent element from regular Scratch */, {
+ markAsSeen: true,
+ }
+ /* Re-initialize anything related to the UI here */
+ }
+ ```
+
+## Stage Header
+New addons that add elements to the stage header must be compatible with the following addons by using the `stageHeader` space with the `addon.tab.appendToSharedSpace` API:
+- 60FPS project player mode
+- Clone counter
+- Gamepad support
+- Mouse position
+- Muted project player mode
+- Pause button
+
+Other things that affect the stage header:
+- Entering full screen (the `fullscreenStageHeader` space must be used)
+- The "reverse order of project controls" addon
From 11d82f3834eae02246ff3416bc75eefb6b2451c5 Mon Sep 17 00:00:00 2001
From: lisa-wolfgang <43426138+lisa-wolfgang@users.noreply.github.com>
Date: Mon, 18 Jul 2022 22:24:44 -0500
Subject: [PATCH 3/3] Compat list: fix inaccuracies in Stage Header
---
content/docs/reference/addon-compatibility-checklist.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/content/docs/reference/addon-compatibility-checklist.md b/content/docs/reference/addon-compatibility-checklist.md
index 219e142d8..dfec85160 100644
--- a/content/docs/reference/addon-compatibility-checklist.md
+++ b/content/docs/reference/addon-compatibility-checklist.md
@@ -29,7 +29,7 @@ Any elements inside `
` that are modified with a userscript will be
```
## Stage Header
-New addons that add elements to the stage header must be compatible with the following addons by using the `stageHeader` space with the `addon.tab.appendToSharedSpace` API:
+New addons that add elements to the stage header must be compatible with the following addons by using their respective spaces with the [`addon.tab.appendToSharedSpace`](https://scratchaddons.com/docs/reference/addon-api/addon.tab/addon.tab.appendtosharedspace/) API:
- 60FPS project player mode
- Clone counter
- Gamepad support
@@ -38,5 +38,6 @@ New addons that add elements to the stage header must be compatible with the fol
- Pause button
Other things that affect the stage header:
-- Entering full screen (the `fullscreenStageHeader` space must be used)
+- Entering and exiting full screen (the `fullscreenStageHeader` space must be used in full screen)
+- Activating Turbo Mode
- The "reverse order of project controls" addon