diff --git a/cypress/e2e/polls/polls.spec.ts b/cypress/e2e/polls/polls.spec.ts index 00b944ce9d9e..62bf632ceeb9 100644 --- a/cypress/e2e/polls/polls.spec.ts +++ b/cypress/e2e/polls/polls.spec.ts @@ -79,7 +79,6 @@ describe("Polls", () => { }; beforeEach(() => { - cy.enableLabsFeature("feature_thread"); cy.window().then(win => { win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests }); diff --git a/cypress/e2e/threads/threads.spec.ts b/cypress/e2e/threads/threads.spec.ts index 6aea5815e5c2..05550c3543d5 100644 --- a/cypress/e2e/threads/threads.spec.ts +++ b/cypress/e2e/threads/threads.spec.ts @@ -28,8 +28,6 @@ describe("Threads", () => { let synapse: SynapseInstance; beforeEach(() => { - // Default threads to ON for this spec - cy.enableLabsFeature("feature_thread"); cy.window().then(win => { win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests }); diff --git a/res/css/views/messages/_MessageActionBar.pcss b/res/css/views/messages/_MessageActionBar.pcss index 2b0e17fdb4f7..b07f600df407 100644 --- a/res/css/views/messages/_MessageActionBar.pcss +++ b/res/css/views/messages/_MessageActionBar.pcss @@ -114,14 +114,6 @@ limitations under the License. color: $primary-content; } - &.mx_MessageActionBar_threadButton { - - .mx_Indicator { - background: $links; - animation-iteration-count: infinite; - } - } - &.mx_MessageActionBar_favouriteButton_fillstar { color: var(--MessageActionBar-star-button-color); } diff --git a/res/img/betas/threads.png b/res/img/betas/threads.png deleted file mode 100644 index f34fb5f89584..000000000000 Binary files a/res/img/betas/threads.png and /dev/null differ diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index 85a76ee4e10d..e6c3b121e851 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -236,7 +236,7 @@ class MatrixClientPegClass implements IMatrixClientPeg { opts.pendingEventOrdering = PendingEventOrdering.Detached; opts.lazyLoadMembers = true; opts.clientWellKnownPollPeriod = 2 * 60 * 60; // 2 hours - opts.experimentalThreadSupport = SettingsStore.getValue("feature_thread"); + opts.experimentalThreadSupport = true; if (SettingsStore.getValue("feature_sliding_sync")) { const proxyUrl = SettingsStore.getValue("feature_sliding_sync_proxy_url"); diff --git a/src/Unread.ts b/src/Unread.ts index 60ef9ca19edb..047439f18905 100644 --- a/src/Unread.ts +++ b/src/Unread.ts @@ -66,7 +66,7 @@ export function doesRoomHaveUnreadMessages(room: Room): boolean { // despite the name of the method :(( const readUpToId = room.getEventReadUpTo(myUserId); - if (!SettingsStore.getValue("feature_thread")) { + if (!SettingsStore.getValue("feature_threadstable")) { // as we don't send RRs for our own messages, make sure we special case that // if *we* sent the last message into the room, we consider it not unread! // Should fix: https://github.com/vector-im/element-web/issues/3263 diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 1ef951df3f8a..8f56e06517e5 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -280,7 +280,7 @@ export default class MessagePanel extends React.Component { // and we check this in a hot code path. This is also cached in our // RoomContext, however we still need a fallback for roomless MessagePanels. this._showHiddenEvents = SettingsStore.getValue("showHiddenEventsInTimeline"); - this.threadsEnabled = SettingsStore.getValue("feature_thread"); + this.threadsEnabled = SettingsStore.getValue("feature_threadstable"); this.showTypingNotificationsWatcherRef = SettingsStore.watchSetting("showTypingNotifications", null, this.onShowTypingNotificationsChange); diff --git a/src/components/structures/RoomSearchView.tsx b/src/components/structures/RoomSearchView.tsx index 0617d0136a8a..9d579fc333dd 100644 --- a/src/components/structures/RoomSearchView.tsx +++ b/src/components/structures/RoomSearchView.tsx @@ -33,6 +33,7 @@ import ResizeNotifier from "../../utils/ResizeNotifier"; import MatrixClientContext from "../../contexts/MatrixClientContext"; import { RoomPermalinkCreator } from "../../utils/permalinks/Permalinks"; import RoomContext from "../../contexts/RoomContext"; +import SettingsStore from '../../settings/SettingsStore'; const DEBUG = false; let debuglog = function(msg: string) {}; @@ -100,7 +101,7 @@ export const RoomSearchView = forwardRef(({ return b.length - a.length; }); - if (client.supportsExperimentalThreads()) { + if (SettingsStore.getValue("feature_threadstable")) { // Process all thread roots returned in this batch of search results // XXX: This won't work for results coming from Seshat which won't include the bundled relationship for (const result of results.results) { @@ -109,12 +110,7 @@ export const RoomSearchView = forwardRef(({ .getServerAggregatedRelation(THREAD_RELATION_TYPE.name); if (!bundledRelationship || event.getThread()) continue; const room = client.getRoom(event.getRoomId()); - const thread = room.findThreadForEvent(event); - if (thread) { - event.setThread(thread); - } else { - room.createThread(event.getId(), event, [], true); - } + room.createThread(event.getId(), event, [], true); } } } diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 6214142da938..1461c9bfe779 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -1162,7 +1162,7 @@ export class RoomView extends React.Component { CHAT_EFFECTS.forEach(effect => { if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { // For initial threads launch, chat effects are disabled see #19731 - if (!SettingsStore.getValue("feature_thread") || !ev.isRelation(THREAD_RELATION_TYPE.name)) { + if (!SettingsStore.getValue("feature_threadstable") || !ev.isRelation(THREAD_RELATION_TYPE.name)) { dis.dispatch({ action: `effects.${effect.command}` }); } } diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx index 64e6ff629451..cdd21d240157 100644 --- a/src/components/structures/ThreadPanel.tsx +++ b/src/components/structures/ThreadPanel.tsx @@ -224,7 +224,7 @@ const ThreadPanel: React.FC = ({ const openFeedback = shouldShowFeedback() ? () => { Modal.createDialog(BetaFeedbackDialog, { - featureId: "feature_thread", + featureId: "feature_threadstable", }); } : null; diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index fc99d66a085f..a58250cda365 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -1638,7 +1638,7 @@ class TimelinePanel extends React.Component { is very tied to the main room timeline, we are forcing the timeline to send read receipts for threaded events */ const isThreadTimeline = this.context.timelineRenderingType === TimelineRenderingType.Thread; - if (SettingsStore.getValue("feature_thread") && isThreadTimeline) { + if (SettingsStore.getValue("feature_threadstable") && isThreadTimeline) { return 0; } const index = this.state.events.findIndex(ev => ev.getId() === evId); diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 60c91d7b0397..3c0f9554c557 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -76,11 +76,11 @@ const ReplyInThreadButton = ({ mxEvent, closeMenu }: IReplyInThreadButton) => { if (Boolean(relationType) && relationType !== RelationType.Thread) return null; const onClick = (): void => { - if (!localStorage.getItem("mx_seen_feature_thread")) { - localStorage.setItem("mx_seen_feature_thread", "true"); + if (!localStorage.getItem("mx_seen_feature_threadstable")) { + localStorage.setItem("mx_seen_feature_threadstable", "true"); } - if (!SettingsStore.getValue("feature_thread")) { + if (!SettingsStore.getValue("feature_threadstable")) { dis.dispatch({ action: Action.ViewUserSettings, initialTabId: UserTab.Labs, @@ -647,7 +647,7 @@ export default class MessageContextMenu extends React.Component rightClick && contentActionable && canSendMessages && - SettingsStore.getValue("feature_thread") && + SettingsStore.getValue("feature_threadstable") && Thread.hasServerSideSupport && timelineRenderingType !== TimelineRenderingType.Thread ) { diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index a6d9e2f13a82..a09051ed5064 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -56,7 +56,6 @@ import { Key } from "../../../Keyboard"; import { ALTERNATE_KEY_NAME } from "../../../accessibility/KeyboardShortcuts"; import { UserTab } from '../dialogs/UserTab'; import { Action } from '../../../dispatcher/actions'; -import SdkConfig from "../../../SdkConfig"; import { ShowThreadPayload } from "../../../dispatcher/payloads/ShowThreadPayload"; import useFavouriteMessages from '../../../hooks/useFavouriteMessages'; import { GetRelationsForEvent } from '../rooms/EventTile'; @@ -190,8 +189,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => { const relationType = mxEvent?.getRelation()?.rel_type; const hasARelation = !!relationType && relationType !== RelationType.Thread; - const firstTimeSeeingThreads = !localStorage.getItem("mx_seen_feature_thread"); - const threadsEnabled = SettingsStore.getValue("feature_thread"); + const threadsEnabled = SettingsStore.getValue("feature_threadstable"); if (!threadsEnabled && !Thread.hasServerSideSupport) { // hide the prompt if the user would only have degraded mode @@ -203,11 +201,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => { e.preventDefault(); e.stopPropagation(); - if (firstTimeSeeingThreads) { - localStorage.setItem("mx_seen_feature_thread", "true"); - } - - if (!SettingsStore.getValue("feature_thread")) { + if (!SettingsStore.getValue("feature_threadstable")) { dis.dispatch({ action: Action.ViewUserSettings, initialTabId: UserTab.Labs, @@ -241,7 +235,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => { { !hasARelation && (
- { SettingsStore.getValue("feature_thread") + { SettingsStore.getValue("feature_threadstable") ? _t("Beta feature") : _t("Beta feature. Click to learn more.") } @@ -257,9 +251,6 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => { onContextMenu={onClick} > - { firstTimeSeeingThreads && !threadsEnabled && ( -
- ) } ; }; @@ -375,20 +366,6 @@ export default class MessageActionBar extends React.PureComponent); } - } else if (SettingsStore.getValue("feature_thread") && + } else if (SettingsStore.getValue("feature_threadstable") && // Show thread icon even for deleted messages, but only within main timeline this.context.timelineRenderingType === TimelineRenderingType.Room && this.props.mxEvent.getThread() diff --git a/src/components/views/right_panel/RoomHeaderButtons.tsx b/src/components/views/right_panel/RoomHeaderButtons.tsx index 0ba64c2f5e61..4191e979e6a7 100644 --- a/src/components/views/right_panel/RoomHeaderButtons.tsx +++ b/src/components/views/right_panel/RoomHeaderButtons.tsx @@ -292,7 +292,7 @@ export default class RoomHeaderButtons extends HeaderButtons { onClick={this.onTimelineCardClicked} />, ); rightPanelPhaseButtons.set(RightPanelPhases.ThreadPanel, - SettingsStore.getValue("feature_thread") + SettingsStore.getValue("feature_threadstable") ? } } - if (SettingsStore.getValue("feature_thread")) { + if (SettingsStore.getValue("feature_threadstable")) { this.props.mxEvent.on(ThreadEvent.Update, this.updateThread); if (this.thread && !this.supportsThreadNotifications) { @@ -473,7 +473,7 @@ export class UnwrappedEventTile extends React.Component if (this.props.showReactions) { this.props.mxEvent.removeListener(MatrixEventEvent.RelationsCreated, this.onReactionsCreated); } - if (SettingsStore.getValue("feature_thread")) { + if (SettingsStore.getValue("feature_threadstable")) { this.props.mxEvent.off(ThreadEvent.Update, this.updateThread); } this.threadState?.off(NotificationStateEvents.Update, this.onThreadStateUpdate); @@ -500,22 +500,11 @@ export class UnwrappedEventTile extends React.Component }; private get thread(): Thread | null { - if (!SettingsStore.getValue("feature_thread")) { + if (!SettingsStore.getValue("feature_threadstable")) { return null; } - let thread = this.props.mxEvent.getThread(); - /** - * Accessing the threads value through the room due to a race condition - * that will be solved when there are proper backend support for threads - * We currently have no reliable way to discover than an event is a thread - * when we are at the sync stage - */ - if (!thread) { - const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); - thread = room?.findThreadForEvent(this.props.mxEvent); - } - return thread ?? null; + return this.props.mxEvent.getThread() ?? null; } private renderThreadPanelSummary(): JSX.Element | null { diff --git a/src/components/views/rooms/SearchResultTile.tsx b/src/components/views/rooms/SearchResultTile.tsx index 5984412b91fb..300838ebc96e 100644 --- a/src/components/views/rooms/SearchResultTile.tsx +++ b/src/components/views/rooms/SearchResultTile.tsx @@ -67,7 +67,7 @@ export default class SearchResultTile extends React.Component { const layout = SettingsStore.getValue("layout"); const isTwelveHour = SettingsStore.getValue("showTwelveHourTimestamps"); const alwaysShowTimestamps = SettingsStore.getValue("alwaysShowTimestamps"); - const threadsEnabled = SettingsStore.getValue("feature_thread"); + const threadsEnabled = SettingsStore.getValue("feature_threadstable"); const timeline = result.context.getTimeline(); for (let j = 0; j < timeline.length; j++) { diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index a9e1eaa6cef6..477fffd49df2 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -432,7 +432,7 @@ export class SendMessageComposer extends React.ComponentLearn more.": "Threads help keep conversations on-topic and easy to track. Learn more.", - "How can I start a thread?": "How can I start a thread?", - "Use “%(replyInThread)s” when hovering over a message.": "Use “%(replyInThread)s” when hovering over a message.", - "Reply in thread": "Reply in thread", - "How can I leave the beta?": "How can I leave the beta?", - "To leave, return to this page and use the “%(leaveTheBeta)s” button.": "To leave, return to this page and use the “%(leaveTheBeta)s” button.", - "Leave the beta": "Leave the beta", + "Threaded messages": "Threaded messages", "Rich text editor": "Rich text editor", "Use rich text instead of Markdown in the message composer. Plain text mode coming soon.": "Use rich text instead of Markdown in the message composer. Plain text mode coming soon.", "Render simple counters in room header": "Render simple counters in room header", @@ -2320,6 +2312,7 @@ "Error processing audio message": "Error processing audio message", "View live location": "View live location", "React": "React", + "Reply in thread": "Reply in thread", "Can't create a thread from an event with an existing relation": "Can't create a thread from an event with an existing relation", "Beta feature": "Beta feature", "Beta feature. Click to learn more.": "Beta feature. Click to learn more.", @@ -3196,6 +3189,7 @@ "Beta": "Beta", "Leaving the beta will reload %(brand)s.": "Leaving the beta will reload %(brand)s.", "Joining the beta will reload %(brand)s.": "Joining the beta will reload %(brand)s.", + "Leave the beta": "Leave the beta", "Join the beta": "Join the beta", "Updated %(humanizedUpdateTime)s": "Updated %(humanizedUpdateTime)s", "Live until %(expiryTime)s": "Live until %(expiryTime)s", diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 110a520f8497..0671ee219db7 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -270,45 +270,13 @@ export const SETTINGS: {[setting: string]: ISetting} = { supportedLevels: LEVELS_FEATURE, default: false, }, - "feature_thread": { + "feature_threadstable": { isFeature: true, labsGroup: LabGroup.Messaging, controller: new ThreadBetaController(), - displayName: _td("Threaded messaging"), + displayName: _td("Threaded messages"), supportedLevels: LEVELS_FEATURE, - default: false, - betaInfo: { - title: _td("Threads"), - caption: () => <> -

{ _t("Keep discussions organised with threads.") }

-

{ _t("Threads help keep conversations on-topic and easy to track. Learn more.", {}, { - a: (sub) => - { sub } - , - }) }

- , - faq: () => - SdkConfig.get().bug_report_endpoint_url && <> -

{ _t("How can I start a thread?") }

-

- { _t("Use “%(replyInThread)s” when hovering over a message.", { - replyInThread: _t("Reply in thread"), - }) } -

-

{ _t("How can I leave the beta?") }

-

- { _t("To leave, return to this page and use the “%(leaveTheBeta)s” button.", { - leaveTheBeta: _t("Leave the beta"), - }) } -

- , - feedbackLabel: "thread-feedback", - feedbackSubheading: _td("Thank you for trying the beta, " + - "please go into as much detail as you can so we can improve it."), - image: require("../../res/img/betas/threads.png"), - requiresRefresh: true, - }, - + default: true, }, "feature_wysiwyg_composer": { isFeature: true, diff --git a/src/stores/TypingStore.ts b/src/stores/TypingStore.ts index be17da6e4e6d..90e9f4f33023 100644 --- a/src/stores/TypingStore.ts +++ b/src/stores/TypingStore.ts @@ -65,7 +65,7 @@ export default class TypingStore { if (SettingsStore.getValue('lowBandwidth')) return; // Disable typing notification for threads for the initial launch // before we figure out a better user experience for them - if (SettingsStore.getValue("feature_thread") && threadId) return; + if (SettingsStore.getValue("feature_threadstable") && threadId) return; let currentTyping = this.typingStates[roomId]; if ((!isTyping && !currentTyping) || (currentTyping && currentTyping.isTyping === isTyping)) { diff --git a/src/stores/right-panel/RightPanelStore.ts b/src/stores/right-panel/RightPanelStore.ts index 9aa4c1b27c8f..bc7f2283bcbb 100644 --- a/src/stores/right-panel/RightPanelStore.ts +++ b/src/stores/right-panel/RightPanelStore.ts @@ -281,10 +281,10 @@ export default class RightPanelStore extends ReadyWatchingStore { // (A nicer fix could be to indicate, that the right panel is loading if there is missing state data and re-emit if the data is available) switch (card.phase) { case RightPanelPhases.ThreadPanel: - if (!SettingsStore.getValue("feature_thread")) return false; + if (!SettingsStore.getValue("feature_threadstable")) return false; break; case RightPanelPhases.ThreadView: - if (!SettingsStore.getValue("feature_thread")) return false; + if (!SettingsStore.getValue("feature_threadstable")) return false; if (!card.state.threadHeadEvent) { logger.warn("removed card from right panel because of missing threadHeadEvent in card state"); } diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 163c14f82f8c..bbe0b4682879 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -234,7 +234,7 @@ export class StopGapWidgetDriver extends WidgetDriver { // For initial threads launch, chat effects are disabled // see #19731 const isNotThread = content["m.relates_to"].rel_type !== THREAD_RELATION_TYPE.name; - if (!SettingsStore.getValue("feature_thread") || isNotThread) { + if (!SettingsStore.getValue("feature_threadstable") || isNotThread) { dis.dispatch({ action: `effects.${effect.command}` }); } } diff --git a/src/utils/Reply.ts b/src/utils/Reply.ts index 145753e04152..90a5fad6d092 100644 --- a/src/utils/Reply.ts +++ b/src/utils/Reply.ts @@ -171,7 +171,7 @@ export function makeReplyMixIn(ev?: MatrixEvent): IEventRelation { }; if (ev.threadRootId) { - if (SettingsStore.getValue("feature_thread")) { + if (SettingsStore.getValue("feature_threadstable")) { mixin.is_falling_back = false; } else { // Clients that do not offer a threading UI should behave as follows when replying, for best interaction @@ -197,7 +197,7 @@ export function shouldDisplayReply(event: MatrixEvent): boolean { } const relation = event.getRelation(); - if (SettingsStore.getValue("feature_thread") && + if (SettingsStore.getValue("feature_threadstable") && relation?.rel_type === THREAD_RELATION_TYPE.name && relation?.is_falling_back ) { diff --git a/src/utils/exportUtils/HtmlExport.tsx b/src/utils/exportUtils/HtmlExport.tsx index dcc7994ace65..487f7c66913f 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -62,7 +62,7 @@ export default class HTMLExporter extends Exporter { this.mediaOmitText = !this.exportOptions.attachmentsIncluded ? _t("Media omitted") : _t("Media omitted - file size limit exceeded"); - this.threadsEnabled = SettingsStore.getValue("feature_thread"); + this.threadsEnabled = SettingsStore.getValue("feature_threadstable"); } protected async getRoomAvatar() { diff --git a/test/components/structures/TimelinePanel-test.tsx b/test/components/structures/TimelinePanel-test.tsx index 389975681848..ea7ddbadd6c7 100644 --- a/test/components/structures/TimelinePanel-test.tsx +++ b/test/components/structures/TimelinePanel-test.tsx @@ -164,12 +164,13 @@ describe('TimelinePanel', () => { expect(readMarkersSent).toEqual(["ev1"]); }); - it("sends public read receipt when enabled", () => { + it.only("sends public read receipt when enabled", async () => { const [client, room, events] = setupTestData(); const getValueCopy = SettingsStore.getValue; SettingsStore.getValue = jest.fn().mockImplementation((name: string) => { if (name === "sendReadReceipts") return true; + if (name === "feature_threadstable") return false; return getValueCopy(name); }); @@ -183,6 +184,7 @@ describe('TimelinePanel', () => { const getValueCopy = SettingsStore.getValue; SettingsStore.getValue = jest.fn().mockImplementation((name: string) => { if (name === "sendReadReceipts") return false; + if (name === "feature_threadstable") return false; return getValueCopy(name); }); @@ -363,7 +365,7 @@ describe('TimelinePanel', () => { client.supportsExperimentalThreads = () => true; const getValueCopy = SettingsStore.getValue; SettingsStore.getValue = jest.fn().mockImplementation((name: string) => { - if (name === "feature_thread") return true; + if (name === "feature_threadstable") return true; return getValueCopy(name); }); diff --git a/test/components/views/messages/MessageActionBar-test.tsx b/test/components/views/messages/MessageActionBar-test.tsx index 670d39ec64c8..387c46834f04 100644 --- a/test/components/views/messages/MessageActionBar-test.tsx +++ b/test/components/views/messages/MessageActionBar-test.tsx @@ -392,6 +392,10 @@ describe('', () => { }); describe('when threads feature is not enabled', () => { + beforeEach(() => { + jest.spyOn(SettingsStore, 'getValue').mockImplementation(setting => setting !== 'feature_threadstable'); + }); + it('does not render thread button when threads does not have server support', () => { jest.spyOn(SettingsStore, 'getValue').mockReturnValue(false); Thread.setServerSideSupport(FeatureSupport.None); @@ -422,7 +426,7 @@ describe('', () => { describe('when threads feature is enabled', () => { beforeEach(() => { - jest.spyOn(SettingsStore, 'getValue').mockImplementation(setting => setting === 'feature_thread'); + jest.spyOn(SettingsStore, 'getValue').mockImplementation(setting => setting === 'feature_threadstable'); }); it('renders thread button on own actionable event', () => { diff --git a/test/components/views/right_panel/RoomHeaderButtons-test.tsx b/test/components/views/right_panel/RoomHeaderButtons-test.tsx index 4d8537fdba20..f76ca2065bb2 100644 --- a/test/components/views/right_panel/RoomHeaderButtons-test.tsx +++ b/test/components/views/right_panel/RoomHeaderButtons-test.tsx @@ -40,7 +40,7 @@ describe("RoomHeaderButtons-test.tsx", function() { }); jest.spyOn(SettingsStore, "getValue").mockImplementation((name: string) => { - if (name === "feature_thread") return true; + if (name === "feature_threadstable") return true; }); }); diff --git a/test/components/views/rooms/EventTile-test.tsx b/test/components/views/rooms/EventTile-test.tsx index dd0cda23b4ce..b59b5afe3b88 100644 --- a/test/components/views/rooms/EventTile-test.tsx +++ b/test/components/views/rooms/EventTile-test.tsx @@ -75,7 +75,7 @@ describe("EventTile", () => { jest.spyOn(client, "getRoom").mockReturnValue(room); jest.spyOn(client, "decryptEventIfNeeded").mockResolvedValue(); - jest.spyOn(SettingsStore, "getValue").mockImplementation(name => name === "feature_thread"); + jest.spyOn(SettingsStore, "getValue").mockImplementation(name => name === "feature_threadstable"); mxEvent = mkMessage({ room: room.roomId, diff --git a/test/components/views/settings/tabs/user/__snapshots__/LabsUserSettingsTab-test.tsx.snap b/test/components/views/settings/tabs/user/__snapshots__/LabsUserSettingsTab-test.tsx.snap index b2ff84a8233c..8644f121046a 100644 --- a/test/components/views/settings/tabs/user/__snapshots__/LabsUserSettingsTab-test.tsx.snap +++ b/test/components/views/settings/tabs/user/__snapshots__/LabsUserSettingsTab-test.tsx.snap @@ -67,78 +67,6 @@ exports[` renders settings marked as beta as beta car
-
-
-
-

- - Threads - - - Beta - -

-
-

- Keep discussions organised with threads. -

-

- - Threads help keep conversations on-topic and easy to track. - - Learn more - - . - -

-
-
-
- Join the beta -
-
-
- Joining the beta will reload . -
-
-
-
- -
-
-
diff --git a/test/stores/TypingStore-test.ts b/test/stores/TypingStore-test.ts index b6b5c388f843..d7289a115973 100644 --- a/test/stores/TypingStore-test.ts +++ b/test/stores/TypingStore-test.ts @@ -33,7 +33,7 @@ describe("TypingStore", () => { let mockClient: MatrixClient; const settings = { "sendTypingNotifications": true, - "feature_thread": false, + "feature_threadstable": false, }; const roomId = "!test:example.com"; const localRoomId = LOCAL_ROOM_ID_PREFIX + "test";