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

Commit aca6a66

Browse files
author
Germain
authored
Remove new room breadcrumbs (#11104)
* Deprecate new room breadcrumbs * i18n
1 parent 0f17f87 commit aca6a66

File tree

10 files changed

+29
-275
lines changed

10 files changed

+29
-275
lines changed

res/css/_components.pcss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@
288288
@import "./views/rooms/_PinnedEventTile.pcss";
289289
@import "./views/rooms/_PresenceLabel.pcss";
290290
@import "./views/rooms/_ReadReceiptGroup.pcss";
291-
@import "./views/rooms/_RecentlyViewedButton.pcss";
292291
@import "./views/rooms/_ReplyPreview.pcss";
293292
@import "./views/rooms/_ReplyTile.pcss";
294293
@import "./views/rooms/_RoomBreadcrumbs.pcss";

res/css/views/rooms/_RecentlyViewedButton.pcss

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

src/components/structures/LeftPanel.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ import { getKeyBindingsManager } from "../../KeyBindingsManager";
3333
import UIStore from "../../stores/UIStore";
3434
import { IState as IRovingTabIndexState } from "../../accessibility/RovingTabIndex";
3535
import RoomListHeader from "../views/rooms/RoomListHeader";
36-
import RecentlyViewedButton from "../views/rooms/RecentlyViewedButton";
3736
import { BreadcrumbsStore } from "../../stores/BreadcrumbsStore";
3837
import RoomListStore, { LISTS_UPDATE_EVENT } from "../../stores/room-list/RoomListStore";
3938
import { UPDATE_EVENT } from "../../stores/AsyncStore";
4039
import IndicatorScrollbar from "./IndicatorScrollbar";
4140
import RoomBreadcrumbs from "../views/rooms/RoomBreadcrumbs";
42-
import SettingsStore from "../../settings/SettingsStore";
4341
import { KeyBindingAction } from "../../accessibility/KeyboardShortcuts";
4442
import { shouldShowComponent } from "../../customisations/helpers/UIComponents";
4543
import { UIComponent } from "../../settings/UIFeature";
@@ -57,7 +55,6 @@ interface IProps {
5755
enum BreadcrumbsMode {
5856
Disabled,
5957
Legacy,
60-
Labs,
6158
}
6259

6360
interface IState {
@@ -85,8 +82,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
8582
}
8683

8784
private static get breadcrumbsMode(): BreadcrumbsMode {
88-
if (!BreadcrumbsStore.instance.visible) return BreadcrumbsMode.Disabled;
89-
return SettingsStore.getValue("feature_breadcrumbs_v2") ? BreadcrumbsMode.Labs : BreadcrumbsMode.Legacy;
85+
return !BreadcrumbsStore.instance.visible ? BreadcrumbsMode.Disabled : BreadcrumbsMode.Legacy;
9086
}
9187

9288
public componentDidMount(): void {
@@ -344,9 +340,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
344340
}
345341

346342
let rightButton: JSX.Element | undefined;
347-
if (this.state.showBreadcrumbs === BreadcrumbsMode.Labs) {
348-
rightButton = <RecentlyViewedButton />;
349-
} else if (this.state.activeSpace === MetaSpace.Home && shouldShowComponent(UIComponent.ExploreRooms)) {
343+
if (this.state.activeSpace === MetaSpace.Home && shouldShowComponent(UIComponent.ExploreRooms)) {
350344
rightButton = (
351345
<AccessibleTooltipButton
352346
className="mx_LeftPanel_exploreButton"

src/components/views/rooms/RecentlyViewedButton.tsx

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
141141
const useCase = SettingsStore.getValue<UseCase | null>("FTUE.useCaseSelection");
142142
const roomListSettings = PreferencesUserSettingsTab.ROOM_LIST_SETTINGS
143143
// Only show the breadcrumbs setting if breadcrumbs v2 is disabled
144-
.filter((it) => it !== "breadcrumbs" || !SettingsStore.getValue("feature_breadcrumbs_v2"))
144+
.filter((it) => it !== "breadcrumbs")
145145
// Only show the user onboarding setting if the user should see the user onboarding page
146146
.filter((it) => it !== "FTUE.userOnboardingButton" || showUserOnboardingPage(useCase));
147147

src/i18n/strings/en_EN.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,6 @@
970970
"Show current avatar and name for users in message history": "Show current avatar and name for users in message history",
971971
"Show HTML representation of room topics": "Show HTML representation of room topics",
972972
"Show info about bridges in room settings": "Show info about bridges in room settings",
973-
"Use new room breadcrumbs": "Use new room breadcrumbs",
974973
"Right panel stays open": "Right panel stays open",
975974
"Defaults to room member list.": "Defaults to room member list.",
976975
"Jump to date (adds /jumptodate and jump to date headers)": "Jump to date (adds /jumptodate and jump to date headers)",
@@ -1984,7 +1983,6 @@
19841983
"Seen by %(count)s people|other": "Seen by %(count)s people",
19851984
"Seen by %(count)s people|one": "Seen by %(count)s person",
19861985
"Read receipts": "Read receipts",
1987-
"Recently viewed": "Recently viewed",
19881986
"Replying": "Replying",
19891987
"Room %(name)s": "Room %(name)s",
19901988
"Recently visited rooms": "Recently visited rooms",
@@ -3112,6 +3110,7 @@
31123110
"To search messages, look for this icon at the top of a room <icon/>": "To search messages, look for this icon at the top of a room <icon/>",
31133111
"Recent searches": "Recent searches",
31143112
"Clear": "Clear",
3113+
"Recently viewed": "Recently viewed",
31153114
"Use <arrows/> to scroll": "Use <arrows/> to scroll",
31163115
"Search Dialog": "Search Dialog",
31173116
"Remove search filter for %(filter)s": "Remove search filter for %(filter)s",

src/settings/Settings.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,6 @@ export const SETTINGS: { [setting: string]: ISetting } = {
331331
displayName: _td("Show info about bridges in room settings"),
332332
default: false,
333333
},
334-
"feature_breadcrumbs_v2": {
335-
isFeature: true,
336-
labsGroup: LabGroup.Rooms,
337-
supportedLevels: LEVELS_FEATURE,
338-
displayName: _td("Use new room breadcrumbs"),
339-
default: false,
340-
},
341334
"feature_right_panel_default_open": {
342335
isFeature: true,
343336
labsGroup: LabGroup.Rooms,
@@ -856,7 +849,6 @@ export const SETTINGS: { [setting: string]: ISetting } = {
856849
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
857850
displayName: _td("Show shortcuts to recently viewed rooms above the room list"),
858851
default: true,
859-
controller: new IncompatibleController("feature_breadcrumbs_v2", true),
860852
},
861853
"FTUE.userOnboardingButton": {
862854
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

src/stores/BreadcrumbsStore.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export class BreadcrumbsStore extends AsyncStoreWithClient<IState> {
5050

5151
SettingsStore.monitorSetting("breadcrumb_rooms", null);
5252
SettingsStore.monitorSetting("breadcrumbs", null);
53-
SettingsStore.monitorSetting("feature_breadcrumbs_v2", null);
5453
}
5554

5655
public static get instance(): BreadcrumbsStore {
@@ -69,11 +68,9 @@ export class BreadcrumbsStore extends AsyncStoreWithClient<IState> {
6968
* Do we have enough rooms to justify showing the breadcrumbs?
7069
* (Or is the labs feature enabled?)
7170
*
72-
* @returns true if there are at least 20 visible rooms or
73-
* feature_breadcrumbs_v2 is enabled.
71+
* @returns true if there are at least 20 visible rooms.
7472
*/
7573
public get meetsRoomRequirement(): boolean {
76-
if (SettingsStore.getValue("feature_breadcrumbs_v2")) return true;
7774
const msc3946ProcessDynamicPredecessor = SettingsStore.getValue("feature_dynamic_room_predecessors");
7875
return !!this.matrixClient && this.matrixClient.getVisibleRooms(msc3946ProcessDynamicPredecessor).length >= 20;
7976
}
@@ -83,7 +80,7 @@ export class BreadcrumbsStore extends AsyncStoreWithClient<IState> {
8380
if (payload.action === Action.SettingUpdated) {
8481
if (payload.settingName === "breadcrumb_rooms") {
8582
await this.updateRooms();
86-
} else if (payload.settingName === "breadcrumbs" || payload.settingName === "feature_breadcrumbs_v2") {
83+
} else if (payload.settingName === "breadcrumbs") {
8784
await this.updateState({ enabled: SettingsStore.getValue("breadcrumbs", null) });
8885
}
8986
} else if (payload.action === Action.ViewRoom) {

test/components/views/settings/tabs/user/__snapshots__/PreferencesUserSettingsTab-test.tsx.snap

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,6 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
2020
<div
2121
class="mx_SettingsSection_subSections"
2222
>
23-
<div
24-
class="mx_SettingsSubsection"
25-
>
26-
<div
27-
class="mx_SettingsSubsectionHeading"
28-
>
29-
<h3
30-
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
31-
>
32-
Room list
33-
</h3>
34-
</div>
35-
<div
36-
class="mx_SettingsSubsection_content"
37-
>
38-
<div
39-
class="mx_SettingsFlag"
40-
>
41-
<label
42-
class="mx_SettingsFlag_label"
43-
>
44-
<span
45-
class="mx_SettingsFlag_labelText"
46-
>
47-
Show shortcuts to recently viewed rooms above the room list
48-
</span>
49-
</label>
50-
<div
51-
aria-checked="true"
52-
aria-disabled="true"
53-
aria-label="Show shortcuts to recently viewed rooms above the room list"
54-
class="mx_AccessibleButton mx_ToggleSwitch mx_ToggleSwitch_on"
55-
role="switch"
56-
tabindex="0"
57-
>
58-
<div
59-
class="mx_ToggleSwitch_ball"
60-
/>
61-
</div>
62-
</div>
63-
</div>
64-
</div>
6523
<div
6624
class="mx_SettingsSubsection"
6725
>

0 commit comments

Comments
 (0)