diff --git a/playwright/e2e/settings/security-user-settings-tab.spec.ts b/playwright/e2e/settings/security-user-settings-tab.spec.ts index 9a5616ef59..25bf1a9dbe 100644 --- a/playwright/e2e/settings/security-user-settings-tab.spec.ts +++ b/playwright/e2e/settings/security-user-settings-tab.spec.ts @@ -91,7 +91,7 @@ test.describe("Security user settings tab", () => { await expect(tab.getByText(`Identity server (identity.example.org)`, { exact: true })).toBeVisible(); }); - test("should enable show integrations as enabled", async ({ app, page, user }) => { + test("should show integrations as enabled", async ({ app, page, user }) => { const tab = await app.settings.openUserSettings("Security"); const setIntegrationManager = tab.locator(".mx_SetIntegrationManager"); @@ -102,7 +102,9 @@ test.describe("Security user settings tab", () => { }), ).toBeVisible(); // Make sure integration manager's toggle switch is enabled - await expect(setIntegrationManager.locator(".mx_ToggleSwitch_enabled")).toBeVisible(); + const toggleswitch = setIntegrationManager.getByLabel("Enable the integration manager"); + await expect(toggleswitch).toBeVisible(); + await expect(toggleswitch).toBeChecked(); await expect(setIntegrationManager.locator(".mx_SetIntegrationManager_heading_manager")).toHaveText( "Manage integrations(scalar.vector.im)", ); diff --git a/res/css/views/settings/_SetIntegrationManager.pcss b/res/css/views/settings/_SetIntegrationManager.pcss index a046ce0fff..f370d06e5e 100644 --- a/res/css/views/settings/_SetIntegrationManager.pcss +++ b/res/css/views/settings/_SetIntegrationManager.pcss @@ -7,19 +7,13 @@ Please see LICENSE files in the repository root for full details. */ .mx_SetIntegrationManager { - .mx_SettingsFlag { + .mx_SetIntegrationManager_heading_manager { + display: flex; align-items: center; - - .mx_SetIntegrationManager_heading_manager { - display: flex; - align-items: center; - flex-wrap: wrap; - column-gap: $spacing-4; - } - - .mx_ToggleSwitch { - align-self: flex-start; - min-width: var(--ToggleSwitch-min-width); /* avoid compression */ - } + flex-wrap: wrap; + column-gap: $spacing-4; + } + form { + margin-top: var(--cpd-space-3x); } } diff --git a/src/components/views/settings/SetIntegrationManager.tsx b/src/components/views/settings/SetIntegrationManager.tsx index 8721ddcd4b..98066bc0a4 100644 --- a/src/components/views/settings/SetIntegrationManager.tsx +++ b/src/components/views/settings/SetIntegrationManager.tsx @@ -9,13 +9,13 @@ Please see LICENSE files in the repository root for full details. import React from "react"; import { logger } from "matrix-js-sdk/src/logger"; import { type EmptyObject } from "matrix-js-sdk/src/matrix"; +import { Root, InlineField, Label, ToggleInput } from "@vector-im/compound-web"; import { _t } from "../../../languageHandler"; import { IntegrationManagers } from "../../../integrations/IntegrationManagers"; import { type IntegrationManagerInstance } from "../../../integrations/IntegrationManagerInstance"; import SettingsStore from "../../../settings/SettingsStore"; import { SettingLevel } from "../../../settings/SettingLevel"; -import ToggleSwitch from "../elements/ToggleSwitch"; import Heading from "../typography/Heading"; import { SettingsSubsectionText } from "./shared/SettingsSubsection"; import { UIFeature } from "../../../settings/UIFeature"; @@ -66,26 +66,33 @@ export default class SetIntegrationManager extends React.Component +
{_t("integration_manager|manage_title")} {managerName}
-
{bodyText} {_t("integration_manager|explainer")} - + + + } + > + + + +
); } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c3dd76a5a2..bd577e7418 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1306,6 +1306,7 @@ "error_connecting_heading": "Cannot connect to integration manager", "explainer": "Integration managers receive configuration data, and can modify widgets, send room invites, and set power levels on your behalf.", "manage_title": "Manage integrations", + "toggle_label": "Enable the integration manager", "use_im": "Use an integration manager to manage bots, widgets, and sticker packs.", "use_im_default": "Use an integration manager (%(serverName)s) to manage bots, widgets, and sticker packs." }, diff --git a/test/unit-tests/components/views/settings/__snapshots__/SetIntegrationManager-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/SetIntegrationManager-test.tsx.snap index 9dab61f8b2..025afc3c97 100644 --- a/test/unit-tests/components/views/settings/__snapshots__/SetIntegrationManager-test.tsx.snap +++ b/test/unit-tests/components/views/settings/__snapshots__/SetIntegrationManager-test.tsx.snap @@ -1,10 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SetIntegrationManager should render manage integrations sections 1`] = ` - +
+
+
+
+ +
+
+
+
+ +
+
+ +
`; diff --git a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap index 2a2cf63451..92a9a53276 100644 --- a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap +++ b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap @@ -8,10 +8,9 @@ exports[` renders security section 1`] = `
- +
+
+
+
+ +
+
+
+
+ +
+
+ +
@@ -445,7 +468,7 @@ exports[` renders security section 1`] = ` > @@ -454,7 +477,7 @@ exports[` renders security section 1`] = ` >