@@ -119,10 +111,7 @@ const ActivateModInputs: React.FC
= ({
bring everything back in line.
*/}
-
+
)}
diff --git a/src/sidebar/activateMod/ActivateModPanel.tsx b/src/sidebar/activateMod/ActivateModPanel.tsx
index a8e8c9b528..4e65c633e3 100644
--- a/src/sidebar/activateMod/ActivateModPanel.tsx
+++ b/src/sidebar/activateMod/ActivateModPanel.tsx
@@ -39,7 +39,7 @@ import useActivateMod from "@/activation/useActivateMod";
import { type WizardValues } from "@/activation/wizardTypes";
import { createSlice, type PayloadAction } from "@reduxjs/toolkit";
import useActivateModWizard, {
- type UseActivateRecipeWizardResult,
+ type UseActivateModWizardResult,
} from "@/activation/useActivateModWizard";
import RequireMods, {
type RequiredModDefinition,
@@ -212,7 +212,7 @@ export const SuccessPanel: React.FC<{
);
const ActivateModPanelContent: React.FC<
- RequiredModDefinition & UseActivateRecipeWizardResult
+ RequiredModDefinition & UseActivateModWizardResult
> = ({
modDefinition,
includesQuickBar,
diff --git a/src/sidebar/activateMod/ActivateMultipleModsPanel.tsx b/src/sidebar/activateMod/ActivateMultipleModsPanel.tsx
index 5b161d74f1..5ef70a7f72 100644
--- a/src/sidebar/activateMod/ActivateMultipleModsPanel.tsx
+++ b/src/sidebar/activateMod/ActivateMultipleModsPanel.tsx
@@ -100,7 +100,7 @@ const AutoActivatePanel: React.FC<{ mods: RequiredModDefinition[] }> = ({
databaseOptions,
optionsValidationSchema,
initialModOptions: mod.initialOptions,
- installedExtensions: activatedModComponents,
+ activatedModComponents,
});
const result = await activate(
diff --git a/src/store/checkActiveModComponentAvailability.test.ts b/src/store/checkActiveModComponentAvailability.test.ts
index 9ec3037147..5ec34211c0 100644
--- a/src/store/checkActiveModComponentAvailability.test.ts
+++ b/src/store/checkActiveModComponentAvailability.test.ts
@@ -92,7 +92,9 @@ describe("checkActiveModComponentAvailability", () => {
store.dispatch(
actions.addModComponentFormState(unavailableDraftModComponent),
);
- store.dispatch(actions.selectInstalled(availableDraftModComponent));
+ store.dispatch(
+ actions.selectActivatedModComponentFormState(availableDraftModComponent),
+ );
jest
.mocked(checkAvailable)
diff --git a/src/store/checkAvailableDraftModComponents.test.ts b/src/store/checkAvailableDraftModComponents.test.ts
index aad1ad1adc..b52793add1 100644
--- a/src/store/checkAvailableDraftModComponents.test.ts
+++ b/src/store/checkAvailableDraftModComponents.test.ts
@@ -92,7 +92,9 @@ describe("checkAvailableDraftModComponents", () => {
store.dispatch(
actions.addModComponentFormState(unavailableDraftModComponent),
);
- store.dispatch(actions.selectInstalled(availableDraftModComponent));
+ store.dispatch(
+ actions.selectActivatedModComponentFormState(availableDraftModComponent),
+ );
jest
.mocked(checkAvailable)
diff --git a/src/store/uninstallUtils.ts b/src/store/deactivateUtils.ts
similarity index 85%
rename from src/store/uninstallUtils.ts
rename to src/store/deactivateUtils.ts
index 41bdccfd0a..aacc4a2a77 100644
--- a/src/store/uninstallUtils.ts
+++ b/src/store/deactivateUtils.ts
@@ -30,18 +30,18 @@ import { type UUID } from "@/types/stringTypes";
/**
* @file utility methods to deactivate mods/mod components and remove from the existing tabs.
*
- * Mocked in src/__mocks__/@/store/uninstallUtils.ts.
+ * Mocked in src/__mocks__/@/store/deactivateUtils.ts.
*/
/**
- * Use this helper outside the Page Editor context to uninstall a mod and all of its mod components.
+ * Use this helper outside the Page Editor context to deactivate a mod and all of its mod components.
*
- * Uninstalls from:
+ * Removes from:
* - Extension Options slice
* - Draft mod components slice (i.e., Page Editor state)
* - Notifies all tabs to remove the mod components
*/
-export async function uninstallMod(
+export async function deactivateMod(
modId: RegistryId,
modComponents: SerializedModComponent[],
dispatch: Dispatch,
@@ -60,9 +60,9 @@ export async function uninstallMod(
}
/**
- * Use this helper outside the Page Editor context to uninstall a collections of mod components.
+ * Use this helper outside the Page Editor context to deactivate a collections of mod components.
*/
-export async function uninstallModComponents(
+export async function deactivateModComponents(
modComponentIds: UUID[],
dispatch: Dispatch,
): Promise {
@@ -73,9 +73,6 @@ export async function uninstallModComponents(
removeModComponentsFromAllTabs(modComponentIds);
}
-/**
- * Uninstalls the extensions from all open tabs
- */
export function removeModComponentsFromAllTabs(modComponentIds: UUID[]): void {
for (const modComponentId of modComponentIds) {
removeModComponentForEveryTab(modComponentId);
diff --git a/src/store/sessionChanges/sessionChangesListenerMiddleware.ts b/src/store/sessionChanges/sessionChangesListenerMiddleware.ts
index c4964e0dd5..e4e64bb44e 100644
--- a/src/store/sessionChanges/sessionChangesListenerMiddleware.ts
+++ b/src/store/sessionChanges/sessionChangesListenerMiddleware.ts
@@ -28,7 +28,7 @@ sessionChangesListenerMiddleware.startListening({
actions.addNode,
actions.moveNode,
actions.removeNode,
- actions.resetInstalled,
+ actions.resetActivatedModComponentFormState,
actions.removeModComponentFormState,
actions.editModMetadata,
actions.editModOptionsDefinitions,
diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json
index 9b8575c400..9d8305d15f 100644
--- a/src/tsconfig.strictNullChecks.json
+++ b/src/tsconfig.strictNullChecks.json
@@ -27,7 +27,7 @@
"./__mocks__/@/icons/getSvgIcon.ts",
"./__mocks__/@/icons/list.ts",
"./__mocks__/@/sandbox/messenger/api.ts",
- "./__mocks__/@/store/uninstallUtils.ts",
+ "./__mocks__/@/store/deactivateUtils.ts",
"./__mocks__/@/telemetry/logging.ts",
"./__mocks__/@/telemetry/reportError.ts",
"./__mocks__/@/telemetry/reportEvent.ts",
@@ -1366,6 +1366,7 @@
"./store/checkAvailableDraftModComponents.test.ts",
"./store/checkAvailableInstalledExtensions.test.ts",
"./store/commonActions.ts",
+ "./store/deactivateUtils.ts",
"./store/defaultMiddlewareConfig.ts",
"./store/editorMigrations.test.ts",
"./store/editorMigrations.ts",
@@ -1414,7 +1415,6 @@
"./store/sidebar/thunks/removeTemporaryPanel.ts",
"./store/sidebar/thunks/resolveTemporaryPanel.ts",
"./store/sidebar/utils.ts",
- "./store/uninstallUtils.ts",
"./store/workshopSlice.ts",
"./telemetry/BackgroundLogger.ts",
"./telemetry/deployments.ts",