🧵 Enable threads by default (#9736)

* Delabs threads

* remove threads reload when labs is toggled

* Fix ts strict

* fix rebase mistake

* remove .only

* fix pr comments

* re-introduce backwards compat

* Fix export test

* Fix SearchREsultTile test

* strict ts
This commit is contained in:
Germain 2022-12-13 15:09:15 +00:00 committed by GitHub
parent 9668a24ca7
commit 2d2755d145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 88 additions and 170 deletions

View file

@ -287,7 +287,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {
// 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",

View file

@ -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) {};
@ -98,7 +99,7 @@ export const RoomSearchView = forwardRef<ScrollPanel, Props>(
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) {

View file

@ -1177,7 +1177,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
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}` });
}
}

View file

@ -249,7 +249,7 @@ const ThreadPanel: React.FC<IProps> = ({ roomId, onClose, permalinkCreator }) =>
const openFeedback = shouldShowFeedback()
? () => {
Modal.createDialog(BetaFeedbackDialog, {
featureId: "feature_thread",
featureId: "feature_threadstable",
});
}
: null;

View file

@ -1683,7 +1683,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
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);