Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 77cf5bf

Browse files
committed
Update space create menu copy and add link to community migrator
1 parent 195b871 commit 77cf5bf

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

res/css/views/spaces/_SpaceCreateMenu.scss

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ $spacePanelWidth: 71px;
4141
> p {
4242
font-size: $font-15px;
4343
color: $secondary-fg-color;
44-
margin: 0;
4544
}
4645

4746
.mx_SpaceFeedbackPrompt {
@@ -51,13 +50,6 @@ $spacePanelWidth: 71px;
5150
}
5251
}
5352

54-
// XXX remove this when spaces leaves Beta
55-
.mx_BetaCard_betaPill {
56-
position: absolute;
57-
top: 24px;
58-
right: 24px;
59-
}
60-
6153
.mx_SpaceCreateMenuType {
6254
@mixin SpacePillButton;
6355
}
@@ -100,6 +92,11 @@ $spacePanelWidth: 71px;
10092
width: min-content;
10193
}
10294

95+
.mx_AccessibleButton_kind_link {
96+
padding: 0;
97+
font-size: inherit;
98+
}
99+
103100
.mx_AccessibleButton_disabled {
104101
cursor: not-allowed;
105102
}

src/components/views/spaces/SpaceCreateMenu.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ import SdkConfig from "../../../SdkConfig";
3535
import Modal from "../../../Modal";
3636
import GenericFeatureFeedbackDialog from "../dialogs/GenericFeatureFeedbackDialog";
3737
import SettingsStore from "../../../settings/SettingsStore";
38+
import defaultDispatcher from "../../../dispatcher/dispatcher";
39+
import { Action } from "../../../dispatcher/actions";
40+
import { UserTab } from "../dialogs/UserSettingsDialog";
3841

3942
export const createSpace = async (
4043
name: string,
@@ -245,10 +248,23 @@ const SpaceCreateMenu = ({ onFinished }) => {
245248

246249
let body;
247250
if (visibility === null) {
251+
const onCreateSpaceFromCommunityClick = () => {
252+
defaultDispatcher.dispatch({
253+
action: Action.ViewUserSettings,
254+
initialTabId: UserTab.Preferences,
255+
});
256+
onFinished();
257+
};
258+
248259
body = <React.Fragment>
249260
<h2>{ _t("Create a space") }</h2>
250-
<p>{ _t("Spaces are a new way to group rooms and people. " +
251-
"To join an existing space you'll need an invite.") }</p>
261+
<p>
262+
{ _t("Spaces are a new way to group rooms and people.") }
263+
&nbsp;
264+
{ _t("What kind of Space do you want to create?") }
265+
&nbsp;
266+
{ _t("You can change this later.") }
267+
</p>
252268

253269
<SpaceCreateMenuType
254270
title={_t("Public")}
@@ -263,7 +279,15 @@ const SpaceCreateMenu = ({ onFinished }) => {
263279
onClick={() => setVisibility(Visibility.Private)}
264280
/>
265281

266-
<p>{ _t("You can change this later") }</p>
282+
<p>
283+
{ _t("You can also create a Space from a <a>community</a>.", {}, {
284+
a: sub => <AccessibleButton kind="link" onClick={onCreateSpaceFromCommunityClick}>
285+
{ sub }
286+
</AccessibleButton>,
287+
}) }
288+
&nbsp;
289+
{ _t("To join an existing space you'll need an invite") }
290+
</p>
267291

268292
<SpaceFeedbackPrompt onClick={onFinished} />
269293
</React.Fragment>;

src/i18n/strings/en_EN.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,12 +1027,14 @@
10271027
"e.g. my-space": "e.g. my-space",
10281028
"Address": "Address",
10291029
"Create a space": "Create a space",
1030-
"Spaces are a new way to group rooms and people. To join an existing space you'll need an invite.": "Spaces are a new way to group rooms and people. To join an existing space you'll need an invite.",
1030+
"What kind of Space do you want to create?": "What kind of Space do you want to create?",
1031+
"You can change this later.": "You can change this later.",
10311032
"Public": "Public",
10321033
"Open space for anyone, best for communities": "Open space for anyone, best for communities",
10331034
"Private": "Private",
10341035
"Invite only, best for yourself or teams": "Invite only, best for yourself or teams",
1035-
"You can change this later": "You can change this later",
1036+
"You can also create a Space from a <a>community</a>.": "You can also create a Space from a <a>community</a>.",
1037+
"To join an existing space you'll need an invite": "To join an existing space you'll need an invite",
10361038
"Go back": "Go back",
10371039
"Your public space": "Your public space",
10381040
"Your private space": "Your private space",

0 commit comments

Comments
 (0)