Move New Search Experience out of beta (#8859)
This commit is contained in:
parent
e1d6356927
commit
8b841951db
11 changed files with 18 additions and 386 deletions
|
@ -93,7 +93,6 @@ import SecurityCustomisations from "../../customisations/Security";
|
|||
import Spinner from "../views/elements/Spinner";
|
||||
import QuestionDialog from "../views/dialogs/QuestionDialog";
|
||||
import UserSettingsDialog from '../views/dialogs/UserSettingsDialog';
|
||||
import { UserTab } from "../views/dialogs/UserTab";
|
||||
import CreateRoomDialog from '../views/dialogs/CreateRoomDialog';
|
||||
import RoomDirectory from './RoomDirectory';
|
||||
import KeySignatureUploadFailedDialog from "../views/dialogs/KeySignatureUploadFailedDialog";
|
||||
|
@ -118,7 +117,6 @@ import { showSpaceInvite } from "../../utils/space";
|
|||
import AccessibleButton from "../views/elements/AccessibleButton";
|
||||
import { ActionPayload } from "../../dispatcher/payloads";
|
||||
import { SummarizedNotificationState } from "../../stores/notifications/SummarizedNotificationState";
|
||||
import GenericToast from '../views/toasts/GenericToast';
|
||||
import Views from '../../Views';
|
||||
import { ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload";
|
||||
import { ViewHomePagePayload } from '../../dispatcher/payloads/ViewHomePagePayload';
|
||||
|
@ -738,9 +736,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
this.state.resizeNotifier.notifyLeftHandleResized();
|
||||
});
|
||||
break;
|
||||
case 'focus_room_filter': // for CtrlOrCmd+K to work by expanding the left panel first
|
||||
if (SettingsStore.getValue("feature_spotlight")) break; // don't expand if spotlight enabled
|
||||
// fallthrough
|
||||
case 'show_left_panel':
|
||||
this.setState({
|
||||
collapseLhs: false,
|
||||
|
@ -1398,42 +1393,6 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
showNotificationsToast(false);
|
||||
}
|
||||
|
||||
if (!localStorage.getItem("mx_seen_feature_spotlight_toast")) {
|
||||
setTimeout(() => {
|
||||
// Skip the toast if the beta is already enabled or the user has changed the setting from default
|
||||
if (SettingsStore.getValue("feature_spotlight") ||
|
||||
SettingsStore.getValue("feature_spotlight", null, true) !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const key = "BETA_SPOTLIGHT_TOAST";
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key,
|
||||
title: _t("New search beta available"),
|
||||
props: {
|
||||
description: _t("We're testing a new search to make finding what you want quicker.\n"),
|
||||
acceptLabel: _t("Learn more"),
|
||||
onAccept: () => {
|
||||
dis.dispatch({
|
||||
action: Action.ViewUserSettings,
|
||||
initialTabId: UserTab.Labs,
|
||||
});
|
||||
localStorage.setItem("mx_seen_feature_spotlight_toast", "true");
|
||||
ToastStore.sharedInstance().dismissToast(key);
|
||||
},
|
||||
rejectLabel: _t("Dismiss"),
|
||||
onReject: () => {
|
||||
localStorage.setItem("mx_seen_feature_spotlight_toast", "true");
|
||||
ToastStore.sharedInstance().dismissToast(key);
|
||||
},
|
||||
},
|
||||
icon: "labs",
|
||||
component: GenericToast,
|
||||
priority: 9,
|
||||
});
|
||||
}, 5 * 60 * 1000); // show after 5 minutes to not overload user with toasts on launch
|
||||
}
|
||||
|
||||
dis.fire(Action.FocusSendMessageComposer);
|
||||
this.setState({
|
||||
ready: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue