* Move Room List to ListView
- Also remove Space/Enter handing from keyboard navigation we can just leave the default behaviour of those keys and handle via onClick
* Update rooms when the primary filter changes
Otherwise when changing spaces, the filter does not reset until the next update to the RVS is made.
* Fix stickyRow/scrollIntoView when switiching space or changing filters
- Also remove the rest of space/enter keyboard handling use
* Remove the rest of space/enter keyboard handling use
* Remove useCombinedRef and add @radix-ui/react-compose-refs as we already depend on it
- Also remove eact-virtualized dep
* Update RoomList unit test
* Update snapshots and unit tests
* Fix e2e tests
* Remove react-virtualized from tests
* Fix e2e flake
* Update more screenshots
* Fix e2e test case where were should scroll to the top when the active room is no longer in the list
* Move from gitpkg to package-patch
* Update to latest react virtuoso release/api.
Also pass spaceId to the room list and scroll the activeIndex into view when spaceId or primaryFilter change.
* Use listbox/option roles to improve ScreenReader experience
* Change onKeyDown e.stopPropogation to cover context menu
* lint
* Remove unneeded exposure of the listView ref
Also move scrollIntoViewOnChange to useCallback
* Update unit test and snapshot
* Fix e2e tests and update screenshots
* Fix unit test and snapshot
* Update more unit tests
* Fix keyboard shortcuts and e2e test
* Fix another e2e and unit test
* lint
* Improve the naming for RoomResult and the documentation on it's fields meaning.
Also update the login in RoomList to check for any change in filters, this is a bit more future proof for when we introduce multi select than using activePrimaryFilter.
* Put back and fix landmark tests
* Fix test import
* Add comment regarding context object getting rendered.
* onKeyDown should be optional
* Use SpaceKey type on RoomResult
* lint
* Dispatch an action when room is forgotten
* Dispatch an action when room is forgotten
* Remove room on action
* Add test
* Write test for matrixchat
* Add payload info to comment
* Write failing playwright test
Basically when someone changes their name, any old tombstoned rooms that
were previously hidden would suddenly show up in the list.
* Split addRoom into two methods
- `reInsertRoom` that re-inserts a room that is already known by the skiplist.
- `addNewRoom` to add new rooms
The idea is that sometimes you only want to re-insert to noop, eg: when
you get an event in an old room that was upgraded.
* Use new methods in the RLS
Only use `addNewRoom` when absolutely necessary. Most events should
instead use `reInsertRoom` which will noop when the room isn't already
known by the skiplist.
* Fix broken tests
* Add new test
* Fix playwright test
* add loading state to view model and spinner to room list vieqw
* Update snapshots and add loading test
* avoid nested ternary operator
* Add room list skeleton loading state
* Fix loading logic
- Create RoomListStoreV3Event as to not conflict with loading event definition in Create RoomListStoreEvent.
- Add a loaded event
- Use it to determine loaded state in useFilteredRooms rather than the update event which gets fired in other cases.
* Fix isLoadingRooms logic
* update snapshots and fix test
* Forcing an empty commit to fix PR
* Fix _components.pcss order
* Fix test that wasn't doing anything
* fix tests
* Remove room when new membership is leave
It doesn't really matter what the previous membership was.
* Fix test
* Remove on join/invite only
* Exclude kicked rooms from being removed
* Sort muted rooms to the bottom of the room list
* Re-insert room on mute/unmute
* Write tests
* Fix broken playwright test
Muted rooms are at the bottom, so we need to scroll.
* Unread filter should match rooms marked as unread
* Re-insert room into skip list on account data
So that filters are re-calculated when rooms are marked as unread.
* Write test
* Add `type` property to Sorter
So that we can uniquely identify any given sorting algorithm.
* Add a getter for the active sort algorithm
* Define a setting to store the sorting algorithm
* Add a method to resort the list of rooms
- Just one method where you specify the sorting algorithm by type.
- Persist the new sorting algorithm using SettingsStore.
* On startup, use preferred sorter
* Add tests
* Implement the favourite filter
* Make the room node capable of dealing with filters
- Holds data to indicate which filters apply
- Provides method to check if a given set of filters apply to this node
- Provides a method to recalculate which filters apply
* Wire up the filtering mechanism in skip list
* Use filters in the store
* Remove else
* Use a set instead of map
* Add method to await space store setup
Otherwise, the room list store will get incorrect information about
spaces and thus will produce an incorrect roomlist.
* Implement a way to filter by active space
Implement a way to filter by active space
* Fix broken jest tests
* Fix typo
* Rename `isReady` to `storeReadyPromise`
* Fix mock in test
* Update the store on action
* Add more tests
* Add newlines between case blocks
* Make code more readable
- Make if/else more consistent
- Add comment on findAndAddRoom()
* Add more tests
* Remove redundant code
On a timeline action, we return early if payload.room is falsy.
So then why do we need to retry fetching the room?
I think this can be removed but will ask others if there's some
conext I'm missing.
* Fix test
* Remove more redundant code
* Add more tests
* Explain intention in comment
* Emit only once even when adding multiple rooms
* Add missing tsdoc
* Implement enough of the new store to get a list of rooms
* Make it possible to swap sorting algorithm
* Don't attach to window object
We don't want the store to be created if the labs flag is off
* Remove the store class
Probably best to include this PR with the minimal vm implmentation
* Create a new room list store that wraps around the skip list
* Create a minimal view model
* Fix CI
* Add some basic tests for the store
* Write more tests
* Add some jsdoc comments
* Add more documentation
* Add more docs