From 279654cc9ea052bab065c208269a63614877787a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 29 Apr 2021 16:08:59 +0100 Subject: [PATCH] Design iterations based on PR feedback --- res/css/structures/_SpaceRoomView.scss | 22 ++++++++++++++++--- res/css/views/beta/_BetaCard.scss | 1 + src/components/structures/MyGroups.js | 2 +- src/components/structures/SpaceRoomView.tsx | 2 +- src/components/views/beta/BetaCard.tsx | 21 ++++++++++++++++++ .../views/spaces/SpaceCreateMenu.tsx | 1 + src/i18n/strings/en_EN.json | 9 +++++--- src/settings/Settings.tsx | 8 ++++--- 8 files changed, 55 insertions(+), 11 deletions(-) diff --git a/res/css/structures/_SpaceRoomView.scss b/res/css/structures/_SpaceRoomView.scss index 04f8e02a9e..f7123fc4cb 100644 --- a/res/css/structures/_SpaceRoomView.scss +++ b/res/css/structures/_SpaceRoomView.scss @@ -143,10 +143,13 @@ $SpaceRoomViewInnerWidth: 428px; } // XXX remove this when spaces leaves Beta .mx_SpaceRoomView_preview_spaceBetaPrompt { - font-size: $font-15px; + font-weight: $font-semi-bold; + font-size: $font-14px; line-height: $font-24px; - color: $secondary-fg-color; - margin-top: 14px; + color: $primary-fg-color; + margin-top: 24px; + position: relative; + padding-left: 24px; .mx_AccessibleButton_kind_link { display: inline; @@ -154,6 +157,19 @@ $SpaceRoomViewInnerWidth: 428px; font-size: inherit; line-height: inherit; } + + &::before { + content: ""; + position: absolute; + height: $font-24px; + width: 20px; + left: 0; + mask-repeat: no-repeat; + mask-position: center; + mask-size: contain; + mask-image: url('$(res)/img/element-icons/room/room-summary.svg'); + background-color: $secondary-fg-color; + } } .mx_SpaceRoomView_preview_inviter { diff --git a/res/css/views/beta/_BetaCard.scss b/res/css/views/beta/_BetaCard.scss index 34b84515ce..05149b7f6c 100644 --- a/res/css/views/beta/_BetaCard.scss +++ b/res/css/views/beta/_BetaCard.scss @@ -45,6 +45,7 @@ limitations under the License. display: block; margin: 20px 0; padding: 12px 40px; + width: max-content; } .mx_BetaCard_disclaimer { diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index 14f22827a9..1fab6c4348 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -140,7 +140,7 @@ export default class MyGroups extends React.Component { */} - +
{ contentHeader } { content } diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 3d01c7cc2b..82a211c291 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -604,7 +604,7 @@ const SpaceSetupPrivateInvite = ({ space, onFinished }) => {
- + { _t("This is an experimental feature. For now, " + "new users receiving an invite will have to open the invite on to actually join.", {}, { b: sub => { sub }, diff --git a/src/components/views/beta/BetaCard.tsx b/src/components/views/beta/BetaCard.tsx index 33b1fef9e6..1233f345d1 100644 --- a/src/components/views/beta/BetaCard.tsx +++ b/src/components/views/beta/BetaCard.tsx @@ -21,6 +21,7 @@ import {_t} from "../../../languageHandler"; import AccessibleButton from "../elements/AccessibleButton"; import SettingsStore from "../../../settings/SettingsStore"; import {SettingLevel} from "../../../settings/SettingLevel"; +import TextWithTooltip from "../elements/TextWithTooltip"; interface IProps { title?: string; @@ -28,6 +29,26 @@ interface IProps { } export const BetaPill = ({ onClick }: { onClick?: () => void }) => { + if (onClick) { + return +
+ { _t("Spaces is a beta feature") } +
+
+ { _t("Tap for more info") } +
+
} + onClick={onClick} + tooltipProps={{ yOffset: -10 }} + > + { _t("Beta") } + ; + } + return { > { + onFinished(); defaultDispatcher.dispatch({ action: Action.ViewUserSettings, initialTabId: USER_LABS_TAB, diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 2367cf777a..7f5205efa3 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -785,10 +785,11 @@ "%(senderName)s: %(stickerName)s": "%(senderName)s: %(stickerName)s", "Change notification settings": "Change notification settings", "Spaces": "Spaces", - "Spaces are a new way to group people and rooms for fun, work, yourself or anything in between.": "Spaces are a new way to group people and rooms for fun, work, yourself or anything in between.", + "Spaces are new ways to group rooms and people.": "Spaces are new ways to group rooms and people.", "%(brand)s will reload with Spaces disabled. Communities and custom tags will be visible again.": "%(brand)s will reload with Spaces disabled. Communities and custom tags will be visible again.", "Beta available for web, desktop and Android. Thank you for trying the beta.": "Beta available for web, desktop and Android. Thank you for trying the beta.", - "%(brand)s will reload with Spaces enabled, communities and custom tags hidden.": "%(brand)s will reload with Spaces enabled, communities and custom tags hidden.", + "%(brand)s will reload with Spaces enabled. Communities and custom tags will be hidden.": "%(brand)s will reload with Spaces enabled. Communities and custom tags will be hidden.", + "You can leave the beta any time from settings or tapping on a beta badge, like the one above.": "You can leave the beta any time from settings or tapping on a beta badge, like the one above.", "Beta available for web, desktop and Android. Some features may be unavailable on your homeserver.": "Beta available for web, desktop and Android. Some features may be unavailable on your homeserver.", "Show options to enable 'Do not disturb' mode": "Show options to enable 'Do not disturb' mode", "Send and receive voice messages (in development)": "Send and receive voice messages (in development)", @@ -2459,6 +2460,8 @@ "Revoke permissions": "Revoke permissions", "Move left": "Move left", "Move right": "Move right", + "Spaces is a beta feature": "Spaces is a beta feature", + "Tap for more info": "Tap for more info", "Beta": "Beta", "Leave the beta": "Leave the beta", "Join the beta": "Join the beta", @@ -2595,7 +2598,7 @@ "Error whilst fetching joined communities": "Error whilst fetching joined communities", "Create a new community": "Create a new community", "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.": "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.", - "Communities are changing to spaces": "Communities are changing to spaces", + "Communities are changing to Spaces": "Communities are changing to Spaces", "You’re all caught up": "You’re all caught up", "You have no visible notifications.": "You have no visible notifications.", "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.": "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.", diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 907fc33a73..5bda746646 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -136,8 +136,7 @@ export const SETTINGS: {[setting: string]: ISetting} = { controller: new ReloadOnChangeController(), betaInfo: { title: _td("Spaces"), - caption: _td("Spaces are a new way to group people and rooms for fun, " + - "work, yourself or anything in between."), + caption: _td("Spaces are new ways to group rooms and people."), disclaimer: (enabled) => { if (enabled) { return <> @@ -150,9 +149,12 @@ export const SETTINGS: {[setting: string]: ISetting} = { } return <> -

{ _t("%(brand)s will reload with Spaces enabled, communities and custom tags hidden.", { +

{ _t("%(brand)s will reload with Spaces enabled. " + + "Communities and custom tags will be hidden.", { brand: SdkConfig.get().brand, }) }

+

{ _t("You can leave the beta any time from settings or tapping on a beta badge, " + + "like the one above.") }

{ _t("Beta available for web, desktop and Android. " + "Some features may be unavailable on your homeserver.") }

;