Skip to content

Commit bb9ae7b

Browse files
authored
Merge pull request matrix-org#4850 from matrix-org/travis/room-list/todo-cleanup
Clean up TODO comments for new room list
2 parents 0059d44 + 175ade8 commit bb9ae7b

25 files changed

+117
-93
lines changed

res/css/structures/_LeftPanel2.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// TODO: Rename to mx_LeftPanel during replacement of old component
17+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
1818

1919
$tagPanelWidth: 70px; // only applies in this file, used for calculations
2020

res/css/views/rooms/_RoomBreadcrumbs2.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
18+
1719
.mx_RoomBreadcrumbs2 {
1820
width: 100%;
1921

res/css/views/rooms/_RoomSublist2.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// TODO: Rename to mx_RoomSublist during replacement of old component
17+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
1818

1919
.mx_RoomSublist2 {
2020
// The sublist is a column of rows, essentially

res/css/views/rooms/_RoomTile2.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// TODO: Rename to mx_RoomTile during replacement of old component
17+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
1818

1919
// Note: the room tile expects to be in a flexbox column container
2020
.mx_RoomTile2 {
@@ -96,7 +96,8 @@ limitations under the License.
9696
// TODO: [Notifications] Use mx_RoomTile2_notificationsButton, similar to the following approach:
9797
// https://github.com/matrix-org/matrix-react-sdk/blob/2180a56074f3698fc0241c309a72ba6cad802d1c/res/css/views/rooms/_RoomSublist2.scss#L48-L76
9898
// You'll need to do the same down below on the &:hover selector for the tile.
99-
// ... also remove this 4 line TODO comment.
99+
// See https://github.com/vector-im/riot-web/issues/13961.
100+
// ... also remove this 5 line TODO comment.
100101
.mx_RoomTile2_menuButton,
101102
.mx_RoomTile2_notificationsButton {
102103
width: 0;

src/components/structures/LeftPanel2.tsx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import { UPDATE_EVENT } from "../../stores/AsyncStore";
3131
import ResizeNotifier from "../../utils/ResizeNotifier";
3232
import SettingsStore from "../../settings/SettingsStore";
3333

34+
// TODO: Remove banner on launch: https://github.com/vector-im/riot-web/issues/14231
35+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
36+
3437
/*******************************************************************
3538
* CAUTION *
3639
*******************************************************************
@@ -45,7 +48,7 @@ interface IProps {
4548
}
4649

4750
interface IState {
48-
searchFilter: string; // TODO: Move search into room list?
51+
searchFilter: string;
4952
showBreadcrumbs: boolean;
5053
showTagPanel: boolean;
5154
}
@@ -54,12 +57,7 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
5457
private listContainerRef: React.RefObject<HTMLDivElement> = createRef();
5558
private tagPanelWatcherRef: string;
5659

57-
// TODO: Properly support TagPanel
58-
// TODO: Properly support searching/filtering
59-
// TODO: Properly support breadcrumbs
60-
// TODO: a11y
61-
// TODO: actually make this useful in general (match design proposals)
62-
// TODO: Fadable support (is this still needed?)
60+
// TODO: a11y: https://github.com/vector-im/riot-web/issues/14180
6361

6462
constructor(props: IProps) {
6563
super(props);
@@ -138,7 +136,7 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
138136
}
139137
}
140138

141-
// TODO: Apply this on resize, init, etc for reliability
139+
// TODO: Improve header reliability: https://github.com/vector-im/riot-web/issues/14232
142140
private onScroll = (ev: React.MouseEvent<HTMLDivElement>) => {
143141
const list = ev.target as HTMLDivElement;
144142
this.handleStickyHeaders(list);
@@ -150,11 +148,6 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
150148
};
151149

152150
private renderHeader(): React.ReactNode {
153-
// TODO: Update when profile info changes
154-
// TODO: Presence
155-
// TODO: Breadcrumbs toggle
156-
// TODO: Menu button
157-
158151
let breadcrumbs;
159152
if (this.state.showBreadcrumbs) {
160153
breadcrumbs = (
@@ -173,8 +166,6 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
173166
}
174167

175168
private renderSearchExplore(): React.ReactNode {
176-
// TODO: Collapsed support
177-
178169
return (
179170
<div className="mx_LeftPanel2_filterContainer">
180171
<RoomSearch onQueryUpdate={this.onSearch} isMinimized={this.props.isMinimized} />
@@ -195,7 +186,7 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
195186
</div>
196187
);
197188

198-
// TODO: Improve props for RoomList2
189+
// TODO: Determine what these onWhatever handlers do: https://github.com/vector-im/riot-web/issues/14180
199190
const roomList = <RoomList2
200191
onKeyDown={() => {/*TODO*/}}
201192
resizeNotifier={null}
@@ -206,7 +197,7 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
206197
isMinimized={this.props.isMinimized}
207198
/>;
208199

209-
// TODO: Conference handling / calls
200+
// TODO: Conference handling / calls: https://github.com/vector-im/riot-web/issues/14177
210201

211202
const containerClasses = classNames({
212203
"mx_LeftPanel2": true,

src/components/structures/RoomSearch.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import { Key } from "../../Keyboard";
2525
import AccessibleButton from "../views/elements/AccessibleButton";
2626
import { Action } from "../../dispatcher/actions";
2727

28+
// TODO: Remove banner on launch: https://github.com/vector-im/riot-web/issues/14231
29+
2830
/*******************************************************************
2931
* CAUTION *
3032
*******************************************************************

src/components/structures/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
136136
ev.preventDefault();
137137
ev.stopPropagation();
138138

139-
// TODO: Archived room view (deferred)
139+
// TODO: Archived room view: https://github.com/vector-im/riot-web/issues/14038
140140
console.log("TODO: Show archived rooms");
141141
};
142142

src/components/views/rooms/NotificationBadge.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export const NOTIFICATION_STATE_UPDATE = "update";
3535
export enum NotificationColor {
3636
// Inverted (None -> Red) because we do integer comparisons on this
3737
None, // nothing special
38-
Bold, // no badge, show as unread // TODO: This goes away with new notification structures
38+
// TODO: Remove bold with notifications: https://github.com/vector-im/riot-web/issues/14227
39+
Bold, // no badge, show as unread
3940
Grey, // unread notified messages
4041
Red, // unread pings
4142
}
@@ -141,6 +142,8 @@ export default class NotificationBadge extends React.PureComponent<IProps, IStat
141142
}
142143
}
143144

145+
// TODO: Clean up these state classes: https://github.com/vector-im/riot-web/issues/14153
146+
144147
export class StaticNotificationState extends EventEmitter implements INotificationState {
145148
constructor(public symbol: string, public count: number, public color: NotificationColor) {
146149
super();

src/components/views/rooms/RoomBreadcrumbs2.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ import { Room } from "matrix-js-sdk/src/models/room";
2323
import defaultDispatcher from "../../../dispatcher/dispatcher";
2424
import Analytics from "../../../Analytics";
2525
import { UPDATE_EVENT } from "../../../stores/AsyncStore";
26-
import { CSSTransition, TransitionGroup } from "react-transition-group";
26+
import { CSSTransition } from "react-transition-group";
27+
28+
// TODO: Remove banner on launch: https://github.com/vector-im/riot-web/issues/14231
29+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
2730

2831
/*******************************************************************
2932
* CAUTION *
@@ -86,7 +89,9 @@ export default class RoomBreadcrumbs2 extends React.PureComponent<IProps, IState
8689
};
8790

8891
public render(): React.ReactElement {
89-
// TODO: Decorate crumbs with icons
92+
// TODO: Decorate crumbs with icons: https://github.com/vector-im/riot-web/issues/14040
93+
// TODO: Scrolling: https://github.com/vector-im/riot-web/issues/14040
94+
// TODO: Tooltips: https://github.com/vector-im/riot-web/issues/14040
9095
const tiles = BreadcrumbsStore.instance.rooms.map((r, i) => {
9196
return (
9297
<AccessibleButton

src/components/views/rooms/RoomList2.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ import { ActionPayload } from "../../../dispatcher/payloads";
3030
import { NameFilterCondition } from "../../../stores/room-list/filters/NameFilterCondition";
3131
import { ListLayout } from "../../../stores/room-list/ListLayout";
3232

33+
// TODO: Remove banner on launch: https://github.com/vector-im/riot-web/issues/14231
34+
// TODO: Rename on launch: https://github.com/vector-im/riot-web/issues/14231
35+
3336
/*******************************************************************
3437
* CAUTION *
3538
*******************************************************************
@@ -120,6 +123,8 @@ const TAG_AESTHETICS: {
120123
isInvite: false,
121124
defaultHidden: false,
122125
},
126+
127+
// TODO: Replace with archived view: https://github.com/vector-im/riot-web/issues/14038
123128
[DefaultTagID.Archived]: {
124129
sectionLabel: _td("Historical"),
125130
isInvite: false,
@@ -174,11 +179,11 @@ export default class RoomList2 extends React.Component<IProps, IState> {
174179
for (const orderedTagId of TAG_ORDER) {
175180
if (COMMUNITY_TAGS_BEFORE_TAG === orderedTagId) {
176181
// Populate community invites if we have the chance
177-
// TODO
182+
// TODO: Community invites: https://github.com/vector-im/riot-web/issues/14179
178183
}
179184
if (CUSTOM_TAGS_BEFORE_TAG === orderedTagId) {
180185
// Populate custom tags if needed
181-
// TODO
186+
// TODO: Custom tags: https://github.com/vector-im/riot-web/issues/14091
182187
}
183188

184189
const orderedRooms = this.state.sublists[orderedTagId] || [];

0 commit comments

Comments
 (0)