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

Add initial filtering support to new room list #4681

Merged
merged 2 commits into from
Jun 3, 2020

Conversation

turt2live
Copy link
Member

For element-hq/element-web#13635

Docs on how this works are included within.

This is an incomplete implementation and is mostly dumped in this state for review purposes. The remainder of the features/bugs are expected to be in more bite-sized chunks.

This exposes the RoomListStore on the window for easy access to things like the new filter functions (used in debugging).

This also adds initial handling of "new rooms" to the client, though the support is poor (see below)

Known bugs (deferred to later PRs):

  • Regenerates the entire room list when a new room is seen.
  • Doesn't handle 2+ filters at the same time very well (see gif below. will need a priority/ordering of some sort).
  • Doesn't handle room order changes within a tag yet, despite the docs implying it does.
  • Various other things mentioned in the TODO comments in the diff.

Evidence of single filters working:
filtering mp4
group-filter mp4

The filter collision bug (conditions are applied in an OR when they need to be applied by priority):
filter-bug mp4

For element-hq/element-web#13635

This is an incomplete implementation and is mostly dumped in this state for review purposes. The remainder of the features/bugs are expected to be in more bite-sized chunks.

This exposes the RoomListStore on the window for easy access to things like the new filter functions (used in debugging).

This also adds initial handling of "new rooms" to the client, though the support is poor.

Known bugs:
* [ ] Regenerates the entire room list when a new room is seen.
* [ ] Doesn't handle 2+ filters at the same time very well (see gif. will need a priority/ordering of some sort).
* [ ] Doesn't handle room order changes within a tag yet, despite the docs implying it does.
@turt2live turt2live marked this pull request as ready for review June 1, 2020 22:54
@turt2live turt2live requested a review from a team June 1, 2020 22:54
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane otherwise

src/utils/arrays.ts Show resolved Hide resolved
*/
export function arrayDiff<T>(a: T[], b: T[]): { added: T[], removed: T[] } {
return {
added: b.filter(i => !a.includes(i)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

src/utils/arrays.ts Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from t3chguy June 3, 2020 17:29
@turt2live turt2live merged commit 380ba16 into develop Jun 3, 2020
@turt2live turt2live deleted the travis/room-list/filtering branch June 3, 2020 19:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants