Take the Threads Activity Centre out of labs (#12439)

* Take the TAC out of labs!

Requires https://github.com/matrix-org/matrix-react-sdk/pull/12438
and ideally https://github.com/matrix-org/matrix-react-sdk/pull/12418

* i18n

* Add test method

That's needed now we we don't include threads in the notif count in the tests

* One less labs setting

* Update snapshot

* Disable release announcement

* Unused import

* Fix some screenshots

* Fix all the unread test cases now room unreads don't include threads

* Fix more tests

* Even more test fixes

* Still more test fixes

* Oh goodness, it's more test fixes

* Fix selectors now there are 2 buttons called Threads

* Disable some tests that aren't passing

for reasons that don't appear releated to any of the TAC work, as
per the comment.

* Remove debugging

* Oops, removed too much
This commit is contained in:
David Baker 2024-04-29 16:30:19 +01:00 committed by GitHub
parent 02e7fb340e
commit 281916fd96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 341 additions and 200 deletions

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import { NotificationCountType, Room, Thread, ReceiptType } from "matrix-js-sdk/src/matrix";
import React, { useContext, useMemo } from "react";
import React, { useContext } from "react";
import { ReadReceipt } from "matrix-js-sdk/src/models/read-receipt";
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
@ -25,7 +25,6 @@ import { determineUnreadState } from "../../../../RoomNotifs";
import { humanReadableNotificationLevel } from "../../../../stores/notifications/NotificationLevel";
import { doesRoomOrThreadHaveUnreadMessages } from "../../../../Unread";
import BaseTool, { DevtoolsContext, IDevtoolsProps } from "./BaseTool";
import SettingsStore from "../../../../settings/SettingsStore";
function UserReadUpTo({ target }: { target: ReadReceipt<any, any> }): JSX.Element {
const cli = useContext(MatrixClientContext);
@ -66,12 +65,10 @@ function UserReadUpTo({ target }: { target: ReadReceipt<any, any> }): JSX.Elemen
}
export default function RoomNotifications({ onBack }: IDevtoolsProps): JSX.Element {
const tacEnabled = useMemo(() => SettingsStore.getValue("threadsActivityCentre"), []);
const { room } = useContext(DevtoolsContext);
const cli = useContext(MatrixClientContext);
const { level, count } = determineUnreadState(room, undefined, !tacEnabled);
const { level, count } = determineUnreadState(room, undefined, false);
const [notificationState] = useNotificationState(room);
return (

View file

@ -368,8 +368,6 @@ const SpacePanel: React.FC = () => {
}
});
const isThreadsActivityCentreEnabled = useSettingValue<boolean>("threadsActivityCentre");
return (
<RovingTabIndexProvider handleHomeEnd handleUpDown={!dragging}>
{({ onKeyDownHandler, onDragEndHandler }) => (
@ -426,9 +424,8 @@ const SpacePanel: React.FC = () => {
)}
</Droppable>
{isThreadsActivityCentreEnabled && (
<ThreadsActivityCentre displayButtonLabel={!isPanelCollapsed} />
)}
<ThreadsActivityCentre displayButtonLabel={!isPanelCollapsed} />
<QuickSettingsButton isPanelCollapsed={isPanelCollapsed} />
</nav>
</DragDropContext>