Remove feedback buttons from onboarding, search, and spaces (#10506)
This commit is contained in:
parent
df89d2ce28
commit
09eefe14ea
15 changed files with 4 additions and 305 deletions
|
@ -41,14 +41,9 @@ import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
|
|||
import Field from "../elements/Field";
|
||||
import withValidation from "../elements/Validation";
|
||||
import RoomAliasField from "../elements/RoomAliasField";
|
||||
import Modal from "../../../Modal";
|
||||
import GenericFeatureFeedbackDialog from "../dialogs/GenericFeatureFeedbackDialog";
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
import { getKeyBindingsManager } from "../../../KeyBindingsManager";
|
||||
import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts";
|
||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||
import { shouldShowFeedback } from "../../../utils/Feedback";
|
||||
|
||||
export const createSpace = async (
|
||||
name: string,
|
||||
isPublic: boolean,
|
||||
|
@ -118,40 +113,6 @@ const nameToLocalpart = (name: string): string => {
|
|||
.replace(/[^a-z0-9_-]+/gi, "");
|
||||
};
|
||||
|
||||
// XXX: Temporary for the Spaces release only
|
||||
export const SpaceFeedbackPrompt: React.FC<{
|
||||
onClick?(): void;
|
||||
}> = ({ onClick }) => {
|
||||
if (!shouldShowFeedback()) return null;
|
||||
|
||||
return (
|
||||
<div className="mx_SpaceFeedbackPrompt">
|
||||
<span className="mx_SpaceFeedbackPrompt_text">{_t("Spaces are a new feature.")}</span>
|
||||
<AccessibleButton
|
||||
kind="link_inline"
|
||||
onClick={() => {
|
||||
if (onClick) onClick();
|
||||
Modal.createDialog(GenericFeatureFeedbackDialog, {
|
||||
title: _t("Spaces feedback"),
|
||||
subheading: _t(
|
||||
"Thank you for trying Spaces. " + "Your feedback will help inform the next versions.",
|
||||
),
|
||||
rageshakeLabel: "spaces-feedback",
|
||||
rageshakeData: Object.fromEntries(
|
||||
["Spaces.allRoomsInHome", "Spaces.enabledMetaSpaces"].map((k) => [
|
||||
k,
|
||||
SettingsStore.getValue(k),
|
||||
]),
|
||||
),
|
||||
});
|
||||
}}
|
||||
>
|
||||
{_t("Give feedback.")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
type BProps = Omit<ComponentProps<typeof SpaceBasicSettings>, "nameDisabled" | "topicDisabled" | "avatarDisabled">;
|
||||
interface ISpaceCreateFormProps extends BProps {
|
||||
busy: boolean;
|
||||
|
@ -316,8 +277,6 @@ const SpaceCreateMenu: React.FC<{
|
|||
/>
|
||||
|
||||
<p>{_t("To join a space you'll need an invite.")}</p>
|
||||
|
||||
<SpaceFeedbackPrompt onClick={onFinished} />
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue