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

Commit 68024c1

Browse files
authored
De-labs Message Bubbles layout (#7612)
1 parent 502b805 commit 68024c1

File tree

5 files changed

+9
-73
lines changed

5 files changed

+9
-73
lines changed

src/components/views/settings/LayoutSwitcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default class LayoutSwitcher extends React.Component<IProps, IState> {
8888
checked={this.state.layout === Layout.IRC}
8989
onChange={this.onLayoutChange}
9090
>
91-
{ _t("IRC") }
91+
{ _t("IRC (Experimental)") }
9292
</StyledRadioButton>
9393
</label>
9494
<label className={groupClasses}>

src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { _t } from "../../../../../languageHandler";
2121
import SdkConfig from "../../../../../SdkConfig";
2222
import { MatrixClientPeg } from '../../../../../MatrixClientPeg';
2323
import SettingsStore from "../../../../../settings/SettingsStore";
24-
import StyledCheckbox from '../../../elements/StyledCheckbox';
2524
import SettingsFlag from '../../../elements/SettingsFlag';
2625
import Field from '../../../elements/Field';
2726
import { SettingLevel } from "../../../../../settings/SettingLevel";
@@ -89,16 +88,6 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
8988
this.setState({ layout: layout });
9089
};
9190

92-
private onIRCLayoutChange = (enabled: boolean) => {
93-
if (enabled) {
94-
this.setState({ layout: Layout.IRC });
95-
SettingsStore.setValue("layout", null, SettingLevel.DEVICE, Layout.IRC);
96-
} else {
97-
this.setState({ layout: Layout.Group });
98-
SettingsStore.setValue("layout", null, SettingLevel.DEVICE, Layout.Group);
99-
}
100-
};
101-
10291
private renderAdvancedSection() {
10392
if (!SettingsStore.getValue(UIFeature.AdvancedSettings)) return null;
10493

@@ -120,15 +109,6 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
120109
advanced = <>
121110
<SettingsFlag name="useCompactLayout" level={SettingLevel.DEVICE} useCheckbox={true} />
122111

123-
{ !SettingsStore.getValue("feature_new_layout_switcher") ?
124-
<StyledCheckbox
125-
checked={this.state.layout == Layout.IRC}
126-
onChange={(ev) => this.onIRCLayoutChange(ev.target.checked)}
127-
>
128-
{ _t("Enable experimental, compact IRC style layout") }
129-
</StyledCheckbox> : null
130-
}
131-
132112
<SettingsFlag
133113
name="useSystemFont"
134114
level={SettingLevel.DEVICE}
@@ -161,27 +141,20 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
161141
render() {
162142
const brand = SdkConfig.get().brand;
163143

164-
let layoutSection;
165-
if (SettingsStore.getValue("feature_new_layout_switcher")) {
166-
layoutSection = (
167-
<LayoutSwitcher
168-
userId={this.state.userId}
169-
displayName={this.state.displayName}
170-
avatarUrl={this.state.avatarUrl}
171-
messagePreviewText={this.MESSAGE_PREVIEW_TEXT}
172-
onLayoutChanged={this.onLayoutChanged}
173-
/>
174-
);
175-
}
176-
177144
return (
178145
<div className="mx_SettingsTab mx_AppearanceUserSettingsTab">
179146
<div className="mx_SettingsTab_heading">{ _t("Customise your appearance") }</div>
180147
<div className="mx_SettingsTab_SubHeading">
181148
{ _t("Appearance Settings only affect this %(brand)s session.", { brand }) }
182149
</div>
183150
<ThemeChoicePanel />
184-
{ layoutSection }
151+
<LayoutSwitcher
152+
userId={this.state.userId}
153+
displayName={this.state.displayName}
154+
avatarUrl={this.state.avatarUrl}
155+
messagePreviewText={this.MESSAGE_PREVIEW_TEXT}
156+
onLayoutChanged={this.onLayoutChanged}
157+
/>
185158
<FontScalingPanel />
186159
{ this.renderAdvancedSection() }
187160
<ImageSizePanel />

src/i18n/strings/en_EN.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@
885885
"Show extensible event representation of events": "Show extensible event representation of events",
886886
"Location sharing (under active development)": "Location sharing (under active development)",
887887
"Show info about bridges in room settings": "Show info about bridges in room settings",
888-
"New layout switcher (with message bubbles)": "New layout switcher (with message bubbles)",
889888
"Meta Spaces": "Meta Spaces",
890889
"Use new room breadcrumbs": "Use new room breadcrumbs",
891890
"New spotlight search experience": "New spotlight search experience",
@@ -1280,7 +1279,7 @@
12801279
"Updating spaces... (%(progress)s out of %(count)s)|other": "Updating spaces... (%(progress)s out of %(count)s)",
12811280
"Updating spaces... (%(progress)s out of %(count)s)|one": "Updating space...",
12821281
"Message layout": "Message layout",
1283-
"IRC": "IRC",
1282+
"IRC (Experimental)": "IRC (Experimental)",
12841283
"Modern": "Modern",
12851284
"Message bubbles": "Message bubbles",
12861285
"Messages containing keywords": "Messages containing keywords",
@@ -1391,7 +1390,6 @@
13911390
"New version available. <a>Update now.</a>": "New version available. <a>Update now.</a>",
13921391
"Check for update": "Check for update",
13931392
"Set the name of a font installed on your system & %(brand)s will attempt to use it.": "Set the name of a font installed on your system & %(brand)s will attempt to use it.",
1394-
"Enable experimental, compact IRC style layout": "Enable experimental, compact IRC style layout",
13951393
"Customise your appearance": "Customise your appearance",
13961394
"Appearance Settings only affect this %(brand)s session.": "Appearance Settings only affect this %(brand)s session.",
13971395
"Flair": "Flair",

src/settings/Settings.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import { OrderedMultiController } from "./controllers/OrderedMultiController";
3939
import { Layout } from "./enums/Layout";
4040
import ReducedMotionController from './controllers/ReducedMotionController';
4141
import IncompatibleController from "./controllers/IncompatibleController";
42-
import NewLayoutSwitcherController from './controllers/NewLayoutSwitcherController';
4342
import { ImageSize } from "./enums/ImageSize";
4443
import { MetaSpace } from "../stores/spaces";
4544

@@ -333,14 +332,6 @@ export const SETTINGS: {[setting: string]: ISetting} = {
333332
displayName: _td("Show info about bridges in room settings"),
334333
default: false,
335334
},
336-
"feature_new_layout_switcher": {
337-
isFeature: true,
338-
labsGroup: LabGroup.Messaging,
339-
supportedLevels: LEVELS_FEATURE,
340-
displayName: _td("New layout switcher (with message bubbles)"),
341-
default: false,
342-
controller: new NewLayoutSwitcherController(),
343-
},
344335
"feature_spaces_metaspaces": {
345336
isFeature: true,
346337
labsGroup: LabGroup.Spaces,

src/settings/controllers/NewLayoutSwitcherController.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)