{filter !== null && (
-
+
+ {filterToIcon(filter)}
{filterToLabel(filter)}
= ({ initialText = "", initialFilter = n
})}
className="mx_SpotlightDialog_filter--close"
onClick={() => setFilter(null)}
- />
+ >
+
+
)}
{
rightButton = (
);
} else {
- rightButton =
;
+ rightButton = (
+
+
+
+ );
}
return (
diff --git a/src/components/views/right_panel/ExtensionsCard.tsx b/src/components/views/right_panel/ExtensionsCard.tsx
index 448917290a..5fb5a033ec 100644
--- a/src/components/views/right_panel/ExtensionsCard.tsx
+++ b/src/components/views/right_panel/ExtensionsCard.tsx
@@ -10,8 +10,12 @@ import React, { type JSX, useEffect, useMemo, useState } from "react";
import { type Room } from "matrix-js-sdk/src/matrix";
import classNames from "classnames";
import { Button, Link, Separator, Text } from "@vector-im/compound-web";
-import PlusIcon from "@vector-im/compound-design-tokens/assets/web/icons/plus";
-import ExtensionsIcon from "@vector-im/compound-design-tokens/assets/web/icons/extensions";
+import {
+ PlusIcon,
+ ExtensionsIcon,
+ OverflowHorizontalIcon,
+ PinSolidIcon,
+} from "@vector-im/compound-design-tokens/assets/web/icons";
import BaseCard from "./BaseCard";
import WidgetUtils, { useWidgets } from "../../../utils/WidgetUtils";
@@ -124,7 +128,9 @@ const AppRow: React.FC
= ({ app, room }) => {
isExpanded={menuDisplayed}
onClick={openMenu}
title={_t("common|options")}
- />
+ >
+
+
)}
= ({ app, room }) => {
onClick={togglePin}
title={pinTitle}
disabled={cannotPin}
- />
+ >
+
+
{contextMenu}
diff --git a/test/unit-tests/components/views/dialogs/SpotlightDialog-test.tsx b/test/unit-tests/components/views/dialogs/SpotlightDialog-test.tsx
index 2cf9511686..1cbb5b3e03 100644
--- a/test/unit-tests/components/views/dialogs/SpotlightDialog-test.tsx
+++ b/test/unit-tests/components/views/dialogs/SpotlightDialog-test.tsx
@@ -33,6 +33,8 @@ import { SettingLevel } from "../../../../../src/settings/SettingLevel";
import defaultDispatcher from "../../../../../src/dispatcher/dispatcher";
import SdkConfig from "../../../../../src/SdkConfig";
import { Action } from "../../../../../src/dispatcher/actions";
+import { MetaSpace } from "../../../../../src/stores/spaces";
+import SpaceStore from "../../../../../src/stores/spaces/SpaceStore.ts";
jest.useFakeTimers();
@@ -699,4 +701,29 @@ describe("Spotlight Dialog", () => {
expect(keyboardPrompt?.textContent).not.toContain("→");
});
});
+
+ describe("metaspaces", () => {
+ beforeEach(() => {
+ jest.spyOn(SpaceStore.instance, "enabledMetaSpaces", "get").mockReturnValue([
+ MetaSpace.Home,
+ MetaSpace.Favourites,
+ MetaSpace.People,
+ MetaSpace.Orphans,
+ ]);
+ });
+
+ it.each([MetaSpace.Home, MetaSpace.Favourites, MetaSpace.People])(
+ "should show metaspace %s",
+ async (metaSpace) => {
+ const onFinished = jest.fn();
+ const { asFragment, container } = render(
+
,
+ );
+ await waitFor(() =>
+ expect(container.querySelector(".mx_SpotlightDialog_metaspaceResult")).toBeInTheDocument(),
+ );
+ expect(asFragment()).toMatchSnapshot();
+ },
+ );
+ });
});
diff --git a/test/unit-tests/components/views/dialogs/__snapshots__/SpotlightDialog-test.tsx.snap b/test/unit-tests/components/views/dialogs/__snapshots__/SpotlightDialog-test.tsx.snap
new file mode 100644
index 0000000000..c66af206da
--- /dev/null
+++ b/test/unit-tests/components/views/dialogs/__snapshots__/SpotlightDialog-test.tsx.snap
@@ -0,0 +1,759 @@
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
+
+exports[`Spotlight Dialog metaspaces should show metaspace favourites-space 1`] = `
+
+
+
+ Use
+
+ ↓
+
+
+ ↑
+
+ to scroll
+
+
+
+
+
+
+
+
+
+
+
+ Spaces you're in
+
+
+
+
+ Favourites
+
+
+ ↵
+
+
+
+
+
+
+
+ Use "favourites" to search
+
+
+
+
+ Public spaces
+
+
+ ↵
+
+
+
+
+
+ Public rooms
+
+
+ ↵
+
+
+
+
+
+ People
+
+
+ ↵
+
+
+
+
+
+ Messages
+
+
+ ↵
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`Spotlight Dialog metaspaces should show metaspace home-space 1`] = `
+
+
+
+ Use
+
+ ↓
+
+
+ ↑
+
+ to scroll
+
+
+
+
+
+
+
+
+
+
+
+ Spaces you're in
+
+
+
+
+ Home
+
+
+ ↵
+
+
+
+
+
+
+
+ Use "home" to search
+
+
+
+
+ Public spaces
+
+
+ ↵
+
+
+
+
+
+ Public rooms
+
+
+ ↵
+
+
+
+
+
+ People
+
+
+ ↵
+
+
+
+
+
+ Messages
+
+
+ ↵
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`Spotlight Dialog metaspaces should show metaspace people-space 1`] = `
+
+
+
+ Use
+
+ ↓
+
+
+ ↑
+
+ to scroll
+
+
+
+
+
+
+
+
+
+
+
+ Spaces you're in
+
+
+
+
+ People
+
+
+ ↵
+
+
+
+
+
+
+
+ Use "people" to search
+
+
+
+
+ Public spaces
+
+
+ ↵
+
+
+
+
+
+ Public rooms
+
+
+ ↵
+
+
+
+
+
+ People
+
+
+ ↵
+
+
+
+
+
+ Messages
+
+
+ ↵
+
+
+
+
+
+
+
+
+
+`;
diff --git a/test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap b/test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap
index 465b62ae19..502bde6446 100644
--- a/test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap
+++ b/test/unit-tests/components/views/right_panel/__snapshots__/ExtensionsCard-test.tsx.snap
@@ -216,7 +216,19 @@ exports[`
should render widgets 1`] = `
class="mx_AccessibleButton mx_ExtensionsCard_app_pinToggle"
role="button"
tabindex="0"
- />
+ >
+
+